ember-buffered-array-proxy
An Ember Array Proxy (and mixin) the enables change buffering. Ever need to "hold back" array changes before they propagate? If so this may be the project for you.
This project follows similar API structure as ember-buffered-proxy.
Usage
ember install ember-buffered-array-proxy
; const content = 'A' ;const buffer = BufferedArrayProxy; buffer; // => 'A'buffer; buffer; // => 'B'buffer; // => ['A', 'B'] buffer; // => truebuffer; // => (get an object describing the changes) -- { added: ['B'], removed: [] } buffer; buffer; // => ['A', 'B']content; // => ['A', 'B']buffer; // => false buffer;buffer; // => { added: [], removed: ['A'] }buffer; // => true buffer; buffer; // => ['A', 'B']content; // => ['A', 'B']buffer; // => false
You can also use these shorter method names
buffer; // equivalent to buffer.discardBufferedChanges()buffer; // equivalent to buffer.applyBufferedChanges()
Or you can grab the mixin directly
; const content = 'A'const buffer = ArrayProxy; // same as above