0.7.22 • Published 3 years ago
wizzi-utils v0.7.22
wizzi-utils
Utility library for the wizzi factory.
Work still in progress
Availability of features will be announced
vfile - virtual file system
var vfile = require('wizzi-utils').vfile
vfileInst - create a virtual file system instance
var vfileInst = vfile(fsimpl)
fsimplObjectDefault: NodeJS fs object or fs-graceful if available.
vfileInst.read(path_string, options, callback)
path_stringoptionsObjectcallbackFunctionIf absent the call is sync. *errcontent
vfileInst.write(path_string, content, options, callback)
path_stringcontentStringoptionsObjectcallbackFunctionIf absent the call is sync. When the call is sync iffsimpldoes not implementreadFileSyncthrow Error.errcontent
vfileInst.readJSON(path_string, options, callback)
vfileInst.writeJSON(path_string, obj, options, callback)
The fsimpl - interface
stat(path, callback)
statSync(path)
lstat(path, callback)
lstatSync(path)
readFile(path, options, callback)
readFileSync(path, options)
writeFile(path, content, options, callback)
writeFileSync(path, content, options)
readdir(path, options, callback)
readdirSync(path, options)
mkdir(path, options, callback)
mkdirSync(path, options)
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)
valueStringIf@@nullreturn null; if@@undefinedreturn undefined.typeStringOne-of string, integer, float, boolean, dateoptionsObject
verify.canConvertTo(value, type)
valueStringtypeStringOne-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)
folderScanner - ittf documents folder scanner
var folderScanner = require('wizzi-utils').folderScanner
folderScanner.scan(folderPath, options)
folderPathurioptionsObject- returns the root IttfFsNode of the 'folderPath' with its descendant folders as children.
ittfDocumentGraph - enhanced mTree with import, export, analize capabilities
var ittfDocumentGraph = require('wizzi-utils').ittfDocumentGraph
ittfDocumentGraph.loadFrom(path_string)
path_stringuriThe uri of the ittf document that will be loaded as is (no composition, non template evaluation)- returns an ittfDocumentGraph instance
ittfDocumentGraph.loadFrom(mTree)
mTreeObjectAn existent final or partial mTree.- returns an ittfDocumentGraph instance
ittfHtmlPrettifier - ittf html formatter for documentation
var ittfHtmlPrettifier = require('wizzi-utils').ittfHtmlPrettifier
ittfHtmlPrettifier(rootNode, options)
rootNodeObjectittfDocumentGraph instanceoptionsObject
jsHtmlPrettifier - javascript html formatter for documentation
var jsHtmlPrettifier = require('wizzi-utils').jsHtmlPrettifier
jsHtmlPrettifier(script, options)
scriptStringjavascript codeoptionsObject
Ittf scanner Feature
var ittfScanner = require('wizzi-utils').ittfScanner
Ittf graph Feature
var ittfGraph = require('wizzi-utils').ittfGraph
Filesystem Feature
var fSystem = require('wizzi-utils').fSystem
Prettify Feature
var pretty = require('wizzi-utils').pretty
Lorem ipsum Feature
var lorem = require('wizzi-utils').lorem
Crypto Feature
var crypto = require('wizzi-utils').crypto
Helpers Feature
var helpers = require('wizzi-utils').helpers
Wizzi
One machinery, many productions.
Built With
License
0.7.22
3 years ago
0.7.21
3 years ago
0.7.20
3 years ago
0.7.19
3 years ago
0.7.18
3 years ago
0.7.15
3 years ago
0.7.17
3 years ago
0.7.16
3 years ago
0.7.14
4 years ago
0.7.13
4 years ago
0.7.12
5 years ago
0.7.11
5 years ago
0.7.10
5 years ago
0.7.9
5 years ago
0.7.8
5 years ago
0.7.7
5 years ago
0.7.6
6 years ago
0.7.5
6 years ago
0.7.4
6 years ago
0.7.3
7 years ago
0.7.2
7 years ago
0.7.1
7 years ago
0.6.16
7 years ago
0.6.14
7 years ago
0.6.10
7 years ago
0.6.8
7 years ago
0.6.6
7 years ago
0.6.3
7 years ago
0.6.2
7 years ago
0.6.1
7 years ago
0.5.4
7 years ago
0.5.3
7 years ago
0.5.2
7 years ago
0.5.1
7 years ago
0.4.2
7 years ago
0.4.1
8 years ago