package
Provides a container which can hold different kinds of Type.
npm install type-registryGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 4 packages.
1.3 MB
Includes dependencies.
A simple container used to declare different kinds of Type.
Yeah. This doesn't make much sense in isolation, it's part of a larger (soon to be released) project centering around typed objects.
Install via npm.
npm install type-registryimport TypeRegistry from "type-registry";
const Uint32 = {
id: 1, // Unique id for this type, mandatory
name: 'UInt32', // Unique name for this type, can be a string or symbol, mandatory.
anythingElseYouWant: 'goes here'
};
const Float64 = {
id: 2,
name: 'Float64'
};
const registry = new TypeRegistry();
registry.has(Uint32); // false
registry.add(Uint32);
registry.has(Uint32); // true
let added =
Published by codemix under a permissive MIT License, see LICENSE.md.