ember-array-fns

1.4.2 • Public • Published

ember-array-fns npm version Build Status codecov

This addon provides array helpers for Ember templates and components.

To install:

ember install ember-array-fns

Usage

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

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.

Readme

Keywords

Package Sidebar

Install

npm i ember-array-fns

Weekly Downloads

295

Version

1.4.2

License

MIT

Unpacked Size

22.4 kB

Total Files

46

Last publish

Collaborators

  • robert.allan.frank