timezone-validator
v1.0.3
Published
This module is for testing if a given string is a valid timezone
Downloads
2,671
Maintainers
Readme
NPM package that let's you check if a timezone is a valid zone.
NPM Link: https://www.npmjs.com/package/timezone-validator
Check out my blog: https://idlob.dev/blog/create-npm-package/
Example usage:
const timezoneValidator = require('timezone-validator');
console.log(timezoneValidator('America/Denver')); // true console.log(timezoneValidator('Foo/Bar')); // false console.log(timezoneValidator(new Array())); // throws an Error