15.2.2 • Published 1 year ago

papr v15.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Papr


  • TypeScript-safe schemas
  • JSON Schema MongoDB validation
  • :tada: Lightweight library
  • :rocket: Blazing fast

Github Actions NPM version Install size

papr is a lightweight library built around the MongoDB NodeJS driver, written in TypeScript.

papr uses MongoDB's JSON Schema validation feature to enable validation of document writes at runtime (requires MongoDB 3.6+).

papr has a familiar API - if you have used the raw mongodb methods to query and change documents before, then you already know how to use papr.

Sample code

import Papr, { schema, types } from 'papr';

const papr = new Papr();

const User = papr.model('users', schema({
  age: types.number(),
  firstName: types.string({ required: true }),
  lastName: types.string({ required: true }),
}));

const johnWick = await User.find({ firstName: 'John', lastName: 'Wick' });

Documentation

Read the documentation at: plexinc.github.io/papr

Contributing

Please read the contributing guidelines.

Before contributing, please read the Code of conduct.

License

MIT

Inspiration

15.2.2

1 year ago

15.2.1

1 year ago

15.2.0

1 year ago

15.1.0

1 year ago

15.0.0

2 years ago

14.1.0

2 years ago

14.0.0

2 years ago

13.1.0

2 years ago

10.0.0-0

2 years ago

10.0.0

2 years ago

10.1.0

2 years ago

13.0.0

2 years ago

11.0.0-0

2 years ago

12.0.0

2 years ago

11.0.0-1.0

2 years ago

12.0.0-0

2 years ago

11.0.0

2 years ago

11.1.0

2 years ago

9.2.1

3 years ago

9.2.0

3 years ago

7.3.1

3 years ago

7.2.2

3 years ago

7.3.0

3 years ago

8.1.0

3 years ago

8.0.0

3 years ago

8.2.0

3 years ago

9.1.0

3 years ago

9.0.0

3 years ago

5.0.0

3 years ago

6.0.0

3 years ago

7.0.0

3 years ago

7.2.1

3 years ago

7.2.0

3 years ago

7.1.0

3 years ago

7.0.1

3 years ago

3.0.1

3 years ago

4.0.0

3 years ago

3.0.0

3 years ago

2.3.0

3 years ago

2.3.0-0

3 years ago

2.2.0

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.3

4 years ago

1.0.2

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

1.0.3

4 years ago

2.0.0-1

4 years ago

2.0.0-0

4 years ago

2.0.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.0

4 years ago