Skip to content
/ utils Public

Fast, small and purely functional utility library

License

Notifications You must be signed in to change notification settings

Zerfo/utils

Repository files navigation

Zerfo Utils NPM Version NPM License Coverage Status

Fast, small and purely functional utility library

Install

npm
$ npm install @zerfo/utils

yarn
$ yarn add @zerfo/utils

Features

Functions of the library

  • capitalize - Returns the capitalized version of a string.
  • formatSum - Returns the formatted value.
  • getUserPlatform - С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 is undefined.
  • negate - Negates it is argument
  • upperFirst - Converts the first character of string to upper case and returns the new string.

Benchmarks

$ npm run benchmark

Banchmark results

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