Reference-context
Creates a virtual context that can hold values with given references 💫.
Reference-context allows you to lookup values on the context, get the number of references or values currently on the context and even assign a new unique reference to a given value.
This library is the core context of the libraries remote-lib and remote-context.
Install
npm install reference-context
Usage
const ReferenceContext = ; {}const foo = ; const parent = Object ;const referenceContext = foo parent; parentcount; // 1referenceContextcount; // 2referenceContextownCount; // 1 referenceContext; // truereferenceContext; // falsereferenceContext; // true referenceContext; // truereferenceContext; // false referenceContext; // ObjectreferenceContext; // foo referenceContext; // "Object"referenceContext; // "foo"
API Reference
This module is a part of the remote-lib
library.
Here is the relevant documentation for this module:
© 2017 Moshe Simantov
Licensed under the Apache License, Version 2.0.