Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 1.06 KB

File metadata and controls

24 lines (16 loc) · 1.06 KB

Module: lib.array

README -> API Index -> Modules Index -> lib.array

Source: src/lib/array.js

Array coercion and manipulation helpers for list normalization workflows.

Exported Functions

  • append - Wrap each item in input with a prefix and postfix.
  • subtract - Return a copy of list with all values in exclude removed.
  • trim - Normalize a value into an array and trim whitespace from string elements.
  • is - Check whether a value is an Array.
  • to - Coerce any input into an array.
  • len - Return array length, or 0 if not an array.
  • filterStrings - Normalize an input into an array of non-empty strings.

Related