github.com/jojicluka/consul-api@v1.4.5/ui-v2/lib/block-slots/addon/mixins/slots.js (about)

     1  import { computed, get } from '@ember/object';
     2  import { A } from '@ember/array';
     3  import Mixin from '@ember/object/mixin';
     4  export default Mixin.create({
     5    _slots: computed(function() {
     6      return A();
     7    }),
     8    _activateSlot(name) {
     9      get(this, '_slots').addObject(name);
    10    },
    11    _deactivateSlot(name) {
    12      get(this, '_slots').removeObject(name);
    13    },
    14    _isRegistered(name) {
    15      return get(this, '_slots').includes(name);
    16    },
    17  });