npm.io
7.4.3 • Published 6 years ago

jsonotron-core-field-types

Licence
MIT
Version
7.4.3
Deps
0
Size
104 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

Jsonotron Core Field Types

A library of enum types and schema types for the Jsonotron system.

npm JavaScript Style Guide

This library is intended for use with the Jsonotron system.

Available types:

Enum Type Name Description
boolean The values true and false.
callingCode International country dialing codes.
countryCode International country codes.
currencyCode International currency codes.
dayOfWeek The days of the week.
languageCode International language codes.
monthOfYear The months of the year.
timeZone International time zones.
yesNo The values yes and no.
Schema Type Name Description
address An international address.
date A date in the form YYYY-MM-DD.
dateTimeLocal A date time in the form YYYY-MM-DDTHHss+xx:xx. There must be a timezone component.
dateTimeUtc A date time in the form YYYY-MM-DDTHHssZ. There is no timezone component required.
emailAddress An email address.
float As per name.
geoJsonPoint A point on Earth.
geoJsonPolygon A region on Earth.
hugeString A string up to 4000 characters.
integer As per name.
ipv4 An IP address in IP v4 format.
ipv6 An IP address is iP v6 format.
jsonPointer A pointer into a json document.
longString A string up to 250 characters.
mediumString A string up to 50 characters.
money An amount of money.
negativeFloat As per name.
negativeFloatOrZero As per name.
negativeInteger As per name.
negativeIntegerOrZero As per name.
object Any object. It's better not to use this.
paymentCardNo A credit or debit card number.
positiveFloat As per name.
positiveFloatOrZero As per name.
positiveInteger As per name.
positiveIntegerOrZero As per name.
shortString A string up to 20 characters.
string A string.
telephoneNo An international telephone number.
time A time in the format HHss.
timestamp A unix timestamp.
uuid A unique identifier.
webAddress A url that is prefixed with either https or https.
what3words The what 3 words addressing system.

Installation

npm install jsonotron-core-field-types --save

Development

Code base adheres to the rules chosen by https://standardjs.com/. Code is formatted with 2 spaces.

Tests are written using Jest with 100% coverage.

npm test

Continuous Deployment

Any pushes or pull-requests on non-master branches will trigger the test runner. Any pushes to master will cause the library to be re-published.