@loadsmart/utils-function
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

utils-function

useful functions for handling functions.

Install via NPM

$ npm i @loadsmart/utils-function --save

Install via yarn

$ yarn add @loadsmart/utils-function

Usage

import React from 'react'
import { isFunction } from '@loadsmart/utils-function'

export default ({ onClick }) => {
  const onClickHandler = isFunction(onClick) ? onClick : null

  return (
    <button type="button" onClick={onClickHandler}>
      Do something
    </button>
  )
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.3.1
    32
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.3.1
    32
  • 0.3.0
    0
  • 0.2.0
    0

Package Sidebar

Install

npm i @loadsmart/utils-function

Weekly Downloads

32

Version

0.3.1

License

MIT

Unpacked Size

5.68 kB

Total Files

15

Last publish

Collaborators

  • bruno.manzo
  • felipe.asantos
  • giovannitoledo
  • douglasklein2
  • luiz.loadsmart
  • mwconceicao
  • yidi0912
  • lenoir.zamboni
  • diogomafra
  • oliver.tso
  • loadsmart-frontend
  • brennervaz
  • raittes
  • welingtonms-loadsmart
  • gutofoletto