2.2.1 • Published 4 years ago
basic-utils v2.2.1
basic-utils
Basic JS utils module
API
Type checking returns boolean
- isObj
- isString
- isArray
- isDate
- isRegex
- isFunction
- isNumber
- isNan
- isUndefined
- isNull
- isObjectID
- isIp
- isIp4
- isIp6
- isMac
- isFQDN
- isInt8
- isUint8
- isInt16
- isUint16
- isInt32
- isUnint32
- isAscii
- isError
- isRegexString
- isDateString
- isAlpha
- isNumeric
- isAlphaNumeric
Utils
iterateObj
- prints object key pairs with a tilde delimiter
format
- formats a string
deepFreeze
- returns a recursive frozen object
serialize
- Returns either an error object or a json serialized string
deserialize
- Returns either an error object or a js object deserialized from a json string
omit
- Returns a filtered obj based on one or more keys to omit
clone
- Returns a clone object, only functions remain copied by reference
merge
- Returns a merged object from source and target, source object is destructively merged
applyToDefaults
- Returns a merged object from source and target, source object is non-destructively merged
FileSystem
isDir
- Returns boolean if directory exists
isFile
- Returns boolean if file exists
rmDirSync
- recursively deletes a directory sync
rmDir
- recursively deletes a directory async
mkDirSync
- recursively makes directory sync
mkDir
- recursively makes directory async
Todo
- improve docs
- add more tests
2.2.1
4 years ago
2.2.0
6 years ago
2.1.2
7 years ago
2.1.1
7 years ago
2.1.0
7 years ago
2.0.1
8 years ago
2.0.0
8 years ago
1.7.4
9 years ago
1.7.3
9 years ago
1.7.1
9 years ago
1.7.0
9 years ago
1.6.2
9 years ago
1.6.1
9 years ago
1.6.0
9 years ago
1.5.4
9 years ago
1.5.2
10 years ago
1.5.1
10 years ago
1.5.0
10 years ago
1.4.0
10 years ago
1.3.0
10 years ago
1.2.0
10 years ago
1.1.0
10 years ago
1.0.0
10 years ago
0.0.1
10 years ago