Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
ember-buffered-array-proxy
Advanced tools
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.
ember install ember-buffered-array-proxy
import BufferedArrayProxy from 'ember-buffered-array-proxy/proxy';
const content = [ 'A' ];
const buffer = BufferedArrayProxy.create({ content });
buffer.get('firstObject'); // => 'A'
buffer.addObject('B');
buffer.objectAt(1); // => 'B'
buffer.toArray(); // => ['A', 'B']
buffer.get('hasChanges'); // => true
buffer.get('changes'); // => (get an object describing the changes) -- { added: ['B'], removed: [] }
buffer.applyBufferedChanges();
buffer.toArray(); // => ['A', 'B']
content.toArray(); // => ['A', 'B']
buffer.get('hasChanges'); // => false
buffer.removeObject('A');
buffer.get('changes'); // => { added: [], removed: ['A'] }
buffer.hasChanged(); // => true
buffer.discardBufferedChanges();
buffer.toArray(); // => ['A', 'B']
content.toArray(); // => ['A', 'B']
buffer.hasChanged(); // => false
You can also use these shorter method names
buffer.discardChanges(); // equivalent to buffer.discardBufferedChanges()
buffer.applyChanges(); // equivalent to buffer.applyBufferedChanges()
Or you can grab the mixin directly
import BufferedArrayMixin from 'ember-buffered-array-proxy/mixin';
const content = ['A']
const buffer = ArrayProxy.extend(BufferedArrayMixin).create({ content });
// same as above
0.1.0
FAQs
An Ember Array Proxy the enables change buffering
The npm package ember-buffered-array-proxy receives a total of 21 weekly downloads. As such, ember-buffered-array-proxy popularity was classified as not popular.
We found that ember-buffered-array-proxy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.