1.0.1 • Published 7 years ago

enhanced-parameter v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

enhanced-parameter

Standard - JavaScript Style Guide Dependency Status DevDependency Status NPM Downloads Travis Build Status

Enhanced parameter.

Wrapped node-modules / parameter with additional rules, read node-modules / parameter for more.

Install

$ npm install enhanced-parameter

Usage

const parameter = require('enhanced-parameter')()

const rule = {
  datetime: 'iso8601DateTime'
}

const data = {
  datetime: '2017-02-22T22:00:00Z'
}

const errors = parameter.validate(rule, data)

Addtional Rules

iso8601Datetime / iso8601Datetime

Check valid datetime in ISO8601 format between 1000 and 9999. ISO8601_DATETIME_TYPE_RE


1.0.1

7 years ago

1.0.0

7 years ago