react-utils-elib
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

NPM NPM License

React Utils Elib

A collection of utility functions. These utility function focus primarily on frontend code but some have backend related utility functions as well. Includes helper functions for react application development and testing. Refer bellow for full list of utilities the library provides

Features

  • 🔮 Typescript

    Written in typescript so you get the advantage of strong type safety

Installation

Install react-utils-elib with npm or yarn

    npm i react-utils-elib
    # or
    yarn add react-utils-elib

CodeSandbox

Refer to this CodeSandbox for usage reference.

Utils

Exhaustive list of utility functions included in this library

  • getUserAgentBrowser
  • useAgentBrowser
  • detectBrowser
  • getUserAgentOS
  • detectOS
  • detectDeviceType
  • detectTouch
  • isValidURL
  • isValidEmail
  • getNextItemFromSearch
  • getNextIndex
  • getPrevIndex
  • addItem
  • removeIndex
  • removeItem
  • getPrevItem
  • getLastItem
  • getNextItem
  • serializeJSON
  • deserializeJSON
  • isNumber
  • isNotNumber
  • isNumeric
  • isArray
  • isEmptyArray
  • isFunction
  • isDefined
  • isUndefined
  • isObject
  • isEmptyObject
  • isNotEmptyObject
  • isNull
  • isString
  • isCSSVar
  • isEmpty
  • isRefObject
  • isInputEvent
  • isElement
  • isHTMLElement
  • getOwnerWindow
  • getOwnerDocument
  • getEventWindow
  • canUseDOM
  • isBrowser
  • dataAttr
  • ariaAttr
  • cx
  • contains
  • addDomEvent
  • normalizeEventKey
  • getRelatedTarget
  • isRightClick
  • runIfFn
  • callAllHandlers
  • callAll
  • compose
  • once
  • noop
  • warn
  • error
  • pipe
  • isPoint
  • distance
  • toNumber
  • toPrecision
  • countDecimalPlaces
  • valueToPercent
  • percentToValue
  • roundValueToStep
  • clampValue
  • omit
  • pick
  • split
  • get
  • memoize
  • memoizedGet
  • walkObject
  • objectFilter
  • filterUndefined
  • fromEntries
  • getCSSVar

Authors

portfolio linkedin twitter

License

MIT

Package Sidebar

Install

npm i react-utils-elib

Weekly Downloads

1

Version

0.0.6

License

MIT

Unpacked Size

247 kB

Total Files

16

Last publish

Collaborators

  • endalk200