@extra-array/is-empty
Version:
Checks is array is empty.
51 lines (37 loc) • 1.51 kB
Markdown
Checks is array is empty.
[:package:](https://www.npmjs.com/package/@extra-array/is-empty)
[:smiley_cat:](https://github.com/orgs/nodef/packages?repo_name=extra-array)
[:running:](https://npm.runkit.com/@extra-array/is-empty)
[:vhs:](https://asciinema.org/a/332077)
[:moon:](https://www.npmjs.com/package/@extra-array/is-empty.min)
[:scroll:](https://unpkg.com/@extra-array/is-empty/)
[:newspaper:](https://nodef.github.io/extra-array/)
[:blue_book:](https://github.com/nodef/extra-array/wiki/)
> Similar: [index], [indexRange], [size], [isEmpty].
> This is part of package [extra-array].
[extra-array]: https://www.npmjs.com/package/extra-array
<br>
```javascript
array.isEmpty(x);
// x: an array
```
```javascript
const array = require("extra-array");
var x = [1, 2, 3];
array.isEmpty(x);
// false
var x = [];
array.isEmpty(x);
// true
```
<br>
<br>
## References
- [Data.List.null: Haskell](https://hackage.haskell.org/package/base-4.14.0.0/docs/Data-List.html#v:null)
- [List.isEmpty: elm](https://package.elm-lang.org/packages/elm/core/latest/List#isEmpty)
- [Array.length: MDN web docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length)
- [Array.isEmpty: sugarjs](https://sugarjs.com/docs/#/Array/isEmpty)
[index]: https://github.com/nodef/extra-array/wiki/index
[indexRange]: https://github.com/nodef/extra-array/wiki/indexRange
[size]: https://github.com/nodef/extra-array/wiki/size
[isEmpty]: https://github.com/nodef/extra-array/wiki/isEmpty