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

is-blank

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-blank - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

license

18

index.js

@@ -1,10 +0,14 @@

var isEmpty = require('is-empty');
var isWhitespace = require('is-whitespace');
var isEmpty = require('is-empty')
var isWhitespace = require('is-whitespace')
module.exports = function isBlank(object) {
if(typeof object == 'string' && object.length) {
return isWhitespace(object);
module.exports = function isBlank (object) {
if (typeof object === 'boolean') {
return false
}
if (typeof object === 'string' && object.length) {
return isWhitespace(object)
} else {
return isEmpty(object);
return isEmpty(object)
}
};
}
{
"name": "is-blank",
"version": "1.0.0",
"version": "1.1.0",
"description": "Check whether a value is empty or blank, includes string whitespace support.",
"author": "John Otander <johnotander@gmail.com> (http://johnotander.com/)",
"main": "index.js",
"directories": {
"test": "test"
},
"files": [
"index.js"
],
"scripts": {
"test": "mocha test"
"test": "ava"
},

@@ -24,3 +25,2 @@ "repository": {

],
"author": "John Otander <johnotander@gmail.com> (http://johnotander.com/)",
"license": "MIT",

@@ -32,3 +32,3 @@ "bugs": {

"devDependencies": {
"mocha": "^2.0.1"
"ava": "*"
},

@@ -35,0 +35,0 @@ "dependencies": {

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