Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

policeman

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

policeman - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

4

CHANGELOG.md
# CHANGELOG
## 0.2.2
* Improve example in README
## 0.2.1

@@ -4,0 +8,0 @@

2

package.json
{
"name": "policeman",
"version": "0.2.1",
"version": "0.2.2",
"description": "Lightweight yet powerful schema validator",

@@ -5,0 +5,0 @@ "main": "lib/policeman.js",

@@ -31,3 +31,3 @@ # policeman

// setup entry filter predicates
const skipIfGift: Filter = (value: any, source: User) => source.gift === true;
const isGift: Filter = (value, source) => source.gift === true;

@@ -43,3 +43,3 @@ // define schema

["name", "name", requiredValidator], // #3
["giftCode", "giftCode", requiredValidator, skipIfGift], // #4
["giftCode", "giftCode", requiredValidator, isGift], // #4
];

@@ -46,0 +46,0 @@

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