0.8.2 • Published 1 month ago
@wizzi/helpers v0.8.2
@wizzi/helpers
Helpers library for the wizzi factory, required by the @wizzi/util package
Work still in progress
Availability of features will be announced
Wizzi internal package
This package is required by the @wizzi/util package only.
Features
verify - helper object
var verify = require('@wizzi/utils').verify
verify - type checks
verify.isDefined(item)
verify.isNullOrUndefined(item)
verify.isObject(item)
verify.isArray(item)
verify.isFunction(item)
verify.isNumber(item)
verify.isBoolean(item)
verify.isDate(item)
verify.isString(item)
verify.isEmpty(item)
verify.isNotEmpty(item)
verify.isPrimitive(item)
verify.isRegExp(item)
verify.isError(item)
verify.isAbsolutePath(item)
verify.isIttfMacro(item)
verify.convert(value, type, unquote)
* `value` `String` If `@@null` return null; if `@@undefined` return undefined.
* `type` `String` One-of string, integer, float, boolean, date
* `options` `Object`
verify.canConvertTo(value, type)
* `value` `String`
* `type` `String` One-of string, integer, float, boolean, date
verify - validations
verify.isEmail(value)
verify.isEmails(value)
verify.isMinLength(value, length)
verify.isMaxLength(value, length)
verify.isExactLength(value, length)
verify.isGreaterThan(value, test)
verify.isLessThan(value, test)
verify.isGreaterEqualThan(value, test)
verify.isLessEqualThan(value, test)
verify.isAlpha(value)
verify.isAlphaNumeric(value)
verify.isIp(value)
verify.isBase64(value)
verify.isUrl(value)
verify.isCreditCard(value)
verify.isGreaterThanDate(value, date)
verify.isLessThanDate(value, date)
verify.isGreaterEqualDate(value, date)
verify.isLessEqualDate(value, date)
verify - errors
verify.error(inner, message, [arg-1[, arg-2, arg-...]])
verify.fatal(err, code)
Wizzi
One machinery, many productions.
Built With
* [Nodejs](https://nodejs.org)
* [Wizzi](https://github.com/stfnbssl/wizzi)