@nib/validation-methods

1.2.1 • Public • Published

validation-methods

Build Status

Various methods for validating objects

Installation

$ npm i @nib/validation-methods

API

var methods = require('validation-methods');
methods.required('foo'); // true
methods.equals(1,1); // true;
methods.email('foo@mail.com'); // true
methods.string(1); // false;
methods.number('string'); // false

Validating array contents

var validateSubsetOf = methods.isSubsetOf([1,2,3]);
validateSubsetOf([1]); // true
validateSubsetOf([1,3]); // true
validateSubsetOf([1,5]); // false

License

MIT

Package Sidebar

Install

npm i @nib/validation-methods

Weekly Downloads

5

Version

1.2.1

License

MIT

Last publish

Collaborators

  • nib-admin
  • aschofield-nib
  • ian.darroch
  • syed.husain
  • lauriejones
  • cmayson
  • ken-ky-wong
  • stribs
  • wng-services
  • eastwood
  • elias.tran.nib
  • fiona.wang
  • mattbourke
  • sameer-e-digio
  • nathan.ford-nib
  • narcher
  • tmcclenahan
  • samjwillis-nib
  • varindernib
  • tristancampbellmb
  • nib-nz-build
  • sarahyapnib
  • c.rhind
  • vaanim
  • tgoldthorpe-nib
  • akash.prakash
  • nib-build-agent
  • anandmampuzhakal
  • jackmennienib
  • dariasu
  • bennettsolnet
  • airfan
  • thomasc42
  • rovacsek
  • gnguyennib
  • tom.mok
  • shane-w
  • tbrown-nib
  • vicvinegar
  • oshan.kottege
  • xiaoxinghu
  • harshahr1994
  • rbowen006
  • seanw.nib
  • anishmat27
  • sean0x42
  • zander-mudbath
  • sbeliak-nib
  • stephen.wong
  • amir.rudd
  • c.lassen
  • dimi7ri
  • dmitrymatveev
  • vaishalibhakhar
  • alejop-mudbath
  • r3gm1
  • maraza1721
  • d-martin-nib
  • apnib
  • kieranjogrady
  • siyengar94
  • dsmitham
  • msikkema
  • johanjarvi
  • vivien_clifford_nib
  • brad.turner
  • amy.tait.nib
  • scottwalkerau
  • jnwest
  • s.hossain
  • billthomas-nib
  • mleontieff
  • alunarzewski
  • bendharvey
  • tjodzio-nib
  • tarantoj
  • tejaswikota
  • julie.li
  • pallavi.barna
  • danieltran-nib
  • mitchellharrold
  • damodaran
  • caleb.faith
  • connorpmcbride
  • kemila-nib
  • pmv-npm
  • dermotosullivannib
  • xunsavior
  • aiswaryarajendran
  • shirleyshao
  • chris.close.nib
  • dguilbert
  • blakehattingh
  • samreedy
  • anylyne
  • georgia.batson
  • johnpaulvaughan
  • georgia-batson
  • john.hartmann.nib
  • trentontws
  • juliexxvi
  • davetapsonnib
  • joshua.coleiro
  • williamgonzaleznib
  • amelialuwia
  • dluong.mud
  • rgstephens
  • daron.robinson
  • aadams-rasa
  • eddylj
  • chaulagainajeet
  • joshgermon-nib
  • parisa.heyd
  • bencoll
  • indira.ramachandra
  • s.bista
  • nnattawat
  • ash-tulett-nib
  • sylvia.zh
  • nathanpiper-nib
  • neon-inkblast
  • karlb_nz
  • saranya-nibtravel
  • sdarshy
  • darcymerrickmudbath
  • abilioh
  • smdabrar
  • terencesunendava
  • digio-shanefitzgerald
  • paul-neville-thompson
  • adamgonlag
  • zainab.saif
  • cooldesignluke
  • krut
  • daniel-nib
  • swaff-y
  • zi_choong
  • domcorso-nib
  • jbayer
  • sheren
  • jezz-jon
  • csfrank-nib
  • artem.shkumat
  • nathananstess.nib
  • steevtee
  • nadeeth-nib1
  • anandmenon
  • dlegaspi-nib
  • wstolp
  • brettalcorn
  • ts1654
  • davidvnib
  • nmaffioldnib
  • sumo_nib
  • mthamyeeznib
  • csol94
  • brodee
  • jmatas
  • nib-vish
  • reallandal
  • phil.a.hawkins
  • tkemp
  • rasberghout
  • kim-mckenna-endava
  • xhua026
  • sachin.patil79
  • sam-jacobson
  • dean-nib
  • nicknguyennib2
  • l.lourenco
  • fe_nib
  • satkaur
  • tom-endava
  • sobitha
  • paritoshdhebar_endava
  • nib-daniel
  • vinualwisnib
  • sanjaydholakiya.nibtravel
  • lguan
  • bradley.williams
  • sannat-digar
  • gaurijadhav
  • mgw114
  • alankirknibtravel
  • ruilunli
  • pkernaghan
  • adamwitanowski-nib
  • dominic-cheung-nib
  • thomas.austin.nib
  • luke.morrissey
  • yparulkar-nib
  • reddevilmancnpm