Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
init() {
this._super(...arguments);
let user = {
firstName: 'stefan',
email: 'example@example.com'
};
let buffer = BufferedProxy.create({
content: user
});
this.setProperties({
buffer: buffer,
user: user
});
},
resource: Ember.computed('post', function() {
return BufferedProxy.create({ content: this.get('post') });
}).readOnly(),
import BufferedProxy from 'ember-buffered-proxy/proxy';
const TodosProxy = BufferedProxy.extend();
TodosProxy.reopenClass({
initialState() {
return {
content: this.get('todo')
};
}
});
export default TodosProxy;
get buffer() {
return BufferedProxy.create({
content: this.link,
});
}
resource: Ember.computed('post', function() {
return BufferedProxy.create({ content: this.get('post') });
}).readOnly(),
get buffer() {
return BufferedProxy.create({
content: this.get('link'),
});
}
didReceiveAttrs() {
this._super(...arguments);
let startingValues = this.getAttr('startingValues') || {};
let formValues = BufferedProxy.create({content: startingValues});
this.set('formValues', formValues);
},
buffered: computed(property, function () {
return BufferedProxy.create({
content: this.get(property),
});
}),
bufferedModel: computed('model', function() {
let owner = getOwner(this).ownerInjection();
return BufferedProxy.extend(Server.validationClass).create(owner, { content: this.model });
}),