ember-array-fns
v1.4.2
Published
This addon provides array helpers for Ember templates and components.
Downloads
4,605
Readme
ember-array-fns
This addon provides array helpers for Ember templates and components.
To install:
ember install ember-array-fns
Usage
array-concat
array-every
array-filter
array-find
array-find-index
array-includes
array-index-of
array-is-array
array-is-first-element
array-is-last-element
array-join
array-last-index-of
array-map
array-reduce
array-reverse
array-slice
array-some
array-sort
array-splice
array-concat
Perform concatenation of two or more arrays. See Array.concat() for details on the Array.concat function.
{{array-concat array1 array2 array3}}
array-every
Perform every of array by function. See Array.every() for details on the Array.every function.
{{array-every array fn}}
array-filter
Perform filter of array by function. See Array.filter() for details on the Array.filter function.
{{array-filter array fn}}
array-find
Perform find of array by function. See Array.find() for details on the Array.find function.
{{array-find array fn}}
array-find-index
Perform find of array by function returning the index of the found element. See Array.findIndex() for details on the Array.findIndex function.
{{array-find-index array fn}}
array-includes
Determine if item is in array. See Array.includes() for details on the Array.includes function.
{{array-includes array 'a'}}
array-indexOf
Locate first index of element in array. See Array.indexOf() for details on the Array.indexOf function.
{{array-index-of array 'a'}}
array-is-array
Determine if value is an array. See isArray() for details on the isArray function.
{{array-is-array array}}
array-is-first-element
Returns true if element is first within the array.
{{array-is-first-element array element}}
array-is-last-element
Returns true if element is last within the array.
{{array-is-last-element array element}}
array-join
Join an array by a string delimiter. See Array.join() for details on the Array.join function.
{{array-join array '-'}}
array-last-index-of
Locate last index of element in array. See Array.lastIndexOf() for details on the Array.lastIndexOf function.
{{array-last-index-of array 'a'}}
array-map
Perform map of array by function. See Array.map() for details on the Array.map function.
{{array-map array fn}}
array-reduce
Perform reduce of array by function. See Array.reduce() for details on the Array.reduce function.
{{array-reduce array fn accumulator}}
array-reverse
Perform reverse of array. See Array.reverse() for details on the Array.reverse function.
{{array-reverse array}}
array-slice
Perform slice of array. See Array.slice() for details on the Array.slice function.
{{array-slice array 2 4}}
array-some
Perform some of array by function. See Array.some() for details on the Array.some function.
{{array-some array fn}}
array-sort
Perform sort of array by function. See Array.sort() for details on the Array.sort function.
{{array-sort array fn}}
array-splice
Perform splice of array. See Array.splice() for details on the Array.splice function.
{{array-splice array 1 0 'February'}}
Related Addons
- See ember-datetime-fns for date and time based helpers.
- See ember-intl-fns for internationalization based helpers.
- See ember-logic-fns for logical based helpers.
- See ember-math-fns for math based helpers.
- See ember-number-fns for number based helpers.
- See ember-string-fns for string based helpers.
Compatibility
- Ember.js v3.4 or above
- Ember CLI v2.13 or above
- Node.js v8 or above
Contributing
See the Contributing guide for details.
License
This project is licensed under the MIT License.