0.1.2 • Published 2 years ago

pave-basic-types v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Pave Basic Types

A set of basic types for Pave

Included Types

  • String
  • Number
  • Object
  • Time
  • Datetime
  • Date
  • Boolean

Installation

Simply include this in your package.json and then spread this into your Pave schema index to have pre-baked types ready to go, as shown below

// In your schema root

import types from 'pave-basic-types';

export default {  ...types }

// ...or, if you prefer a selective choosing of the types provided by this package

import types from 'pave-basic-types';

const { string, boolean, ...etc } = types;

export default {  string,  boolean,  ...etc }

And now you have your basic scalar types defined

Footnotes

All errors thrown by values that don't fit types fit the same form;

Expected a value of type Type but was provided value Value

This is useful in the case that you'd like to implement your own wrapper error catching function, as you'll be able to predict the format of the caught error, and be able to do from there as you please.

0.1.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago