-
Notifications
You must be signed in to change notification settings - Fork 8
api
James edited this page Jun 24, 2017
·
6 revisions
- Chainable the core root interface with common symbol methods
- ChainedSet
- ChainedMap
- FactoryChain
- MergeChain
- MethodChain
- compose
- merge
- clean
- is
- traverse
-
default
: (also as.Chain
)- is a ChainedMap that contains all functionality created by using compose with default arguments
export declare class Chain extends ChainedMap implements Composed {
public traverse(useThis?: boolean | Traversable): ChainAble
// ---- transformchain ---
// stored in .meta
public transform(key: Primitive, value: any): ChainAble
// remaps a key from 1 to another
public remap(from: string | Obj | Primitive, to: string | Obj | Primitive): ChainAble
// returns traverser using this.entries()
public traverse(useThis?: boolean): TraverseChain
// returns traverser using obj
public traverse(obj: Traversable): TraverseChain
// --- shorthandchain ---
// sets a value only when .has is false
public setIfEmpty(name: Primitive, value: any): ChainAble
// .return(anyValue)
public return(value: any): any
// wrap a function, call it, return this
public wrap(fn: Fn): ChainAble
// special property in .meta
public debug(should?: boolean): ChainAble
// --- observechain ---
// stored in .meta
public observe(properties: strings, fn: FnArgIsObj): ChainAble
// --- dotpropchain ---
// disables dot-prop in .set, .has, .get, .delete
public dot(enabled: boolean): ChainAble
}
'merge', 'compose', 'clean', 'is', 'traverse', 'camelCase', 'toArr', 'dot', 'matcher', 'eq', 'reduce', 'meta', 'validators',
all exports are also available as modular imports
import ChainedMap from 'chain-able/ChainedMap'