Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-05-06 14:37:46 +03:00
parent deb68e8651
commit 9af75efc8f

View File

@ -423,6 +423,8 @@ var myArray = object.Constructor('myArray', Array, {
## Components
### `sources(..)`
Get sources for attribute
```
sources(<object>, <name>)
@ -431,6 +433,8 @@ sources(<object>, <name>, <callback>)
```
### `parent(..)`
Get parent attribute value or method
```
parent(<prototype>, <name>)
@ -448,6 +452,9 @@ to the same method under the same name, `parent(..)` can't distinguish
between these references and will always return the second one._
### `parentProperty(..)`
Get parent property descriptor
```
@ -457,6 +464,8 @@ parentProperty(<prototype>, <name>)
```
### `parentCall(..)`
Get parent method and call it
```
parentCall(<prototype>, <name>, <this>)
@ -469,13 +478,26 @@ parentCall(<method>, <this>)
```
### `mixin(..)`
Mixin objects into a prototype chain
```
mixin(<root>, <object>, ..)
-> <object>
-> <root>
```
### `mixout(..)`
Mix objects out of a prototype chain
```
mixout(<root>, <object>, ..)
-> <root>
```
### `mixinFlat(..)`
Mixin contents of objects into one
```
mixinFlat(<root>, <object>, ..)
@ -485,6 +507,8 @@ This is like `Object.assign(..)` but copies property objects rather than
property values.
### `makeRawInstance(..)`
Make a raw (un-initialized) instance
```
makeRawInstance(<context>, <constructor>, ..)
@ -505,6 +529,8 @@ makeRawInstance(<context>, <constructor>, ..)
A shorthand to this is `Constructor.__rawinstance__(context, ..)`.
### `Constructor(..)`
Define an object constructor
```
Constructor(<name>)
@ -528,6 +554,8 @@ The resulting _constructor_ function when called will:
- call instance's `.__init__(..)` if present.
### `C(..)`
Shorthand to `Constructor(..)`
```
C(<name>, ..)