1.0.6 • Published 7 years ago

@ycleptkellan/substantive v1.0.6

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

substantive

styled with prettier Build Status Coverage Status dependencies Status

Determine whether a given argument is both truthy and iterable.

[] and {} are truthy in JavaScript. By the same token, '0' is falsy. Etc...

Accounting for these idiosyncracies can be inconvenient, so this library provides a few simple helpers. E. g.

if (this.props.list && this.props.list.length) {
    // do something w/ list
}

becomes

if (substArr(this.props.list)) {
    // do something w/ list
}

Install

$ npm i (-D) @ycleptkellan/substantive

API

https://ycleptkellan.github.io/substantive/

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.0

7 years ago