Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

is-uic-location-code

juliuste397ISCdeprecated0.0.1

WARNING: unmaintained

Check if given value is a valid UIC location code.

uic, location, code, enee, 920-2, railway, train, union, international, station

readme

is-uic-location-code

Check if given value is a valid UIC location code (ENEE). Uses the uic-codes package. Note that only 7-character codes are considered valid for now (instead of 8-digit with checksum, as specified by UIC), because most operators don't provide it, so that 8-digit codes are more likely the result of bugs or inconsistencies.

npm version Build Status Greenkeeper badge dependency status license chat on gitter

Installation

npm install is-uic-location-code

Usage

const isUicLocationCode = require('is-uic-location-code')
isUicLocationCode('1000010') // true
isUicLocationCode('8000001') // true
isUicLocationCode('8777777') // true
isUicLocationCode(8777777) // false
isUicLocationCode('80-00001') // false
isUicLocationCode('800000001') // false
isUicLocationCode('0010000') // false
isUicLocationCode('80') // false
isUicLocationCode(null) // false
isUicLocationCode(undefined) // false

Contributing

If you found a bug or want to propose a feature, feel free to visit the issues page.