@mhio/check

0.2.2 • Public • Published

@mhio/check

Check JS variables types

API docco

Install

yarn add @mhio/check
npm i @mhio/check --save

Usage

import { Check } from '@mhio/check'
let checkFn = Check.generate({
  first_name: {
    label: "First Name",
    check: 'length',
    args: [ 1, 64 ],
  },
  last_name: {
    label: "Last Name",
    check: 'length',
    args: [ 1, 96 ],
  }
  size: {
    label: "Size",
    type: 'integer' 
  }
})
const some_data = {
  first_name: 'Jimmy',
  last_name: 'Stewart',
  size: 42,
}
fn(some_data)

Links

/@mhio/check/

    Package Sidebar

    Install

    npm i @mhio/check

    Weekly Downloads

    0

    Version

    0.2.2

    License

    MIT

    Unpacked Size

    150 kB

    Total Files

    22

    Last publish

    Collaborators

    • mhio