Skip to content
Noboru Okazaki edited this page Aug 5, 2017 · 3 revisions

de

de is juicy object

"de[methos]" is using it Example.

  • de.al(setPrototypeOf, PropertyDescriptors)
    Object.create shorthand
  • de.fine(Any, PropertyDescriptors)
    Object.defineProperties shorthand
  • de.tail(Any)
    Object.getOwnPropertyDescriptors shorthand

And Property Descriptor's setting be easly.

  • de.configurable(Object) and de._(Object)
    return Allow configurable Descriptor was assigned Object
  • de.enumerable(Object)
    return Allow configurable and enumerable Descriptor was assigned Object
  • de.writable(Object)
    return Allow configurable and writable Descriptor was assigned Object
  • de.all(Object) return Allow all Descriptor was assigned Object
//example
de.fine({}, {
    foo: de.writable({
        value: 0
    }),
    bar: de._({
        get () {
           this.foo + 5;
        }
        set (v) {
           this.foo = v + 10;
           return true;
        }
    })
})

Foundation

Browser

Clone this wiki locally