2.0.3 • Published 5 years ago

@hldprk/type v2.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

This package defines a utlity class for simple type-checking using a new Type class.

Type is constructed using one or more constructor functions (like String) or strings (like 'string' or 'number') for primitive types.

Type also has two methods, compare and check, which act to test objects against the type information which is held by the Type.

compare accepts any object and returns an array containing booleans which represent whether or not the given object matches the held type information.

check accepts any object and will throw an error if none of the held type information matches the given object.

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago