Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aerilym/is-timezone
Is this string a valid timezone? Validate timezones before using them in node, dates, or new objects.
https://github.com/aerilym/is-timezone
Last synced: about 2 months ago
JSON representation
Is this string a valid timezone? Validate timezones before using them in node, dates, or new objects.
- Host: GitHub
- URL: https://github.com/aerilym/is-timezone
- Owner: Aerilym
- Created: 2022-09-05T16:16:27.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-12T03:48:01.000Z (5 months ago)
- Last Synced: 2024-10-12T23:36:07.097Z (3 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/is-timezone
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# is-timezone
[![Build](https://github.com/Aerilym/is-timezone/actions/workflows/build.yml/badge.svg)](https://github.com/Aerilym/is-timezone/actions/workflows/build.yml)
[![npm version](https://badge.fury.io/js/is-timezone.svg)](https://badge.fury.io/js/is-timezone)
[![Known Vulnerabilities](https://snyk.io/test/github/aerilym/is-timezone/badge.svg)](https://snyk.io/test/github/aerilym/is-timezone)Is this string a valid timezone? Validate timezones before using them in node, dates, or new objects.
## Usage
### Setup
```JavaScript
const isTimezone = require('is-timezone');
```or
```TypeScript
import isTimezone from 'is-timezone';
```### Validate a timezone
```JavaScript
const isTimezone = require('is-timezone');if (isTimezone('Australia/Melbourne')) {
// Do something
};```
## Example
A production example of using this transport is available here: [photoprism-helper config.ts](https://github.com/Aerilym/photoprism-helper/tree/master/src/config.ts)
Here is the relevant code, omitting anything not relevant to the transport:
```TypeScript
TBA
```