![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
ember-buffered-proxy
Advanced tools
An Ember Object Proxy (and mixin) the enables change buffering. Ever need to "hold back" property changes before they propagate? If so this may be the project for you.
ember install ember-buffered-proxy
import BufferedProxy from 'ember-buffered-proxy/proxy';
var content = {
firstName: 'stefan'
};
var buffer = BufferedProxy.create({
content: content
});
buffer.get('firstName'); // => 'stefan'
buffer.set('firstName', 'Kris');
buffer.get('firstName'); // => 'Kris'
buffer.get('content.firstName'); // => 'stefan'
buffer.get('hasChanges'); // => true
buffer.buffer; // => (get an object describing changed keys) -- {"firstName": "Kris"}
buffer.applyBufferedChanges();
buffer.get('firstName'); // => 'Kris'
buffer.get('content.firstName'); // => 'Kris'
buffer.get('hasChanges'); // => false
buffer.set('firstName', 'Luke');
buffer.get('firstName'); // => 'Luke'
buffer.get('content.firstName'); // => 'Kris'
buffer.hasChanged('firstName'); // => true
buffer.discardBufferedChanges();
buffer.get('firstName'); // => 'Kris'
buffer.get('content.firstName'); // => 'Kris'
buffer.hasChanged('firstName'); // => false
// Below demonstrates that applyBufferedChanges and discardBufferedChanges
// can take an optional array of keys.
buffer.set('email', 'example@example.com');
buffer.get('email'); // => 'example@example.com'
buffer.get('content.email'); // => undefined
buffer.set('address', '123 paradise road');
buffer.get('address'); // => '123 paradise road'
buffer.get('content.address'); // => undefined
buffer.applyBufferedChanges(['email']); // Only apply the email from the buffer
buffer.get('email'); // => 'example@example.com'
buffer.get('address'); // => '123 paradise road'
buffer.get('content.email'); // => 'example@example.com'
buffer.get('content.address'); // => undefined
buffer.setProperties({
email: 'sample@sample.com',
address: '1717 rose street'
});
buffer.discardBufferedChanges(['address']); // Discard only the address property from the buffer
buffer.get('email'); // => sample@sample.com
buffer.get('address'); // => undefined
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 BufferedMixin from 'ember-buffered-proxy/mixin';
var content = {
firstName: 'stefan'
};
var buffer = ObjectProxy.extend(BufferedMixin).create({
content: content
});
// same as above
git clone
this repositoryyarn install
bower install
ember server
ember test
ember test --server
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.
v0.8.1 (2017-11-29)
Merged pull requests:
FAQs
An Ember Object Proxy with change buffering
The npm package ember-buffered-proxy receives a total of 6,497 weekly downloads. As such, ember-buffered-proxy popularity was classified as popular.
We found that ember-buffered-proxy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.