npm install proteanProtean
=======
> An ever changing set of utilities.
Summary
-------
Installation
------------
~~~
% npm install protean
~~~
API
---
ProteanClassProteanClassProteanClassProteanClassProteanClassProteanClassProteanClassfunctionProteanClassProteanClassProteanClassSubjectProteanClassProteanClassfunctionfunctionfunctionObservableObjectSentinelReferenceSentinelObjectObjectObjectString | nullKey | Range | Array.<(Key|Range)>Array.<Key>Array.<KeySet>ObjectObject* Protean
* .Rx
* .append ⇒ Observable.<String>
* .mv ⇒ Observable.<String>
* .fsWrapper ⇒ function
* .write ⇒ Observable.<String>
* .from(arg) ⇒ Observable
* [.cp(from, to, [opts])](#module_Protean.Rx.cp) ⇒ Observable.<fs.Stats>
* [.glob(pattern, [opts])](#module_Protean.Rx.glob) ⇒ Observable.<String>
* .isDirectory(paths) ⇒ Observable.<Boolean>
* .isFile(paths) ⇒ Observable.<Boolean>
* [.mkdir(paths, [opts])](#module_Protean.Rx.mkdir) ⇒ Observable.<String>
* [.read(patterns, [enc])](#module_Protean.Rx.read) ⇒ Observable.<(String\|Buffer)>
* [.rm(patterns, [recursive])](#module_Protean.Rx.rm) ⇒ Observable.<String>
* .stat(patterns) ⇒ Observable.<external:fs.Stats>
* .link(patterns) ⇒ Observable.<external:fs.Stats>
* .fd(fds) ⇒ Observable.<external:fs.Stats>
* .denominate ⇒ Object
.invoke ⇒ \
.pluck ⇒ \ | function
* .classnames(arg) ⇒ String
* [.classify([subclass], props, [properties])](#module_Protean.classify) ⇒ ProteanClass
* [.inherit(superclass, [subclass], [props], [properties])](#module_Protean.inherit) ⇒ ProteanClass
* [.instantiate(fn, [args])](#module_Protean.instantiate) ⇒ Object
* .augment(...obj) ⇒ Object
* .enmap(...args) ⇒ Object
* .enumerate() ⇒ Object
* [.traverse(obj, visitor, [post])](#module_Protean.traverse)
* _static_
* .SKIP : String
* .CONTINUE : String
* .BREAK : String
* _inner_
* ~visitorFn(path, value, context) ⇒ undefined | String
* .guid() ⇒ String
* .mergeExports(receiver, supplier) ⇒ Object
Protean * .Rx
* .append ⇒ Observable.<String>
* .mv ⇒ Observable.<String>
* .fsWrapper ⇒ function
* .write ⇒ Observable.<String>
* .from(arg) ⇒ Observable
* [.cp(from, to, [opts])](#module_Protean.Rx.cp) ⇒ Observable.<fs.Stats>
* [.glob(pattern, [opts])](#module_Protean.Rx.glob) ⇒ Observable.<String>
* .isDirectory(paths) ⇒ Observable.<Boolean>
* .isFile(paths) ⇒ Observable.<Boolean>
* [.mkdir(paths, [opts])](#module_Protean.Rx.mkdir) ⇒ Observable.<String>
* [.read(patterns, [enc])](#module_Protean.Rx.read) ⇒ Observable.<(String\|Buffer)>
* [.rm(patterns, [recursive])](#module_Protean.Rx.rm) ⇒ Observable.<String>
* .stat(patterns) ⇒ Observable.<external:fs.Stats>
* .link(patterns) ⇒ Observable.<external:fs.Stats>
* .fd(fds) ⇒ Observable.<external:fs.Stats>
#### Rx.append ⇒ Observable.<String>
Kind: static property of Rx
| Param | Type |
| --- | --- |
| filepath | String |
| data | Buffer | String |
| [opts] | Object | String |
#### Rx.mv ⇒ Observable.<String>
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 |
#### Rx.fsWrapper ⇒ function
Kind: static property of Rx
| Param | Type |
| --- | --- |
| method | String |
#### Rx.write ⇒ Observable.<String>
Kind: static property of Rx
| Param | Type |
| --- | --- |
| filepath | String |
| data | Buffer | String |
| [opts] | Object | String |
#### Rx.from(arg) ⇒ Observable
File: rx/from.js
Kind: static method of Rx
| Param | Type |
| --- | --- |
| arg | Observable | Promise | Array | Object |
#### Rx.cp(from, to, [opts]) ⇒ Observable.<fs.Stats>
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 |
#### Rx.glob(pattern, [opts]) ⇒ Observable.<String>
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 |
#### Rx.isDirectory(paths) ⇒ Observable.<Boolean>
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> |
#### Rx.isFile(paths) ⇒ Observable.<Boolean>
File: rx/is-file.js
Kind: static method of Rx
| Param | Type |
| --- | --- |
| paths | String | Array.<String> | Observable.<String> |
#### Rx.mkdir(paths, [opts]) ⇒ Observable.<String>
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' |
#### Rx.read(patterns, [enc]) ⇒ Observable.<(String\|Buffer)>
File: rx/read.js
Kind: static method of Rx
| Param | Type |
| --- | --- |
| patterns | String | Array.<String> | Observable.<String> | Promise.<String> |
| [enc] | String |
#### Rx.rm(patterns, [recursive]) ⇒ Observable.<String>
File: rx/rm.js
Kind: static method of Rx
| Param | Type | Default |
| --- | --- | --- |
| patterns | String | Array.<String> | Observable.<String> | Promise.<String> | |
| [recursive] | Boolean | true |
#### Rx.stat(patterns) ⇒ Observable.<external:fs.Stats>
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>
##### stat.link(patterns) ⇒ Observable.<external:fs.Stats>
Kind: static method of stat
| Param | Type |
| --- | --- |
| patterns | String | Array.<String> | Observable.<String> | Promise.<String> |
##### stat.fd(fds) ⇒ Observable.<external:fs.Stats>
Kind: static method of stat
| Param | Type |
| --- | --- |
| fds | Integer | Array.<Integer> | Observable.<Integer> | Promise.<Integer> |
Protean Object - The object now with a immutable 'name' property of the| Param | Type |
| --- | --- |
| obj | Object |
| name | String |
Protean | Param | Type |
| --- | --- |
| property | String |
| subject | Object |
Kind: static property of Protean
| Param | Type |
| --- | --- |
| key | String |
| [obj] | Object |
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> |
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. |
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. |
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 |
File: object/augment.js
Kind: static method of Protean
| Param | Type |
| --- | --- |
| ...obj | Object |
File: object/enmap.js
Kind: static method of Protean
| Param | Type |
| --- | --- |
| ...args | Mixed |
File: object/enumerate.js
Kind: static method of Protean
| Type |
| --- |
| String |
Protean | Param | Type | Default | Description |
| --- | --- | --- | --- |
| obj | Object | | |
| visitor | visitorFn | | |
| [post] | Boolean | false | Do a post traversal |
* [.traverse(obj, visitor, [post])](#module_Protean.traverse)
* _static_
* .SKIP : String
* .CONTINUE : String
* .BREAK : String
* _inner_
* ~visitorFn(path, value, context) ⇒ undefined | String
#### traverse.SKIP : String
Kind: static constant of traverse
#### traverse.CONTINUE : String
Kind: static constant of traverse
#### traverse.BREAK : String
Kind: static constant of traverse
#### traverse~visitorFn(path, value, context) ⇒ undefined | String
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 |
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
Kind: static method of Protean
| Param | Type |
| --- | --- |
| receiver | Object |
| supplier | function | Object |
* Falcor
* .Graph
* .set ⇒ Object
* .atoms(graph, fn)
* ~visitorFn(path, atom, graph)
* [.fromObject(obj, [opts])](#module_Falcor.Graph.fromObject) ⇒ JSONGraph
* .isAtom(sentinel) ⇒ Boolean
* .isError(sentinel) ⇒ Boolean
* .isRef(sentinel) ⇒ Boolean
* .isRootRef(sentinel) ⇒ Boolean
* .isSentinel(sentinel) ⇒ Boolean
* .refs(graph, fn)
* ~visitorFn(path, ref, graph)
* .relative(root, graph) ⇒ JSONGraph
* .resolve(root, graph) ⇒ JSONGraph
* .rootRef(path, value, props) ⇒ Reference
* .sentinels(graph, fn)
* ~visitorFn(path, sentinel, graph)
* [.toObject(graph, [opts])](#module_Falcor.Graph.toObject) ⇒ JSONGraph
* .Path
* .relative(root, paths) ⇒ Array.<PathSet>
* .resolve(root, paths) ⇒ Array.<PathSet>
Kind: static property of Falcor
See: https://github.com/Netflix/falcor-json-graph
* .Graph
* .set ⇒ Object
* .atoms(graph, fn)
* ~visitorFn(path, atom, graph)
* [.fromObject(obj, [opts])](#module_Falcor.Graph.fromObject) ⇒ JSONGraph
* .isAtom(sentinel) ⇒ Boolean
* .isError(sentinel) ⇒ Boolean
* .isRef(sentinel) ⇒ Boolean
* .isRootRef(sentinel) ⇒ Boolean
* .isSentinel(sentinel) ⇒ Boolean
* .refs(graph, fn)
* ~visitorFn(path, ref, graph)
* .relative(root, graph) ⇒ JSONGraph
* .resolve(root, graph) ⇒ JSONGraph
* .rootRef(path, value, props) ⇒ Reference
* .sentinels(graph, fn)
* ~visitorFn(path, sentinel, graph)
* [.toObject(graph, [opts])](#module_Falcor.Graph.toObject) ⇒ JSONGraph
#### Graph.set ⇒ Object
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 |
#### Graph.fromObject(obj, [opts]) ⇒ JSONGraph
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 | [] |
#### Graph.isAtom(sentinel) ⇒ Boolean
File: falcor/graph/is-atom.js
Kind: static method of Graph
| Param | Type |
| --- | --- |
| sentinel | \* |
#### Graph.isError(sentinel) ⇒ Boolean
File: falcor/graph/is-error.js
Kind: static method of Graph
| Param | Type |
| --- | --- |
| sentinel | \* |
#### Graph.isRef(sentinel) ⇒ Boolean
File: falcor/graph/is-ref.js
Kind: static method of Graph
| Param | Type |
| --- | --- |
| sentinel | \* |
#### Graph.isRootRef(sentinel) ⇒ Boolean
File: falcor/graph/is-root-ref.js
Kind: static method of Graph
| Param | Type |
| --- | --- |
| sentinel | \* |
#### Graph.isSentinel(sentinel) ⇒ Boolean
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 |
#### Graph.relative(root, graph) ⇒ JSONGraph
File: falcor/graph/relative.js
Kind: static method of Graph
| Param | Type |
| --- | --- |
| root | Path |
| graph | JSONGraph |
#### Graph.resolve(root, graph) ⇒ JSONGraph
File: falcor/graph/resolve.js
Kind: static method of Graph
| Param | Type |
| --- | --- |
| root | Path |
| graph | JSONGraph |
#### Graph.rootRef(path, value, props) ⇒ Reference
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 |
#### Graph.toObject(graph, [opts]) ⇒ JSONGraph
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
* .relative(root, paths) ⇒ Array.<PathSet>
* .resolve(root, paths) ⇒ Array.<PathSet>
#### Path.relative(root, paths) ⇒ Array.<PathSet>
File: falcor/path/relative.js
Kind: static method of Path
| Param | Type |
| --- | --- |
| root | Path |
| paths | Array.<PathSet> |
#### Path.resolve(root, paths) ⇒ Array.<PathSet>
File: falcor/path/resolve.js
Kind: static method of Path
| Param | Type |
| --- | --- |
| root | Path |
| paths | Array.<PathSet> |
ProteanClassProteanClass DataSource * CollectionSource ⇐ ProteanClass
* [new CollectionSource([collection], [opts])](#new_CollectionSource_new)
* .options
* .indexedPath
* .keyedPath
* .lengthPath
* .addPath
* .removePath
* .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>
| Param | Type | Default |
| --- | --- | --- |
| [collection] | Collection | |
| [opts] | Object | |
| [opts.indexedPath] | Path | ['byIndex'] |
| [opts.keyedPath] | Path | ['byId'] |
Kind: instance property of CollectionSource
Properties
| Type |
| --- |
| Object |
* .options
* .indexedPath
* .keyedPath
* .lengthPath
* .addPath
* .removePath
#### 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 | Type |
| --- |
| external:FalcorRouter |
CollectionSource | Type |
| --- |
| Array.<Object> |
CollectionSource get | Param | Type |
| --- | --- |
| paths | Array.<PathSet> |
CollectionSource set | Param | Type |
| --- | --- |
| envelope | JSONGraphEnvelope |
CollectionSource call | Param | Type |
| --- | --- |
| path | PathSet |
| args | Array.<Mixed> |
| refSuffixes | Array.<PathSet> |
| thisPaths | Array.<PathSet> |
CollectionSource CollectionSource | Param | Type |
| --- | --- |
| paths | Array.<PathSets> |
CollectionSource | Param | Type |
| --- | --- |
| paths | Array.<PathSets> |
CollectionSource | Param | Type |
| --- | --- |
| graph | JSONGraph |
CollectionSource | Param | Type |
| --- | --- |
| path | PathSet |
| args | Array.<Mixed> |
| refSuffixes | Array.<PathSet> |
| thisPaths | Array.<PathSet> |
CollectionSource | Param | Type |
| --- | --- |
| path | PathSet |
| args | Array.<Mixed> |
| refSuffixes | Array.<PathSet> |
| thisPaths | Array.<PathSet> |
ProteanClassProteanClass DataSource * CompositeSource ⇐ ProteanClass
* new CompositeSource(...args)
* .sources
* .get(paths) ⇒ Observable.<JSONGraphEnvelope>
* .set(envelope) ⇒ Observable.<JSONGraphEnvelope>
* .call(path, args, refSuffixes, thisPaths) ⇒ Observable.<JSONGraphEnvelope>
* .add(path, source) ⇒ CompositeSource
This allows individual [DataSource]s 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 [Path]s and the resulting
[Graph] so it appears that everything comes from a larger [Graph].
Basically, all returned [Path]s/[Graph]s are updated to have any references
relative to their [Path]s 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
[Falcor]: http://netflix.github.io/falcor/doc/DataSource.html "Falcor"
[DataSource]: http://netflix.github.io/falcor/doc/DataSource.html "DataSource"
[Path]: http://netflix.github.io/falcor/doc/global.html#Path "Path"
[Graph]: http://netflix.github.io/falcor/documentation/jsongraph.html "Graph"
[Reference]: http://netflix.github.io/falcor/documentation/jsongraph.html#reference "Reference"
| Param | Type |
| --- | --- |
| ...args | Array.<Path, DataSource> |
CompositeSource | Type |
| --- |
| Object.<Path, ProxiedSource> |
CompositeSource get | Param | Type |
| --- | --- |
| paths | Array.<PathSets> |
CompositeSource set | Param | Type |
| --- | --- |
| envelope | JSONGraphEnvelope |
CompositeSource call | Param | Type |
| --- | --- |
| path | Path |
| args | Array.<Mixed> |
| refSuffixes | Array.<PathSet> |
| thisPaths | Array.<PathSet> |
CompositeSource CompositeSource - the CompositeSource instance | Param | Type |
| --- | --- |
| path | Path |
| source | DataSource |
ProteanClassProteanClass JSONGraphEnevelope * JSONGraphEnvelopeProxy ⇐ ProteanClass
* [new JSONGraphEnvelopeProxy([opts])](#new_JSONGraphEnvelopeProxy_new)
* .paths
* .jsonGraph
* .invalidated
* .expecting
* .pending
* [.set(pathOrGraph, [atom])](#JSONGraphEnvelopeProxy+set)
* .invalidate(...path)
* .fulfill(path)
* .expect(paths)
* .relativeFrom(from) ⇒ JSONGraphEnvelopeProxy
* .resolvedFrom(from) ⇒ JSONGraphEnvelopeProxy
* .merge(other)
* .destroy()
* .clone() ⇒ JSONGraphEnvelopeProxy
* .valueOf() ⇒ JSONGraphEnvelope
* .finalize() ⇒ JSONGraphEnvelope
| 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 | Type |
| --- |
| Array.<PathSet> |
JSONGraphEnvelopeProxy | Type |
| --- |
| JSONGraph |
JSONGraphEnvelopeProxy | Type |
| --- |
| Array.<PathSet> |
JSONGraphEnvelopeProxy | Type |
| --- |
| Object |
Kind: instance property of JSONGraphEnvelopeProxy
Read only: true
Properties
| Type |
| --- |
| Array.<Path> |
JSONGraphEnvelopeProxy | Param | Type |
| --- | --- |
| pathOrGraph | Path | JSONGraph |
| [atom] | Atom |
JSONGraphEnvelopeProxy | Param | Type |
| --- | --- |
| ...path | Path |
Kind: instance method of JSONGraphEnvelopeProxy
| Param | Type |
| --- | --- |
| path | Path |
Kind: instance method of JSONGraphEnvelopeProxy
| Param | Type |
| --- | --- |
| paths | Array.<PathSet> |
JSONGraphEnvelopeProxy JSONGraphEnvelopeProxy - A copy | Param | Type |
| --- | --- |
| from | Path |
JSONGraphEnvelopeProxy JSONGraphEnvelopeProxy - A copy | Param | Type |
| --- | --- |
| from | Path |
Kind: instance method of JSONGraphEnvelopeProxy
| Param | Type |
| --- | --- |
| other | JSONGraphEnvelopeProxy | JSONGraphEnvelope |
Kind: instance method of JSONGraphEnvelopeProxy
Kind: instance method of JSONGraphEnvelopeProxy
JSONGraphEnvelopeProxy JSONGraphEnvelopeProxy ProteanClassProteanClass DataSource * NoCacheSource ⇐ ProteanClass
* new NoCacheSource(opts)
* .get(paths) ⇒ Observable.<JSONGraphEnvelope>
* .set(envelope) ⇒ Observable.<JSONGraphEnvelope>
* .call(path, args, refSuffixes, thisPaths) ⇒ Observable.<JSONGraphEnvelope>
file: falcor/data-source/no-cache.js
| Param | Type |
| --- | --- |
| opts | Object |
| opts.source | DataSource |
NoCacheSource get | Param | Type |
| --- | --- |
| paths | Array.<PathSets> |
NoCacheSource set | Param | Type |
| --- | --- |
| envelope | JSONGraphEnvelope |
NoCacheSource call | Param | Type |
| --- | --- |
| path | PathSet |
| args | Array.<Mixed> |
| refSuffixes | Array.<PathSet> |
| thisPaths | Array.<PathSet> |
ProteanClassProteanClass DataSource * PartitionedSource ⇐ ProteanClass
* [new PartitionedSource([opts])](#new_PartitionedSource_new)
* .options
* .reads
* .writes
* .partitions
* .get(paths) ⇒ Observable.<JSONGraphEnvelope>
* .set(envelope) ⇒ Observable.<JSONGraphEnvelope>
* .call(path, args, refSuffixes, thisPaths) ⇒ Observable.<JSONGraphEnvelope>
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> | {} |
Kind: instance property of PartitionedSource
Properties
| Type |
| --- |
| Object |
* .options
* .reads
* .writes
* .partitions
#### 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> |
PartitionedSource get | Param | Type |
| --- | --- |
| paths | Array.<PathSet> |
PartitionedSource set | Param | Type |
| --- | --- |
| envelope | JSONGraphEnvelope |
PartitionedSource call | Param | Type |
| --- | --- |
| path | PathSet |
| args | Array.<Mixed> |
| refSuffixes | Array.<PathSet> |
| thisPaths | Array.<PathSet> |
ProteanClassProteanClass DataSource * ProxiedSource ⇐ ProteanClass
* [new ProxiedSource([opts])](#new_ProxiedSource_new)
* .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
File: falcor/data-source/proxied.js
| Param | Type |
| --- | --- |
| [opts] | Object |
| [opts.source] | DataSource |
| [opts.root] | Path |
ProxiedSource | Type |
| --- |
| DataSource |
ProxiedSource | Type |
| --- |
| Path |
ProxiedSource get | Param | Type |
| --- | --- |
| paths | Array.<PathSets> |
ProxiedSource set | Param | Type |
| --- | --- |
| envelope | JSONGraphEnvelope |
ProxiedSource call | Param | Type |
| --- | --- |
| path | PathSet |
| args | Array.<Mixed> |
| refSuffixes | Array.<PathSet> |
| thisPaths | Array.<PathSet> |
Kind: instance method of ProxiedSource
| Param | Type |
| --- | --- |
| paths | Array.<PathSet> |
Kind: instance method of ProxiedSource
| Param | Type |
| --- | --- |
| envelope | JSONGraphEnvelope |
Kind: instance method of ProxiedSource
| Param | Type |
| --- | --- |
| path | Path |
Kind: instance method of ProxiedSource
| Param | Type |
| --- | --- |
| envelope | JSONGraphEnvelope |
Kind: instance method of ProxiedSource
| Param | Type |
| --- | --- |
| envelope | JSONGraphEnvelope |
ProteanClassProteanClass DataSource * StorageSource ⇐ ProteanClass
* new StorageSource(opts)
* .model
* .source
* [.op