Optional
clean: booleanPrivate
_bufReturn string representation of the key
Returns whether this key is a prefix of other
The other key to test against
new Key('/Comedy').isAncestorOf('/Comedy/MontyPython')
// => true
Returns whether this key is a contains another as prefix.
The other Key to test against
new Key('/Comedy/MontyPython').isDecendantOf('/Comedy')
// => true
Check if the given key is sorted lower than ourself.
The other Key to check against
Convert to the string representation
Optional
encoding: SupportedEncodings = 'utf8'The encoding to use.
Return the Uint8Array representation of the key
Static
asStatic
randomStatic
with
A Key represents the unique identifier of an object. Our Key scheme is inspired by file systems and Google App Engine key model. Keys are meant to be unique across a system. Keys are hierarchical, incorporating more and more specific namespaces. Thus keys can be deemed 'children' or 'ancestors' of other keys:
new Key('/Comedy')
new Key('/Comedy/MontyPython')
Also, every namespace can be parametrized to embed relevant object information. For example, the Keyname
(most specific namespace) could include the object type:new Key('/Comedy/MontyPython/Actor:JohnCleese')
new Key('/Comedy/MontyPython/Sketch:CheeseShop')
new Key('/Comedy/MontyPython/Sketch:CheeseShop/Character:Mousebender')