ProtoDef-io / node-protodef

Describe your protocol, and read it with ease.
MIT License
31 stars 18 forks source link

Add primitive variables #125

Closed extremeheat closed 3 years ago

extremeheat commented 3 years ago

Adds support for primitive type variables in ProtoDef. Whereas a normal type would be an array or an object, a primitive type (string, numeric, boolean) can be used in switch statements and changed dynamically.

extremeheat commented 3 years ago

Added to the docs in https://github.com/ProtoDef-io/ProtoDef/pull/42

Looks like there's still a test schema validation error, though not sure how to fix it.