Protean
An ever changing set of utilities.
Summary
Installation
% npm install protean
API
Modules ## Classes
- CollectionSource ⇐
ProteanClass
- CompositeSource ⇐
ProteanClass
- JSONGraphEnvelopeProxy ⇐
ProteanClass
- NoCacheSource ⇐
ProteanClass
- PartitionedSource ⇐
ProteanClass
- ProxiedSource ⇐
ProteanClass
- StorageSource ⇐
ProteanClass
- ProteanClass :
function
- Storage ⇐
ProteanClass
- Store ⇐
ProteanClass
- Collection ⇐
ProteanClass
- FiniteStateMachine ⇐
Subject
- LinkedList ⇐
ProteanClass
- Record ⇐
ProteanClass
- onNextFunction :
function
- onErrorFunction :
function
- onCompletedFunction :
function
- Observable
- Observer
- Disposable
- Subject ⇐
Observable
- DataSource
- Sentinel :
Object
- Reference :
Sentinel
- RootReference :
Reference
- Atom :
Sentinel
- JSONEnvelope :
Object
- JSONGraph :
Object
- JSONGraphEnvelope :
Object
- Key :
String
|null
- KeySet :
Key
|Range
|Array.<(Key|Range)>
- Path :
Array.<Key>
- PathSet :
Array.<KeySet>
- PathValue :
Object
- Range :
Object
- Protean
- .Rx
- .append ⇒
Observable.<String>
- .mv ⇒
Observable.<String>
- .fsWrapper ⇒
function
- .write ⇒
Observable.<String>
- .from(arg) ⇒
Observable
- .cp(from, to, [opts]) ⇒
Observable.<fs.Stats>
- .glob(pattern, [opts]) ⇒
Observable.<String>
- .isDirectory(paths) ⇒
Observable.<Boolean>
- .isFile(paths) ⇒
Observable.<Boolean>
- .mkdir(paths, [opts]) ⇒
Observable.<String>
- .read(patterns, [enc]) ⇒
Observable.<(String|Buffer)>
- .rm(patterns, [recursive]) ⇒
Observable.<String>
- .stat(patterns) ⇒
Observable.<external:fs.Stats>
- .link(patterns) ⇒
Observable.<external:fs.Stats>
- .fd(fds) ⇒
Observable.<external:fs.Stats>
- .link(patterns) ⇒
- .append ⇒
- .denominate ⇒
Object
- .invoke ⇒
*
- .pluck ⇒
*
|function
- .classnames(arg) ⇒
String
- .classify([subclass], props, [properties]) ⇒
ProteanClass
- .inherit(superclass, [subclass], [props], [properties]) ⇒
ProteanClass
- .instantiate(fn, [args]) ⇒
Object
- .augment(...obj) ⇒
Object
- .enmap(...args) ⇒
Object
- .enumerate() ⇒
Object
- .traverse(obj, visitor, [post])
- static
- inner
- ~visitorFn(path, value, context) ⇒
undefined
|String
- ~visitorFn(path, value, context) ⇒
- .guid() ⇒
String
- .mergeExports(receiver, supplier) ⇒
Object
- .Rx
Protean.Rx
Kind: static property of Protean
- .Rx
- .append ⇒
Observable.<String>
- .mv ⇒
Observable.<String>
- .fsWrapper ⇒
function
- .write ⇒
Observable.<String>
- .from(arg) ⇒
Observable
- .cp(from, to, [opts]) ⇒
Observable.<fs.Stats>
- .glob(pattern, [opts]) ⇒
Observable.<String>
- .isDirectory(paths) ⇒
Observable.<Boolean>
- .isFile(paths) ⇒
Observable.<Boolean>
- .mkdir(paths, [opts]) ⇒
Observable.<String>
- .read(patterns, [enc]) ⇒
Observable.<(String|Buffer)>
- .rm(patterns, [recursive]) ⇒
Observable.<String>
- .stat(patterns) ⇒
Observable.<external:fs.Stats>
- .link(patterns) ⇒
Observable.<external:fs.Stats>
- .fd(fds) ⇒
Observable.<external:fs.Stats>
- .link(patterns) ⇒
- .append ⇒
Observable.<String>
Rx.append ⇒ Kind: static property of Rx
Param | Type |
---|---|
filepath | String |
data | Buffer | String |
[opts] | Object | String |
Observable.<String>
Rx.mv ⇒ File: rx/fs/mv.js
Kind: static property of Rx
Param | Type | Default |
---|---|---|
from | String |
|
to | String |
|
opts | Object |
|
[opts.mkdirp] | Boolean |
false |
[opts.clobber] | Boolean |
false |
function
Rx.fsWrapper ⇒ Kind: static property of Rx
Param | Type |
---|---|
method | String |
Observable.<String>
Rx.write ⇒ Kind: static property of Rx
Param | Type |
---|---|
filepath | String |
data | Buffer | String |
[opts] | Object | String |
Observable
Rx.from(arg) ⇒ File: rx/from.js
Kind: static method of Rx
Param | Type |
---|---|
arg | Observable | Promise | Array | Object |
Observable.<fs.Stats>
Rx.cp(from, to, [opts]) ⇒ File: rx/fs/cp.js
Kind: static method of Rx
Param | Type | Default |
---|---|---|
from | String | Array.<String> | Observable.<String> | Promise.<String> |
|
to | String |
|
[opts] | Object |
|
[opts.recursive] | Boolean |
true |
[opts.force] | Boolean |
false |
Observable.<String>
Rx.glob(pattern, [opts]) ⇒ File: rx/glob.js
Kind: static method of Rx
Returns: Observable.<String>
- An Observable emiting the paths found
Param | Type | Description |
---|---|---|
pattern | String |
The glob pattern |
[opts] | Object |
https://github.com/isaacs/node-glob#options |
Observable.<Boolean>
Rx.isDirectory(paths) ⇒ File: rx/is-directory.js
Kind: static method of Rx
Returns: Observable.<Boolean>
- An Observable emiting the paths found
Param | Type |
---|---|
paths | String | Array.<String> | Observable.<String> |
Observable.<Boolean>
Rx.isFile(paths) ⇒ File: rx/is-file.js
Kind: static method of Rx
Param | Type |
---|---|
paths | String | Array.<String> | Observable.<String> |
Observable.<String>
Rx.mkdir(paths, [opts]) ⇒ Create the given paths in the file system.
File: rx/mkdir.js
Kind: static method of Rx
Param | Type | Default |
---|---|---|
paths | String | Array.<String> | Observable.<String> |
|
[opts] | Object |
|
[opts.mode] | String |
'0777' |
Observable.<(String|Buffer)>
Rx.read(patterns, [enc]) ⇒ File: rx/read.js
Kind: static method of Rx
Param | Type |
---|---|
patterns | String | Array.<String> | Observable.<String> | Promise.<String> |
[enc] | String |
Observable.<String>
Rx.rm(patterns, [recursive]) ⇒ File: rx/rm.js
Kind: static method of Rx
Param | Type | Default |
---|---|---|
patterns | String | Array.<String> | Observable.<String> | Promise.<String> |
|
[recursive] | Boolean |
true |
Observable.<external:fs.Stats>
Rx.stat(patterns) ⇒ File: rx/stat.js
Kind: static method of Rx
Returns: Observable.<external:fs.Stats>
- An Observable emiting the paths found
Param | Type |
---|---|
patterns | String | Array.<String> | Observable.<String> | Promise.<String> |
- .stat(patterns) ⇒
Observable.<external:fs.Stats>
- .link(patterns) ⇒
Observable.<external:fs.Stats>
- .fd(fds) ⇒
Observable.<external:fs.Stats>
- .link(patterns) ⇒
Observable.<external:fs.Stats>
stat.link(patterns) ⇒ Kind: static method of stat
Param | Type |
---|---|
patterns | String | Array.<String> | Observable.<String> | Promise.<String> |
Observable.<external:fs.Stats>
stat.fd(fds) ⇒ Kind: static method of stat
Param | Type |
---|---|
fds | Integer | Array.<Integer> | Observable.<Integer> | Promise.<Integer> |
Object
Protean.denominate ⇒ Kind: static property of Protean
Returns: Object
- The object now with a immutable 'name' property of the
given name value
Param | Type |
---|---|
obj | Object |
name | String |
*
Protean.invoke ⇒ Kind: static property of Protean
Param | Type |
---|---|
property | String |
subject | Object |
*
| function
Protean.pluck ⇒ File: object/pluck.js
Kind: static property of Protean
Param | Type |
---|---|
key | String |
[obj] | Object |
String
Protean.classnames(arg) ⇒ Utility function to get a className string.
Supply a list of strings, or objects with class names -> boolean indicating whether that class should be used. The returned string will contain all the class names indicated without duplicates, and separated by spaces.
File: dom/classnames.js
Kind: static method of Protean
Param | Type |
---|---|
arg | String | Object.<String, Boolean> |
ProteanClass
Protean.classify([subclass], props, [properties]) ⇒ Create a constructor function passing in it's prototype methods.
File: function/classify
Kind: static method of Protean
Param | Type | Description |
---|---|---|
[subclass] | function |
The subclass constructor function. |
props | Object |
Bare properties for the constructor's prototype. |
[properties] | Object |
Object.defineProperty property definitions. |
ProteanClass
Protean.inherit(superclass, [subclass], [props], [properties]) ⇒ Create a constructor function that inherits properties and methods from the given super constructor.
File: function/inherit.js
Kind: static method of Protean
Returns: ProteanClass
- The constructor function.
Param | Type | Default | Description |
---|---|---|---|
superclass | function |
The function to inherit from. | |
[subclass] | function |
Function |
The Subclass constructor function. If omitted, and a constructor property is not defined in props , defaults to a function that calls the superclass' constructor function. |
[props] | Object |
Bare properties to initialize the prototype with. | |
[properties] | Object |
{} |
Object.defineProperty property definitions. |
Object
Protean.instantiate(fn, [args]) ⇒ Create a new object and then apply the constructor function with the arguments.
File: function/instantiate.js
Kind: static method of Protean
Returns: Object
- The new instance
Param | Type | Description |
---|---|---|
fn | function |
The constructor function |
[args] | Array.<Mixed> |
Arguments to pass to the constructor function |
Object
Protean.augment(...obj) ⇒ Like 'extend', but it preserves getters and setters, and will not overwrite existing properties defined directly on the source object.
File: object/augment.js
Kind: static method of Protean
Param | Type |
---|---|
...obj | Object |
Object
Protean.enmap(...args) ⇒ Takes a list of alternating key/values and returns an object.
File: object/enmap.js
Kind: static method of Protean
Param | Type |
---|---|
...args | Mixed |
Object
Protean.enumerate() ⇒ Takes an argument list of strings and returns an object with those keys, and their values being the index of that key plus one.
File: object/enumerate.js
Kind: static method of Protean
Type |
---|
String |
Protean.traverse(obj, visitor, [post])
Kind: static method of Protean
Param | Type | Default | Description |
---|---|---|---|
obj | Object |
||
visitor | visitorFn |
||
[post] | Boolean |
false |
Do a post traversal |
- .traverse(obj, visitor, [post])
- static
- inner
- ~visitorFn(path, value, context) ⇒
undefined
|String
- ~visitorFn(path, value, context) ⇒
String
traverse.SKIP : Kind: static constant of traverse
String
traverse.CONTINUE : Kind: static constant of traverse
String
traverse.BREAK : Kind: static constant of traverse
undefined
| String
traverse~visitorFn(path, value, context) ⇒ File: object/traverse.js
Kind: inner method of traverse
Returns: undefined
| String
- One of the constants of 'skip', 'continue', or
'break'. Returning undefined is the same as returing 'continue'.
Param | Type | Description |
---|---|---|
path | Array.<String> |
The path to the value |
value | Mixed |
The value |
context | Object |
The original object |
String
Protean.guid() ⇒ Fast GUID generator, RFC4122 version 4 compliant.
File: utility/guid.js
Kind: static method of Protean
See: http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136
Author: Jeff Ward (jcward.com).
License: MIT license
Object
Protean.mergeExports(receiver, supplier) ⇒ File: utility/merge-exports.js
Kind: static method of Protean
Param | Type |
---|---|
receiver | Object |
supplier | function | Object |
Falcor
- Falcor
- .Graph
- .set ⇒
Object
- .atoms(graph, fn)
- .fromObject(obj, [opts]) ⇒
JSONGraph
- .isAtom(sentinel) ⇒
Boolean
- .isError(sentinel) ⇒
Boolean
- .isRef(sentinel) ⇒
Boolean
- .isRootRef(sentinel) ⇒
Boolean
- .isSentinel(sentinel) ⇒
Boolean
- .refs(graph, fn)
- .relative(root, graph) ⇒
JSONGraph
- .resolve(root, graph) ⇒
JSONGraph
- .rootRef(path, value, props) ⇒
Reference
- .sentinels(graph, fn)
- .toObject(graph, [opts]) ⇒
JSONGraph
- .set ⇒
- .Path
- .Graph
Falcor.Graph
File: falcor/graph.js
Kind: static property of Falcor
See: https://github.com/Netflix/falcor-json-graph
- .Graph
- .set ⇒
Object
- .atoms(graph, fn)
- .fromObject(obj, [opts]) ⇒
JSONGraph
- .isAtom(sentinel) ⇒
Boolean
- .isError(sentinel) ⇒
Boolean
- .isRef(sentinel) ⇒
Boolean
- .isRootRef(sentinel) ⇒
Boolean
- .isSentinel(sentinel) ⇒
Boolean
- .refs(graph, fn)
- .relative(root, graph) ⇒
JSONGraph
- .resolve(root, graph) ⇒
JSONGraph
- .rootRef(path, value, props) ⇒
Reference
- .sentinels(graph, fn)
- .toObject(graph, [opts]) ⇒
JSONGraph
- .set ⇒
Object
Graph.set ⇒ File: falcor/graph/set.js
Kind: static property of Graph
Param | Type |
---|---|
source | Object |
path | String | Array.<String> |
value | * |
Graph.atoms(graph, fn)
File: falcor/graph/atoms.js
Kind: static method of Graph
Param | Type |
---|---|
graph | JSONGraph |
fn | Graph.atoms~visitorFn |
atoms~visitorFn(path, atom, graph)
Kind: inner method of atoms
Param | Type |
---|---|
path | Path |
atom | Atom |
graph | JSONGraph |
JSONGraph
Graph.fromObject(obj, [opts]) ⇒ Takes a normal javascript object and returns a JSONGraph.
File: falcor/graph/from-object.js
Kind: static method of Graph
Param | Type | Default |
---|---|---|
obj | Object |
|
[opts] | Object |
|
[opts.arrayIsRef] | Boolean |
true |
[opts.root] | Path |
[] |
Boolean
Graph.isAtom(sentinel) ⇒ File: falcor/graph/is-atom.js
Kind: static method of Graph
Param | Type |
---|---|
sentinel | * |
Boolean
Graph.isError(sentinel) ⇒ File: falcor/graph/is-error.js
Kind: static method of Graph
Param | Type |
---|---|
sentinel | * |
Boolean
Graph.isRef(sentinel) ⇒ File: falcor/graph/is-ref.js
Kind: static method of Graph
Param | Type |
---|---|
sentinel | * |
Boolean
Graph.isRootRef(sentinel) ⇒ File: falcor/graph/is-root-ref.js
Kind: static method of Graph
Param | Type |
---|---|
sentinel | * |
Boolean
Graph.isSentinel(sentinel) ⇒ File: falcor/graph/is-sentinel.js
Kind: static method of Graph
Param | Type |
---|---|
sentinel | * |
Graph.refs(graph, fn)
File: falcor/graph/refs.js
Kind: static method of Graph
Param | Type |
---|---|
graph | JSONGraph |
fn | Graph.atoms~visitorFn |
refs~visitorFn(path, ref, graph)
Kind: inner method of refs
Param | Type |
---|---|
path | Path |
ref | Reference |
graph | JSONGraph |
JSONGraph
Graph.relative(root, graph) ⇒ File: falcor/graph/relative.js
Kind: static method of Graph
Param | Type |
---|---|
root | Path |
graph | JSONGraph |
JSONGraph
Graph.resolve(root, graph) ⇒ File: falcor/graph/resolve.js
Kind: static method of Graph
Param | Type |
---|---|
root | Path |
graph | JSONGraph |
Reference
Graph.rootRef(path, value, props) ⇒ File: falcor/graph/root-ref.js
Kind: static method of Graph
Param | Type |
---|---|
path | Path |
value | Path |
props | Object |
Graph.sentinels(graph, fn)
File: falcor/graph/sentinels.js
Kind: static method of Graph
Param | Type |
---|---|
graph | JSONGraph |
fn | Graph.sentinels~visitorFn |
sentinels~visitorFn(path, sentinel, graph)
Kind: inner method of sentinels
Param | Type |
---|---|
path | Path |
sentinel | Sentinel |
graph | JSONGraph |
JSONGraph
Graph.toObject(graph, [opts]) ⇒ Takes a JSONGraph and returns a Javascript Object.
File: falcor/graph/to-object.js
Kind: static method of Graph
Param | Type |
---|---|
graph | JSONGraph |
[opts] | Object |
Falcor.Path
Kind: static property of Falcor
See: https://github.com/Netflix/falcor-path-utils
Array.<PathSet>
Path.relative(root, paths) ⇒ File: falcor/path/relative.js
Kind: static method of Path
Param | Type |
---|---|
root | Path |
paths | Array.<PathSet> |
Array.<PathSet>
Path.resolve(root, paths) ⇒ File: falcor/path/resolve.js
Kind: static method of Path
Param | Type |
---|---|
root | Path |
paths | Array.<PathSet> |
ProteanClass
CollectionSource ⇐ Kind: global class
Extends: ProteanClass
Implements: DataSource
- CollectionSource ⇐
ProteanClass
- new CollectionSource([collection], [opts])
- .options
- .router
- .routes
- .get(paths) ⇒
Observable.<JSONGraphEnvelope>
- .set(envelope) ⇒
Observable.<JSONGraphEnvelope>
- .call(path, args, refSuffixes, thisPaths) ⇒
Observable.<JSONGraphEnvelope>
- .getLength() ⇒
Observable.<JSONGraphEnvelope>
- .getRecordByIndex(paths) ⇒
Observable.<JSONGraphEnvelope>
- .getRecordProps(paths) ⇒
Observable.<JSONGraphEnvelope>
- .setRecordProps(graph) ⇒
Observable.<JSONGraphEnvelope>
- .addRecord(path, args, refSuffixes, thisPaths) ⇒
Observable.<JSONGraphEnvelope>
- .removeRecord(path, args, refSuffixes, thisPaths) ⇒
Observable.<JSONGraphEnvelope>
new CollectionSource([collection], [opts])
file: falcor/data-source/collection.js
Param | Type | Default |
---|---|---|
[collection] | Collection |
|
[opts] | Object |
|
[opts.indexedPath] | Path |
['byIndex'] |
[opts.keyedPath] | Path |
['byId'] |
collectionSource.options
Default options
Kind: instance property of CollectionSource
Properties
Type |
---|
Object |
options.indexedPath
Kind: static property of options
Properties
Type |
---|
Path |
options.keyedPath
Kind: static property of options
Properties
Type |
---|
Path |
options.lengthPath
Kind: static property of options
Properties
Type |
---|
Path |
options.addPath
Kind: static property of options
Properties
Type |
---|
Path |
options.removePath
Kind: static property of options
Properties
Type |
---|
Path |
collectionSource.router
Kind: instance property of CollectionSource
See: http://netflix.github.io/falcor/documentation/router.html
Properties
Type |
---|
external:FalcorRouter |
collectionSource.routes
Kind: instance property of CollectionSource
Properties
Type |
---|
Array.<Object> |
Observable.<JSONGraphEnvelope>
collectionSource.get(paths) ⇒ Kind: instance method of CollectionSource
Implements: get
Param | Type |
---|---|
paths | Array.<PathSet> |
Observable.<JSONGraphEnvelope>
collectionSource.set(envelope) ⇒ Kind: instance method of CollectionSource
Implements: set
Param | Type |
---|---|
envelope | JSONGraphEnvelope |
Observable.<JSONGraphEnvelope>
collectionSource.call(path, args, refSuffixes, thisPaths) ⇒ Kind: instance method of CollectionSource
Implements: call
Param | Type |
---|---|
path | PathSet |
args | Array.<Mixed> |
refSuffixes | Array.<PathSet> |
thisPaths | Array.<PathSet> |
Observable.<JSONGraphEnvelope>
collectionSource.getLength() ⇒ Kind: instance method of CollectionSource
Observable.<JSONGraphEnvelope>
collectionSource.getRecordByIndex(paths) ⇒ Kind: instance method of CollectionSource
Param | Type |
---|---|
paths | Array.<PathSets> |
Observable.<JSONGraphEnvelope>
collectionSource.getRecordProps(paths) ⇒ Kind: instance method of CollectionSource
Param | Type |
---|---|
paths | Array.<PathSets> |
Observable.<JSONGraphEnvelope>
collectionSource.setRecordProps(graph) ⇒ Kind: instance method of CollectionSource
Param | Type |
---|---|
graph | JSONGraph |
Observable.<JSONGraphEnvelope>
collectionSource.addRecord(path, args, refSuffixes, thisPaths) ⇒ Kind: instance method of CollectionSource
Param | Type |
---|---|
path | PathSet |
args | Array.<Mixed> |
refSuffixes | Array.<PathSet> |
thisPaths | Array.<PathSet> |
Observable.<JSONGraphEnvelope>
collectionSource.removeRecord(path, args, refSuffixes, thisPaths) ⇒ Kind: instance method of CollectionSource
Param | Type |
---|---|
path | PathSet |
args | Array.<Mixed> |
refSuffixes | Array.<PathSet> |
thisPaths | Array.<PathSet> |
ProteanClass
CompositeSource ⇐ Kind: global class
Extends: ProteanClass
Implements: DataSource
new CompositeSource(...args)
A DataSource that allows for composing several different DataSources together through different Paths.
This allows individual DataSources to be constructed, used, and tested in their own domain. Then later you can compose them into a larger Graph.
The CompositeSource manages the re-writing of Paths and the resulting Graph so it appears that everything comes from a larger Graph.
Basically, all returned Paths/Graphs are updated to have any references relative to their Paths in the CompositeSource.
As a result, there was a need to create a new Falcor data type to express when a sub DataSource wanted to reference another part of the larger Graph. RootReference represents a Reference in the Graph that should not be kept local to the underlying DataSource, but should be interpreted from the root of the CompositeSource.
File: falcor/data-source/composite.js
Param | Type |
---|---|
...args | Array.<Path, DataSource> |
compositeSource.sources
Kind: instance property of CompositeSource
Properties
Type |
---|
Object.<Path, ProxiedSource> |
Observable.<JSONGraphEnvelope>
compositeSource.get(paths) ⇒ Kind: instance method of CompositeSource
Implements: get
Param | Type |
---|---|
paths | Array.<PathSets> |
Observable.<JSONGraphEnvelope>
compositeSource.set(envelope) ⇒ Kind: instance method of CompositeSource
Implements: set
Param | Type |
---|---|
envelope | JSONGraphEnvelope |
Observable.<JSONGraphEnvelope>
compositeSource.call(path, args, refSuffixes, thisPaths) ⇒ Kind: instance method of CompositeSource
Implements: call
Param | Type |
---|---|
path | Path |
args | Array.<Mixed> |
refSuffixes | Array.<PathSet> |
thisPaths | Array.<PathSet> |
CompositeSource
compositeSource.add(path, source) ⇒ Kind: instance method of CompositeSource
Returns: CompositeSource
- the CompositeSource instance
Param | Type |
---|---|
path | Path |
source | DataSource |
ProteanClass
JSONGraphEnvelopeProxy ⇐ Kind: global class
Extends: ProteanClass
Implements: JSONGraphEnevelope
- JSONGraphEnvelopeProxy ⇐
ProteanClass
- new JSONGraphEnvelopeProxy([opts])
- .paths
- .jsonGraph
- .invalidated
- .expecting
- .pending
- .set(pathOrGraph, [atom])
- .invalidate(...path)
- .fulfill(path)
- .expect(paths)
- .relativeFrom(from) ⇒
JSONGraphEnvelopeProxy
- .resolvedFrom(from) ⇒
JSONGraphEnvelopeProxy
- .merge(other)
- .destroy()
- .clone() ⇒
JSONGraphEnvelopeProxy
- .valueOf() ⇒
JSONGraphEnvelope
- .finalize() ⇒
JSONGraphEnvelope
new JSONGraphEnvelopeProxy([opts])
Param | Type | Description |
---|---|---|
[opts] | Object |
|
[opts.expect] | Array.<PathSet> |
Paths to expect |
[opts.paths] | Array.<PathSet> |
A starting set of paths |
[opts.jsonGraph] | JSONGraph |
A starting JSONGraph |
[opts.invalidated] | Array.<PathSet> |
A starting set of paths to invalidate |
jsonGraphEnvelopeProxy.paths
Kind: instance property of JSONGraphEnvelopeProxy
Properties
Type |
---|
Array.<PathSet> |
jsonGraphEnvelopeProxy.jsonGraph
Kind: instance property of JSONGraphEnvelopeProxy
Properties
Type |
---|
JSONGraph |
jsonGraphEnvelopeProxy.invalidated
Kind: instance property of JSONGraphEnvelopeProxy
Properties
Type |
---|
Array.<PathSet> |
jsonGraphEnvelopeProxy.expecting
Kind: instance property of JSONGraphEnvelopeProxy
Properties
Type |
---|
Object |
jsonGraphEnvelopeProxy.pending
Get a list of paths this envelope is still expecting to fulfill
Kind: instance property of JSONGraphEnvelopeProxy
Read only: true
Properties
Type |
---|
Array.<Path> |
jsonGraphEnvelopeProxy.set(pathOrGraph, [atom])
Kind: instance method of JSONGraphEnvelopeProxy
Param | Type |
---|---|
pathOrGraph | Path | JSONGraph |
[atom] | Atom |
jsonGraphEnvelopeProxy.invalidate(...path)
Kind: instance method of JSONGraphEnvelopeProxy
Param | Type |
---|---|
...path | Path |
jsonGraphEnvelopeProxy.fulfill(path)
Mark a path as fulfilled and set the given value on our jsonGraph
Kind: instance method of JSONGraphEnvelopeProxy
Param | Type |
---|---|
path | Path |
jsonGraphEnvelopeProxy.expect(paths)
Prepare this envelope to expect to fulfill a certain set of paths.
Kind: instance method of JSONGraphEnvelopeProxy
Param | Type |
---|---|
paths | Array.<PathSet> |
JSONGraphEnvelopeProxy
jsonGraphEnvelopeProxy.relativeFrom(from) ⇒ Kind: instance method of JSONGraphEnvelopeProxy
Returns: JSONGraphEnvelopeProxy
- A copy
Param | Type |
---|---|
from | Path |
JSONGraphEnvelopeProxy
jsonGraphEnvelopeProxy.resolvedFrom(from) ⇒ Kind: instance method of JSONGraphEnvelopeProxy
Returns: JSONGraphEnvelopeProxy
- A copy
Param | Type |
---|---|
from | Path |
jsonGraphEnvelopeProxy.merge(other)
Merge another JSONGraphEnvelope into this one
Kind: instance method of JSONGraphEnvelopeProxy
Param | Type |
---|---|
other | JSONGraphEnvelopeProxy | JSONGraphEnvelope |
jsonGraphEnvelopeProxy.destroy()
Clear out our data so we do not have any dangling memory.
Kind: instance method of JSONGraphEnvelopeProxy
JSONGraphEnvelopeProxy
jsonGraphEnvelopeProxy.clone() ⇒ Get a copy of this proxy
Kind: instance method of JSONGraphEnvelopeProxy
JSONGraphEnvelope
jsonGraphEnvelopeProxy.valueOf() ⇒ Kind: instance method of JSONGraphEnvelopeProxy
JSONGraphEnvelope
jsonGraphEnvelopeProxy.finalize() ⇒ Kind: instance method of JSONGraphEnvelopeProxy
ProteanClass
NoCacheSource ⇐ Kind: global class
Extends: ProteanClass
Implements: DataSource
new NoCacheSource(opts)
A Falcor DataSource that proxies another data source and sets all returned atoms to expire immediately.
file: falcor/data-source/no-cache.js
Param | Type |
---|---|
opts | Object |
opts.source | DataSource |
Observable.<JSONGraphEnvelope>
noCacheSource.get(paths) ⇒ Kind: instance method of NoCacheSource
Implements: get
Param | Type |
---|---|
paths | Array.<PathSets> |
Observable.<JSONGraphEnvelope>
noCacheSource.set(envelope) ⇒ Kind: instance method of NoCacheSource
Implements: set
Param | Type |
---|---|
envelope | JSONGraphEnvelope |
Observable.<JSONGraphEnvelope>
noCacheSource.call(path, args, refSuffixes, thisPaths) ⇒ Kind: instance method of NoCacheSource
Implements: call
Param | Type |
---|---|
path | PathSet |
args | Array.<Mixed> |
refSuffixes | Array.<PathSet> |
thisPaths | Array.<PathSet> |
ProteanClass
PartitionedSource ⇐ Kind: global class
Extends: ProteanClass
Implements: DataSource
new PartitionedSource([opts])
A falcor DataSource that optionally reads from and writes to a variety of 'partitions' of other DataSources.
When reading (get) it will try the partitions in the order set by the 'reads' option. Any paths gone unfilled by the first, will be requested by the second, and so on. The final graph is a merge of all returned values from those partitions.
When writing (set/call) it will send the request to all given partitions in the 'writes' option. Again, returning a merged graph of all values writen.
Param | Type | Default |
---|---|---|
[opts] | Object |
|
[opts.reads] | Array.<String> |
[] |
[opts.writes] | Array.<String> |
[] |
[opts.partitions] | Object.<String, DataSource> |
{} |
partitionedSource.options
Default options
Kind: instance property of PartitionedSource
Properties
Type |
---|
Object |
options.reads
Kind: static property of options
Properties
Type |
---|
Array.<String> |
options.writes
Kind: static property of options
Properties
Type |
---|
Array.<String> |
options.partitions
Kind: static property of options
Properties
Type |
---|
Object.<String, DataSource> |
Observable.<JSONGraphEnvelope>
partitionedSource.get(paths) ⇒ Kind: instance method of PartitionedSource
Implements: get
Param | Type |
---|---|
paths | Array.<PathSet> |
Observable.<JSONGraphEnvelope>
partitionedSource.set(envelope) ⇒ Kind: instance method of PartitionedSource
Implements: set
Param | Type |
---|---|
envelope | JSONGraphEnvelope |
Observable.<JSONGraphEnvelope>
partitionedSource.call(path, args, refSuffixes, thisPaths) ⇒ Kind: instance method of PartitionedSource
Implements: call
Param | Type |
---|---|
path | PathSet |
args | Array.<Mixed> |
refSuffixes | Array.<PathSet> |
thisPaths | Array.<PathSet> |
ProteanClass
ProxiedSource ⇐ Kind: global class
Extends: ProteanClass
Implements: DataSource
- ProxiedSource ⇐
ProteanClass
- new ProxiedSource([opts])
- .source
- .root
- .get(paths) ⇒
Observable.<JSONGraphEnvelope>
- .set(envelope) ⇒
Observable.<JSONGraphEnvelope>
- .call(path, args, refSuffixes, thisPaths) ⇒
Observable.<JSONGraphEnvelope>
- .willGet(paths) ⇒
Boolean
- .willSet(envelope) ⇒
Boolean
- .willCall(path) ⇒
Boolean
- .getRelativeEnvelope(envelope) ⇒
JSONGraphEnvelope
- .getResolvedEnvelope(envelope) ⇒
JSONGraphEnvelope
new ProxiedSource([opts])
A Falcor DataSource that proxies to another source, re-writing the returned paths, and the paths to the values within the JSONGraph.
File: falcor/data-source/proxied.js
Param | Type |
---|---|
[opts] | Object |
[opts.source] | DataSource |
[opts.root] | Path |
proxiedSource.source
Kind: instance property of ProxiedSource
Properties
Type |
---|
DataSource |
proxiedSource.root
Kind: instance property of ProxiedSource
Properties
Type |
---|
Path |
Observable.<JSONGraphEnvelope>
proxiedSource.get(paths) ⇒ Kind: instance method of ProxiedSource
Implements: get
Param | Type |
---|---|
paths | Array.<PathSets> |
Observable.<JSONGraphEnvelope>
proxiedSource.set(envelope) ⇒ Kind: instance method of ProxiedSource
Implements: set
Param | Type |
---|---|
envelope | JSONGraphEnvelope |
Observable.<JSONGraphEnvelope>
proxiedSource.call(path, args, refSuffixes, thisPaths) ⇒ Kind: instance method of ProxiedSource
Implements: call
Param | Type |
---|---|
path | PathSet |
args | Array.<Mixed> |
refSuffixes | Array.<PathSet> |
thisPaths | Array.<PathSet> |
Boolean
proxiedSource.willGet(paths) ⇒ Will the given paths be consumed by a get request against this datasource?
Kind: instance method of ProxiedSource
Param | Type |
---|---|
paths | Array.<PathSet> |
Boolean
proxiedSource.willSet(envelope) ⇒ Will the given JSONGraphEnvelope be consumed by a set request against this datasource?
Kind: instance method of ProxiedSource
Param | Type |
---|---|
envelope | JSONGraphEnvelope |
Boolean
proxiedSource.willCall(path) ⇒ Will the given path be consumed by a call request against this datasource?
Kind: instance method of ProxiedSource
Param | Type |
---|---|
path | Path |
JSONGraphEnvelope
proxiedSource.getRelativeEnvelope(envelope) ⇒ Strip our leading path from the envelope's path(s) and jsonGraph object.
Kind: instance method of ProxiedSource
Param | Type |
---|---|
envelope | JSONGraphEnvelope |
JSONGraphEnvelope
proxiedSource.getResolvedEnvelope(envelope) ⇒ Adjust the JSONGraphEnvelope to reflect our leading path information.
Kind: instance method of ProxiedSource
Param | Type |
---|---|
envelope | JSONGraphEnvelope |
ProteanClass
StorageSource ⇐ Kind: global class
Extends: ProteanClass
Implements: DataSource
- StorageSource ⇐
ProteanClass
new StorageSource(opts)
File: falcor/data-source/storage.js
Param | Type |
---|---|
opts | Object |
opts.storage | Storage |
opts.storageKey | String |
[opts.cache] | Object |
[opts.serializer] | function |
[opts.deserializer] | function |
storageSource.model
Kind: instance property of StorageSource
Properties
Type |
---|
FalcorFModel |
storageSource.source
Kind: instance property of StorageSource
Properties
Type |
---|
DataSource |
storageSource.options
Kind: instance property of StorageSource
Properties
Type |
---|
Object |
options.storageKey
The key to use when accessing the Storage object to serialize the graph to.
Kind: static property of options
Properties
Type |
---|
String |
options.storage
The storage source
Kind: static property of options
Properties
Type |
---|
Storage |
String
options.serializer(graph) ⇒ A function to convert a JSONGraph to a String.
Kind: static method of options
Param | Type |
---|---|
graph | JSONGraph |
JSONGraph
options.deserializer(src) ⇒ A function to convert a String to a JSONGraph.
Kind: static method of options
Param | Type |
---|---|
src | String |
Observable.<JSONGraphEnvelope>
storageSource.get(paths) ⇒ Kind: instance method of StorageSource
Implements: get
Param | Type |
---|---|
paths | Array.<PathSets> |
Observable.<JSONGraphEnvelope>
storageSource.set(envelope) ⇒ Kind: instance method of StorageSource
Implements: set
Param | Type |
---|---|
envelope | JSONGraphEnvelope |
Observable.<JSONGraphEnvelope>
storageSource.call(path, args, refSuffixes, thisPaths) ⇒ Kind: instance method of StorageSource
Implements: call
Param | Type |
---|---|
path | PathSet |
args | Array.<Mixed> |
refSuffixes | Array.<PathSet> |
thisPaths | Array.<PathSet> |
storageSource.clear()
Clear our storage item
Kind: instance method of StorageSource
storageSource.serialize()
Write our cache to storage
Kind: instance method of StorageSource
storageSource.deserialize()
Get our cache from storage
Kind: instance method of StorageSource
function
ProteanClass : Kind: global class
- ProteanClass :
function
Object
ProteanClass.superproto : A reference to this class' superclass prototype
Kind: static property of ProteanClass
ProteanClass
ProteanClass.extend([subclass], [props], [properties]) ⇒ A function to extend this class into another one
Kind: static method of ProteanClass
Param | Type |
---|---|
[subclass] | function |
[props] | Object |
[properties] | Object |
ProteanClass.extended(subclass)
A function that will be called when the class is extended into another
Kind: static method of ProteanClass
Param | Type |
---|---|
subclass | function |
ProteanClass.superclass()
A reference to this class' superclass constructor
Kind: static method of ProteanClass
ProteanClass
Storage ⇐ Kind: global class
Extends: ProteanClass
Implements: external:Storage
- Storage ⇐
ProteanClass
- new Storage(opts)
- .length
- .getItem(key) ⇒
Mixed
- .getJSON(key) ⇒
null
|Object
- .setItem(key, value)
- .setJSON(key, value)
- .removeItem(key)
- .clear()
- .key(idx) ⇒
String
new Storage(opts)
File: storage/index.js
Param | Type |
---|---|
opts | Object |
opts.store | external:Storage |
opts.json | JSON |
storage.length
Kind: instance property of Storage
Read only: true
Properties
Type |
---|
Integer |
Mixed
storage.getItem(key) ⇒ Kind: instance method of Storage
Param | Type |
---|---|
key | String |
null
| Object
storage.getJSON(key) ⇒ Kind: instance method of Storage
Param | Type |
---|---|
key | String |
storage.setItem(key, value)
Kind: instance method of Storage
Param | Type |
---|---|
key | String |
value | String |
storage.setJSON(key, value)
Kind: instance method of Storage
Param | Type |
---|---|
key | String |
value | String |
storage.removeItem(key)
Kind: instance method of Storage
Param | Type |
---|---|
key | String |
storage.clear()
Kind: instance method of Storage
String
storage.key(idx) ⇒ Kind: instance method of Storage
Param | Type |
---|---|
idx | Integer |
ProteanClass
Store ⇐ Kind: global class
Extends: ProteanClass
Implements: external:Storage
- Store ⇐
ProteanClass
- new Store()
- instance
- .length
- .getItem(key) ⇒
null
|String
- .setItem(key, value)
- .removeItem(key)
- .clear()
- .key(idx) ⇒
String
- static
new Store()
File: storage/store/index.js
store.length
Kind: instance property of Store
Read only: true
Properties
Type |
---|
Integer |
null
| String
store.getItem(key) ⇒ Kind: instance method of Store
Param | Type |
---|---|
key | String |
store.setItem(key, value)
Kind: instance method of Store
Param | Type |
---|---|
key | String |
value | String |
store.removeItem(key)
Kind: instance method of Store
Param | Type |
---|---|
key | String |
store.clear()
Kind: instance method of Store
String
store.key(idx) ⇒ Kind: instance method of Store
Param | Type |
---|---|
idx | Integer |
external:Storage
Store.local : File: storage/store/local.js
Kind: static property of Store
module:Protean.Store
Store.memory : File: storage/store/memory.js
Kind: static property of Store
external:Storage
Store.session : File: storage/store/session.js
Kind: static property of Store
ProteanClass
Collection ⇐ Kind: global class
Extends: ProteanClass
- Collection ⇐
ProteanClass
- new Collection([rec])
- .idKey
- .comparator
- .length
- .records
- .has(id) ⇒
Boolean
- .add(obj) ⇒
Record
- .remove(id) ⇒
Record
- .at(idx) ⇒
Record
- .removeAt(idx) ⇒
Record
- .get(id) ⇒
Record
- .indexOf(idOrRecord) ⇒
Integer
- .clear() ⇒
Collection
- .valueOf() ⇒
Array.<Object>
- .find(predicate) ⇒
Record
- .sort([comparator]) ⇒
Collection
- .map(iteratee) ⇒
Collection
- .each(iteratee)
- .where(predicate) ⇒
Collection
- .by(comparator) ⇒
Collection
- .clone() ⇒
Collection
- .cloneDeep() ⇒
Collection
new Collection([rec])
File: utility/collection.js
Param | Type |
---|---|
[rec] | Record | Object |
collection.idKey
The unique identifier key to use for records
Kind: instance property of Collection
Default: 'id'
Properties
Type |
---|
String |
collection.comparator
Used to keep the collection ordered when adding items
Kind: instance property of Collection
Properties
Type |
---|
function |
collection.length
Kind: instance property of Collection
Read only: true
Properties
Type |
---|
Integer |
collection.records
Kind: instance property of Collection
Read only: true
Properties
Type |
---|
Array.<Record> |
Boolean
collection.has(id) ⇒ Kind: instance method of Collection
Param | Type |
---|---|
id | String |
Record
collection.add(obj) ⇒ Kind: instance method of Collection
Returns: Record
- The record just created
Param | Type |
---|---|
obj | Object | Record |
Record
collection.remove(id) ⇒ Kind: instance method of Collection
Param | Type |
---|---|
id | String |
Record
collection.at(idx) ⇒ Kind: instance method of Collection
Param | Type |
---|---|
idx | Integer |
Record
collection.removeAt(idx) ⇒ Kind: instance method of Collection
Param | Type |
---|---|
idx | Integer |
Record
collection.get(id) ⇒ Kind: instance method of Collection
Param | Type |
---|---|
id | String |
Integer
collection.indexOf(idOrRecord) ⇒ Kind: instance method of Collection
Param | Type |
---|---|
idOrRecord | String | Record |
Collection
collection.clear() ⇒ Kind: instance method of Collection
Array.<Object>
collection.valueOf() ⇒ Kind: instance method of Collection
Record
collection.find(predicate) ⇒ Kind: instance method of Collection
Param | Type |
---|---|
predicate | function |
Collection
collection.sort([comparator]) ⇒ Mutates the collection to sorted based on the given comparator, or the one defined on itself.
Kind: instance method of Collection
Param | Type | Default |
---|---|---|
[comparator] | function |
this.comparator |
Collection
collection.map(iteratee) ⇒ Kind: instance method of Collection
Param | Type |
---|---|
iteratee | function |
collection.each(iteratee)
Kind: instance method of Collection
Param | Type |
---|---|
iteratee | function |
Collection
collection.where(predicate) ⇒ Kind: instance method of Collection
Param | Type |
---|---|
predicate | function |
Collection
collection.by(comparator) ⇒ Kind: instance method of Collection
Param | Type |
---|---|
comparator | function |
Collection
collection.clone() ⇒ Returns a copy of the collection with all the records (the records are not cloned)
Kind: instance method of Collection
Collection
collection.cloneDeep() ⇒ Returns a Collection with all records cloned.
Kind: instance method of Collection
Subject
FiniteStateMachine ⇐ Kind: global class
Extends: Subject
, ProteanClass
- FiniteStateMachine ⇐
Subject
- new FiniteStateMachine([opts])
- .options
- .transitions
- .currentState
- .currentInputs
- .add(name, transitions) ⇒
FiniteStateMachine
- .remove(name) ⇒
FiniteStateMachine
- .has(name) ⇒
Boolean
- .can(input) ⇒
Boolean
- .will(input) ⇒
String
|false
- .onNext(input) ⇒
Boolean
- .onError(error)
- .onCompleted()
- .dispose()
- .input(input) ⇒
Boolean
- .enter(name) ⇒
Boolean
- .transition(input, from, to) ⇒
FiniteStateMachine
- .valueOf() ⇒
Object
new FiniteStateMachine([opts])
File: utility/fsm.js
Throws:
Error
"ProteanFiniteStateMachine needs an initial state" If no initial state is given andstateless
is false.
Param | Type | Default | Description |
---|---|---|---|
[opts] | Object |
||
[opts.initial] | String |
The initial state to begin in | |
[opts.current] | String |
Alias for initial | |
[opts.states] | Object.<String, Object> |
{} |
A map of state names to objects that have inputs as keys, and resulting state names as values. |
[opts.stateless] | Boolean |
false |
Allow the machine to be in a stateless state. Default false. |
finiteStateMachine.options
Default options
Kind: instance property of FiniteStateMachine
Properties
Type |
---|
Object |
options.initial
Kind: static property of options
Properties
Type |
---|
String |
options.current
Kind: static property of options
Properties
Type |
---|
String |
options.stateless
Kind: static property of options
Properties
Type |
---|
Boolean |
options.states
Kind: static property of options
Properties
Type |
---|
Object.<String, Object> |
finiteStateMachine.transitions
Kind: instance property of FiniteStateMachine
Properties
Type |
---|
Subject |
finiteStateMachine.currentState
The current state
Kind: instance property of FiniteStateMachine
Properties
Type |
---|
String |
finiteStateMachine.currentInputs
Get the currently available inputs
Kind: instance property of FiniteStateMachine
Read only: true
Properties
Type |
---|
Array.<String> |
FiniteStateMachine
finiteStateMachine.add(name, transitions) ⇒ Add a state and its available transitions
Kind: instance method of FiniteStateMachine
Param | Type |
---|---|
name | String |
transitions | Object.<String, String> |
FiniteStateMachine
finiteStateMachine.remove(name) ⇒ Remove a state and its transitions
Kind: instance method of FiniteStateMachine
Param | Type |
---|---|
name | String |
Boolean
finiteStateMachine.has(name) ⇒ Kind: instance method of FiniteStateMachine
Param | Type |
---|---|
name | String |
Boolean
finiteStateMachine.can(input) ⇒ Kind: instance method of FiniteStateMachine
Param | Type |
---|---|
input | String |
String
| false
finiteStateMachine.will(input) ⇒ Kind: instance method of FiniteStateMachine
Returns: String
| false
- the name of the resulting state, or false
Param | Type |
---|---|
input | String |
Boolean
finiteStateMachine.onNext(input) ⇒ Kind: instance method of FiniteStateMachine
Param | Type |
---|---|
input | String |
finiteStateMachine.onError(error)
Kind: instance method of FiniteStateMachine
Param | Type |
---|---|
error | Error |
finiteStateMachine.onCompleted()
Kind: instance method of FiniteStateMachine
finiteStateMachine.dispose()
Kind: instance method of FiniteStateMachine
Boolean
finiteStateMachine.input(input) ⇒ Kind: instance method of FiniteStateMachine
Param | Type |
---|---|
input | String |
Boolean
finiteStateMachine.enter(name) ⇒ Kind: instance method of FiniteStateMachine
Param | Type |
---|---|
name | String |
FiniteStateMachine
finiteStateMachine.transition(input, from, to) ⇒ Kind: instance method of FiniteStateMachine
Param | Type |
---|---|
input | String |
from | String |
to | String |
Object
finiteStateMachine.valueOf() ⇒ Kind: instance method of FiniteStateMachine
ProteanClass
LinkedList ⇐ Kind: global class
Extends: ProteanClass
- LinkedList ⇐
ProteanClass
- new LinkedList([...items])
- instance
- .head
- .tail
- .push(...value) ⇒
Integer
- .pop() ⇒
*
- .unshift(...value) ⇒
Integer
- .shift() ⇒
*
- .nodeAt(idx) ⇒
LinkdList.Node
- .at(idx) ⇒
*
- .insert(nodeOrValue, siblingOrIndex)
- .remove(nodeOrIndex)
- .reset()
- .forEach(fn, [scope])
- .map(fn, [scope]) ⇒
LinkedList
- .filter(fn, [scope]) ⇒
LinkedList
- .reduce(fn, [value], [scope]) ⇒
*
- .toArray() ⇒
Array.<*>
- static
new LinkedList([...items])
Param | Type |
---|---|
[...items] | * |
linkedList.head
Kind: instance property of LinkedList
Properties
Type |
---|
Node |
linkedList.tail
Kind: instance property of LinkedList
Properties
Type |
---|
Node |
Integer
linkedList.push(...value) ⇒ Kind: instance method of LinkedList
Param | Type |
---|---|
...value | * |
*
linkedList.pop() ⇒ Kind: instance method of LinkedList
Integer
linkedList.unshift(...value) ⇒ Kind: instance method of LinkedList
Param | Type |
---|---|
...value | * |
*
linkedList.shift() ⇒ Kind: instance method of LinkedList
LinkdList.Node
linkedList.nodeAt(idx) ⇒ Kind: instance method of LinkedList
Param | Type |
---|---|
idx | Integer |
*
linkedList.at(idx) ⇒ Kind: instance method of LinkedList
Param | Type |
---|---|
idx | Integer |
linkedList.insert(nodeOrValue, siblingOrIndex)
Insert a new value (or an existing node) after the given sibling or index.
Kind: instance method of LinkedList
Param | Type |
---|---|
nodeOrValue | Node | * |
siblingOrIndex | LinkdeList.Node | Integer |
linkedList.remove(nodeOrIndex)
Kind: instance method of LinkedList
Param | Type |
---|---|
nodeOrIndex | Node | Integer |
linkedList.reset()
Reset the list
Kind: instance method of LinkedList
linkedList.forEach(fn, [scope])
Kind: instance method of LinkedList
Param | Type |
---|---|
fn | function |
[scope] | Object |
LinkedList
linkedList.map(fn, [scope]) ⇒ Kind: instance method of LinkedList
Param | Type |
---|---|
fn | function |
[scope] | Object |
LinkedList
linkedList.filter(fn, [scope]) ⇒ Kind: instance method of LinkedList
Param | Type |
---|---|
fn | function |
[scope] | Object |
*
linkedList.reduce(fn, [value], [scope]) ⇒ Kind: instance method of LinkedList
Param | Type | Description |
---|---|---|
fn | function |
|
[value] | * |
Initial value |
[scope] | Object |
Scope to apply to the fn passed |
Array.<*>
linkedList.toArray() ⇒ Kind: instance method of LinkedList
Object
LinkedList.Node ⇐ Kind: static class of LinkedList
Extends: Object
new Node(data, [prev], [next])
Param | Type |
---|---|
data | Mixed |
[prev] | Node |
[next] | Node |
node.next
Kind: instance property of Node
Properties
Type |
---|
Node |
node.prev
Kind: instance property of Node
Properties
Type |
---|
Node |
node.data
Kind: instance property of Node
Properties
Type |
---|
* |
node.insert(prev, next)
Kind: instance method of Node
Param | Type |
---|---|
prev | Node |
next | Node |
node.remove()
Remove the given node, nulling out its prev and next pointers
Kind: instance method of Node
ProteanClass
Record ⇐ Kind: global class
Extends: ProteanClass
- Record ⇐
ProteanClass
- new Record([data])
- .length
- .get(key) ⇒
Mixed
- .set(keyOrRecord, [value]) ⇒
Record
- .merge(record) ⇒
Record
- .remove(key) ⇒
Mixed
- .has(key) ⇒
Boolean
- .clear() ⇒
Record
- .key(idx) ⇒
String
- .valueOf() ⇒
Object
- .clone([values]) ⇒
Record
new Record([data])
File: utility/record.js
Param | Type |
---|---|
[data] | Object |
record.length
Kind: instance property of Record
Read only: true
Properties
Type |
---|
Integer |
Mixed
record.get(key) ⇒ Kind: instance method of Record
Param | Type |
---|---|
key | String |
Record
record.set(keyOrRecord, [value]) ⇒ Kind: instance method of Record
Param | Type |
---|---|
keyOrRecord | String | Record | Object |
[value] | Mixed |
Record
record.merge(record) ⇒ Kind: instance method of Record
Param | Type |
---|---|
record | Record | Object |
Mixed
record.remove(key) ⇒ Kind: instance method of Record
Param | Type |
---|---|
key | String |
Boolean
record.has(key) ⇒ Kind: instance method of Record
Param | Type |
---|---|
key | String |
Record
record.clear() ⇒ Kind: instance method of Record
String
record.key(idx) ⇒ Kind: instance method of Record
Param | Type |
---|---|
idx | Integer |
Object
record.valueOf() ⇒ Kind: instance method of Record
Record
record.clone([values]) ⇒ Kind: instance method of Record
Param | Type |
---|---|
[values] | Object |
function
onNextFunction : Kind: global typedef
Param | Type |
---|---|
value | Mixed |
function
onErrorFunction : Kind: global typedef
Param | Type |
---|---|
error | Error |
function
onCompletedFunction :
Observable
Kind: global typedef
Implements: Observable
Disposable
observable.subscribe(onNextOrObserver, [onError], [onCompleted]) ⇒ Kind: instance method of Observable
Param | Type |
---|---|
onNextOrObserver | onNextFunction | Observer |
[onError] | onErrorFunction |
[onCompleted] | onCompletedFunction |
Observer
Kind: global typedef
Implements: Observer
onNextFunction
observer.onNext : Kind: instance property of Observer
onErrorFunction
observer.onError : Kind: instance property of Observer
onCompletedFunction
observer.onCompleted : Kind: instance property of Observer
Disposable
Kind: global typedef
Implements: Disposable
disposable.dispose()
Kind: instance method of Disposable
Observable
Subject ⇐ Kind: global typedef
Extends: Observable
Mixes: Observer
, Disposable
See: https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/subjects/subject.md
DataSource
Kind: global typedef
Implements: DataSource
Observable.<JSONGraphEnvelope>
dataSource.get(paths) ⇒ Kind: instance method of DataSource
Param | Type |
---|---|
paths | Array.<PathSet> |
Observable.<JSONGraphEnvelope>
dataSource.set(envelope) ⇒ Kind: instance method of DataSource
Param | Type |
---|---|
envelope | JSONGraphEnvelope |
Observable.<JSONGraphEnvelope>
dataSource.call(path, args, refSuffixes, thisPaths) ⇒ Kind: instance method of DataSource
Param | Type |
---|---|
path | PathSet |
args | Array.<Mixed> |
refSuffixes | Array.<PathSet> |
thisPaths | Array.<PathSet> |
Object
Sentinel : Kind: global typedef
Properties
Name | Type |
---|---|
$type | String |
value | Mixed |
Sentinel
Reference : Kind: global typedef
Properties
Name | Type | Default |
---|---|---|
$type | String |
'ref' |
value | Path |
Reference
RootReference : Kind: global typedef
Properties
Name | Type | Default |
---|---|---|
$root | Boolean |
true |
Sentinel
Atom : Kind: global typedef
See: http://netflix.github.io/falcor/doc/global.html#Atom
Properties
Name | Type | Default |
---|---|---|
$type | String |
'atom' |
$expires | Integer |
Object
JSONEnvelope : Kind: global typedef
See: http://netflix.github.io/falcor/doc/global.html#JSONGraph
Properties
Name | Type |
---|---|
json | Object |
Object
JSONGraph : Kind: global typedef
See: http://netflix.github.io/falcor/doc/global.html#JSONGraph
Object
JSONGraphEnvelope : Kind: global typedef
See: http://netflix.github.io/falcor/doc/global.html#JSONGraphEnvelope
Properties
Name | Type |
---|---|
jsonGraph | JSONGraph |
paths | Array.<PathSet> |
invalidated | Array.<PathSet> |
String
| null
Key : Kind: global typedef
See: http://netflix.github.io/falcor/doc/global.html#Key
Key
| Range
| Array.<(Key|Range)>
KeySet : Kind: global typedef
See: http://netflix.github.io/falcor/doc/global.html#KeySet
Array.<Key>
Path : Kind: global typedef
See: http://netflix.github.io/falcor/doc/global.html#Path
Array.<KeySet>
PathSet : Kind: global typedef
See: http://netflix.github.io/falcor/doc/global.html#PathSet
Object
PathValue : Kind: global typedef
See: http://netflix.github.io/falcor/doc/global.html#PathValue
Properties
Name | Type |
---|---|
path | Path |
value | * |
Object
Range : Kind: global typedef
See: http://netflix.github.io/falcor/doc/global.html#Range
Properties
Name | Type |
---|---|
from | Integer |
to | Integer |
length | Integer |
Report an Issue
- Bugs
- Contact the author: jerry@hamletink.com
License
Copyright (c) 2015 Jerry Hamlet jerry@hamletink.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The Software shall be used for Good, not Evil.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.