Socket
Socket
Sign inDemoInstall

has-value

Package Overview
Dependencies
4
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.1 to 0.3.0

15

index.js

@@ -10,14 +10,11 @@ /*!

var isObject = require('isobject');
var hasValues = require('has-values');
var get = require('get-value');
var hasValues = require('has-values');
module.exports = function (o, path, fn) {
var len = arguments.length;
if (len === 1 || (len === 2 && typeof path === 'boolean')) {
return hasValues.apply(hasValues, arguments);
module.exports = function (obj, prop, noZero) {
if (isObject(obj)) {
return hasValues(get(obj, prop), noZero);
}
if (len === 3 && typeof fn === 'boolean') {
return hasValues(get.apply(get, arguments), fn);
}
return hasValues(get.apply(get, arguments));
return hasValues(obj, prop);
};

14

package.json
{
"name": "has-value",
"description": "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.",
"version": "0.2.1",
"version": "0.3.0",
"homepage": "https://github.com/jonschlinkert/has-value",

@@ -24,7 +24,7 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"get-value": "^2.0.0",
"has-values": "^0.1.3"
"has-values": "^0.1.3",
"isobject": "^2.0.0"
},
"devDependencies": {
"mocha": "*",
"should": "^4.0.4"
"mocha": "*"
},

@@ -58,3 +58,2 @@ "keywords": [

"related": {
"description": "",
"list": [

@@ -65,5 +64,6 @@ "get-value",

"get-object"
]
],
"description": ""
}
}
}
}

@@ -123,2 +123,2 @@ # has-value [![NPM version](https://badge.fury.io/js/has-value.svg)](http://badge.fury.io/js/has-value) [![Build Status](https://travis-ci.org/jonschlinkert/has-value.svg)](https://travis-ci.org/jonschlinkert/has-value)

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 30, 2015._
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 23, 2015._
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc