xanthe

A library to validate common formats such as emails, and IP addresses

Usage no npm install needed!

<script type="module">
  import xanthe from 'https://cdn.skypack.dev/xanthe';
</script>

README

Xanthe is a simple format validator library

Content

This library contains a set of functions to validate the following commons data entries

  • an email address
  • an IP V4 address

Xanthe means “golden” or “yellow” in Greek. Xanthe is an exotic epithet of Demeter, goddess of the harvest and agriculture.

HOW TO

Install

yarn add xanthe

Use

import { isEmail, isIPv4 } from "xanthe"

const email = "tom@perdu.com"
console.log(isEmail(email))

const ip = "192.168.X.0"
console.log(isIPv4(ip))

LICENCE

MIT

Authors

Elitizon Ltd