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

obey

Package Overview
Dependencies
Maintainers
3
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

obey - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

4

CHANGELOG.md

@@ -0,1 +1,5 @@

### v4.0.2 (2019-06-01):
* Fixed bug in `zip` type that disallowed numeric values. Now values are coerced to strings before validation checks.
### v4.0.1 (2019-05-16):

@@ -2,0 +6,0 @@

2

package.json
{
"name": "obey",
"version": "4.0.1",
"version": "4.0.2",
"description": "Data modelling and validation library",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -7,3 +7,4 @@ const zip = {

default: context => {
if (context.value == null || !context.value.length || !context.value.toString().match(zip._regex.default)) {
const stringified = context.value != null && context.value.toString()
if (!stringified || !stringified.length || !stringified.match(zip._regex.default)) {
context.fail('Value must be a valid US zip code')

@@ -13,3 +14,4 @@ }

ca: context => {
if (context.value == null || !context.value.length || !context.value.toString().match(zip._regex.ca)) {
const stringified = context.value != null && context.value.toString()
if (!stringified || !stringified.length || !stringified.match(zip._regex.ca)) {
context.fail('Value must be a valid Canadian zip code')

@@ -16,0 +18,0 @@ }

Sorry, the diff of this file is not supported yet

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