@zerfo/utils
v0.4.0
Published
Fast, small and purely functional utility library
Downloads
9
Maintainers
Readme
Zerfo Utils
Fast, small and purely functional utility library
Install
npm
$ npm install @zerfo/utils
yarn
$ yarn add @zerfo/utils
Features
- Fast
- Small
- Fully tested
- Documented
- Purely functional
- Modern codebase
Functions of the library
- capitalize - Returns the capitalized version of a string.
- formatSum - Returns the formatted value.
- formatSum - Сhecks the userAgent of the user's browser and returns the platform used.
- isArray - Checks if
test
is array. - isBoolean - Checks if
test
is boolean. - isEmpty - Checks if
test
is empty. - isEqual - Returns
true
if its arguments are equivalent,false
otherwise. - isFunction - Checks if
test
is function. - isNil - Checks if
test
is nil (null or undefined). - isNumber - Checks if
test
is number. - isObject - Checks if
test
is object. - isPalindrome - Checks if given
str
is a palindrome. - isPromise - Checks if
test
is Promise. - isShallowEqual - Returns
true
if its arguments are equivalent is shallow equal terms,false
otherwise. - isStrictEqual - Returns
true
if its arguments are equivalent is same value zero terms,false
otherwise. - isString - Checks if
test
is string. - isUndefined - Checks if
test
isundefined
. - negate - Negates it is argument
- upperFirst - Converts the first character of string to upper case and returns the new string.
Benchmarks
$ npm run benchmark
Browser support
- Chrome >= 40
- Firefox >= 52
- Edge >= 14
- IE >= 11
- Safari >= 10
- iOS >= 10
- Android >= 4.4
Node support
- 6.4.0 and higher
Bundle size
| Library | Unpacked Size | | --- | --- | | lodash | 1.41 MB | | ramda | 1.17 MB | | @zerfo/utils | 35.5 kB |