2.0.0 • Published 3 years ago

@rowansays/helpers v2.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

Rowan's JavaScript Helpers

Library of pure JavaScript filters and predicates. This library is available via node package manager and may be installed by using the following command:

npm i @rowansays/helpers

License: MIT npm version install size JavaScript Style Guide

Functions

castArray()

  • clones existing arrays
  • converts Map, Set, and other iterables to arrays
  • optional filtering of allowed types
  • optional recursion

castString()

  • strings pass through unaltered
  • numbers are coerced to strings
  • an empty string is returned for everything else

castStringArray()

  • filter an array preserving all string values
  • numbers are coerced to strings
  • all other values are excluded from the array

isIterable()

  • returns true for all iterables

isIterableObject()

  • returns true for all iterables except strings
2.0.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago