Skip to content

Instantly share code, notes, and snippets.

@rogatty
Last active December 19, 2017 16:12
Show Gist options
  • Save rogatty/ce22f533c25c41f3f24d633deb3f2e12 to your computer and use it in GitHub Desktop.
Save rogatty/ce22f533c25c41f3f24d633deb3f2e12 to your computer and use it in GitHub Desktop.
Ember.A().slice() without Array prototype extended
import Ember from 'ember';
export default Ember.Controller.extend({
afterSlice: Ember.computed(function () {
return typeof(Ember.A().slice().setEach);
}),
afterFilterBy: Ember.computed(function () {
return typeof(Ember.A().filterBy(() => true).setEach);
}),
});
afterSlice: {{afterSlice}}<br>
afterFilterBy: {{afterFilterBy}}
{
"version": "0.12.1",
"EmberENV": {
"EXTEND_PROTOTYPES": {
"Array": false
},
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.17.0",
"ember-template-compiler": "2.17.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment