-
Notifications
You must be signed in to change notification settings - Fork 1
Object
-
.$
object.$ will stock can be a EventTarget
Caution: You don't set any value in it.
.$ is mutable! -
._(want)
It's shorthand of Object.assign(this, want) and return this object it assigned you want.
Caution: you can only sets single argument.
If you want to set multi Object, (a)._(b)._(c)._ ...
If you set it that instance of EventTarget, this.$ have it. -
.__(PropertyDescriptors)
It's shorthand of Object.defineProperties(this, PropertyDescriptors) and return this object it defined properties. -
.de
It's shorthand of get this object's property descriptors Object. -
.keys
It's shorthand of get this object's keys Array. -
.length
It's shorthand of get this object's keys Array.length. -
({$: EventTarget}).on(eventType)
({$: EventTarget}).off(eventType)
If this.$ is EventTarget, this object has Method of handleEvent.
and can simulate listen event and methods inner this scope is constructions this
so you got a lexical scope this pointer.
you can set eventType String or Designed Array of eventType Strings
It like to work
this.$.addEventListener(eventType, this[eventType].bind(this));
this.$.removeEventListener(eventType, this[eventType].bind(this)); -
.each((v, k) => do something)
It's shorthand like for in loop about functional method -
.deep((v, k) => do something)
This object or array repeats to the tip of branched chain and do callback -
.deal
It's shorthand of gets new object set prototype of this object. -
.copy
It's shorthand of get this object's copy;
Caution: If this object's property refer other objects, it keep up refering. -
.clone
It's shorthand of get this object's deepest copy;
Caution: If this object's property refer other objects, it refer is changed copied objects. -
.map((v, k) => set return do something result)
It's shorthand like mapping functional method -
.mix((v, k) => set return do something result)
This object or array repeats to the tip of branched chain and it sets call back functions result. -
.json
It's shorthand gets JSON Strings. -
.oppo
If true, this.handleEvent do a event.preventDefault() -
.stop
If true, this.handleEvent do a event.stopPropagation -
.toArray
It's shorthand if this object looks like Array, Promote to Array it copyed -
.handleEvent
Caution! It isn't writable It's a few of core method of de.js
this.constructor.prototype has eventType property,
If It's function, call and do it.
If It's object, so object has a "type" property or event.data has a "type",
then reflecting inner methods call.