Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
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
.
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' });
Read the documentation at: plexinc.github.io/papr
Please read the contributing guidelines.
Before contributing, please read the Code of conduct.
MIT
FAQs
MongoDB TypeScript-aware Models
The npm package papr receives a total of 4,047 weekly downloads. As such, papr popularity was classified as popular.
We found that papr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.