How to use n4s - 1 common examples

To help you get started, we’ve selected a few n4s examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fiverr / passable / src / index.js View on Github external
import enforce from 'n4s/dist/enforce.min';
import any from 'anyone/any';
import passable from './core/passable';
import draft from './core/draft';
import test from './core/test';
import validate from './utilities/validate';
import { singleton } from './lib';
import { WARN, FAIL, VERSION } from './constants';

passable.VERSION = VERSION;
passable.enforce = enforce;
passable.draft = draft;
passable.Enforce = enforce.Enforce;
passable.test = test;
passable.validate = validate;
passable.any = any;
passable.WARN = WARN;
passable.FAIL = FAIL;

singleton.register(passable);

export default passable;

n4s

Assertion library for form validations

MIT
Latest version published 15 days ago

Package Health Score

83 / 100
Full package analysis

Popular n4s functions