brisky-is-empty
Advanced tools
Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "brisky-is-empty", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Checks if a [vigour-base](https://www.npmjs.com/package/vigour-base) object is empty", | ||
@@ -18,3 +18,3 @@ "main": "lib/index.js", | ||
"keywords": [ | ||
"vigour-base", | ||
"brisky-base", | ||
"brisky" | ||
@@ -36,4 +36,3 @@ ], | ||
"devDependencies": { | ||
"ducktape": "^1.0.1", | ||
"budo": "^9.0.0", | ||
"brisky-base": "^4.0.0", | ||
"coveralls": "^2.11.12", | ||
@@ -45,4 +44,3 @@ "istanbul": "^0.4.5", | ||
"tap-difflet": "0.6.0", | ||
"tape": "^4.6.0", | ||
"vigour-base": "^3.6.0" | ||
"tape": "^4.6.0" | ||
}, | ||
@@ -49,0 +47,0 @@ "browserify": { |
# brisky-is-empty | ||
Checks if a [vigour-base](https://www.npmjs.com/package/vigour-base) object is empty | ||
- **obj** (*object*) - the object to check for emptiness | ||
- **returns** (*boolean*) empty - `true` if `obj` is considered empty, `false` otherwise | ||
Checks if a [brisky-base](https://www.npmjs.com/package/brisky-base) object is empty | ||
@@ -18,2 +16,2 @@ [![Build Status](https://travis-ci.org/vigour-io/brisky-is-empty.svg?branch=master)](https://travis-ci.org/vigour-io/brisky-is-empty) | ||
isEmpty(base({ awesome: true })) // false | ||
``` | ||
``` |
'use strict' | ||
const test = require('tape') | ||
const Base = require('vigour-base') | ||
const base = require('brisky-base') | ||
const isEmpty = require('../') | ||
@@ -10,10 +9,10 @@ const testCases = [ | ||
[{ a: true }, false], | ||
[new Base({}), true], | ||
[new Base({ a: 'a' }), false], | ||
[new Base({ a: { val: null } }), true], | ||
[new Base({ a: { val: void 0 } }), false], | ||
[new Base({ properties: { shawn: true }, shawn: {} }), true] | ||
[base({}), true], | ||
[base({ a: 'a' }), false], | ||
[base({ a: { val: null } }), true], | ||
[base({ a: { val: void 0 } }), false], | ||
[base({ properties: { shawn: true }, shawn: {} }), true] | ||
] | ||
test('isEmpty - base', function (t) { | ||
test('isEmpty - base', t => { | ||
t.plan(testCases.length) | ||
@@ -20,0 +19,0 @@ testCases.forEach(function (item) { |
Sorry, the diff of this file is not supported yet
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
95623
8
9
17