ember-cli-array-limit
Ember CLI array limit addon.
ember-cli-array-limit
exposes an Ember ArrayProxy subclass
which returns only the content array items before a certain limit.
Example
;; var arr = Ember;var proxy = ArrayLimit; console; // ['a', 'b', 'c']proxy;console; // ['a', 'b', 'c', 'd']arr;console; // ['x', 'a', 'b', 'c']
Properties
content
: Ember.Array (optional, default = null
)
The content array. Must be an object that implements Ember.Array
and/or
Ember.MutableArray
. See Ember.ArrayProxy#content
.
limit
: Number (optional, default = Infinity
)
This value determines the maximum number of elements to allow.
Installing
With npm:
$ npm install --save-dev ember-cli-array-limit
Or with Ember CLI:
$ ember install ember-cli-array-limit