@pheasantplucker/failables
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "@pheasantplucker/failables", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "to protect against null and throwing errors", | ||
@@ -5,0 +5,0 @@ "main": "src/failable.js", |
@@ -20,5 +20,5 @@ const equal = require("assert").deepEqual | ||
const isSuccess = f => kind(f) === SUCCESS | ||
const isFailure = f => kind(f) === FAILURE | ||
const isEmpty = f => kind(f) === EMPTY | ||
const isSuccess = f => Array.isArray(f) && kind(f) === SUCCESS | ||
const isFailure = f => Array.isArray(f) && kind(f) === FAILURE | ||
const isEmpty = f => Array.isArray(f) && kind(f) === EMPTY | ||
const isFailable = f => { | ||
@@ -25,0 +25,0 @@ if (protocolVersion(f) === PROTOCOL_V1) { |
@@ -114,2 +114,5 @@ const equal = require('assert').deepEqual | ||
equal(isFailable({foo: 'bar'}), false) | ||
equal(isFailure(undefined), false) | ||
equal(isSuccess('s'), false) | ||
equal(isEmpty(7), false) | ||
}) | ||
@@ -116,0 +119,0 @@ it('should fail a non-failable array', () => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12030
290
0