New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

papr

Package Overview
Dependencies
Maintainers
3
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

papr - npm Package Compare versions

Comparing version 0.0.0 to 1.0.0

cjs/hooks.d.ts

122

package.json
{
"name": "papr",
"version": "0.0.0",
"description": "",
"main": "index.js",
"description": "MongoDB TypeScript-aware Models",
"author": "Plex Inc.",
"version": "1.0.0",
"keywords": [
"mongodb",
"database",
"model",
"schema",
"json",
"json-schema",
"validation",
"typescript",
"types"
],
"license": "MIT",
"engines": {
"node": "^14.0.0 || >=15.0.0"
},
"type": "module",
"types": "./esm/index.d.ts",
"main": "./cjs/index.js",
"exports": {
"import": "./esm/index.js",
"require": "./cjs/index.js"
},
"files": [
"cjs/*",
"esm/*"
],
"repository": {
"type": "git",
"url": "git+https://github.com/plexinc/papr.git"
},
"homepage": "https://plexinc.github.io/papr/",
"bugs": {
"url": "https://github.com/plexinc/papr/issues/new"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build": "tsc --project ./tsconfig-esm.json && tsc --project ./tsconfig-cjs.json && echo \"{\\\"type\\\":\\\"commonjs\\\"}\" > ./cjs/package.json",
"docs": "node docs/build.js && docsify serve ./docs",
"benchmark": "yarn build && node --experimental-specifier-resolution=node ./benchmark/run.js",
"lint": "eslint --ext .ts ./src",
"prepack": "yarn build",
"prepare": "husky install",
"pretty": "prettier '**/*.ts' --write",
"pretty:ci": "prettier '**/*.ts' --check",
"release": "standard-version --infile docs/CHANGELOG.md",
"test": "jest",
"test:build": "./tests/build.sh",
"test:types": "tsc"
},
"author": "Plex Inc.",
"license": "MIT"
"devDependencies": {
"@babel/core": "7.13.16",
"@babel/preset-env": "7.13.15",
"@babel/preset-typescript": "7.13.0",
"@commitlint/cli": "12.1.1",
"@commitlint/config-conventional": "12.1.1",
"@types/jest": "26.0.22",
"@types/mongodb": "3.6.12",
"@typescript-eslint/eslint-plugin": "4.22.0",
"@typescript-eslint/parser": "4.22.0",
"docsify-cli": "4.4.3",
"eslint": "7.24.0",
"eslint-config-prettier": "8.2.0",
"eslint-config-standard": "16.0.2",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "3.4.0",
"eslint-plugin-promise": "5.1.0",
"husky": "6.0.0",
"jest": "26.6.3",
"jsdoc-api": "7.0.1",
"jsdoc-parse": "6.0.0",
"lint-staged": "10.5.4",
"mongodb": "3.6.6",
"mongodb-memory-server-global-4.4": "6.9.6",
"mongoose": "5.12.5",
"prettier": "2.2.1",
"standard-version": "9.2.0",
"ts-expect": "1.3.0",
"ts-node": "9.1.1",
"typescript": "4.2.4"
},
"peerDependencies": {
"mongodb": "3.x"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
],
"rules": {
"subject-case": [
2,
"always",
[
"sentence-case"
]
]
}
},
"lintstaged": {
"*.ts": [
"eslint --fix"
],
"src/*.ts": [
"node docs/build.js",
"git add docs/"
]
},
"prettier": {
"printWidth": 100,
"singleQuote": true,
"trailingComma": "es5"
},
"volta": {
"node": "14.16.0",
"yarn": "1.22.10"
}
}
# papr
TBA
![](https://github.com/plexinc/papr/actions/workflows/ci.yaml/badge.svg)
`papr` is a lightweight library built around the MongoDB NodeJS driver, written in TypeScript.
`papr` uses MongoDB's [JSON Schema validation](https://docs.mongodb.com/manual/core/schema-validation/#json-schema) 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
<!-- prettier-ignore -->
```ts
import { 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](https://plexinc.github.io/papr/)
## Contributing
This repository is following the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard.
## License
MIT
## Inspiration
- [Mongoose](https://mongoosejs.com/)
- [ts-mongoose](https://github.com/lstkz/ts-mongoose)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc