0.1.1 • Published 7 years ago

your-is-empty v0.1.1

Weekly downloads
44
License
MIT
Repository
github
Last release
7 years ago

your-is-empty

npm i your-is-empty

isEmpty(value)

  • value 待检查值。任意类型
  • return <boolean> 是否为空

判断是否为空

import isEmpty from 'your-is-empty'

isEmpty() // true
isEmpty(undefined) // true
isEmpty(null) // true
isEmpty('') // true
isEmpty(' ') // true
isEmpty({}) // true
isEmpty([]) // true
isEmpty(0) // false
0.1.1

7 years ago