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

get-value

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-value - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

7

index.js

@@ -13,8 +13,5 @@ /*!

module.exports = function getValue(o, prop) {
if (o == null) {
if (o == null || !isObject(o)) {
return {};
}
if (o && !isObject(o)) {
return {};
}
if (prop == null) {

@@ -32,3 +29,3 @@ return o;

if (o == null) {
return null;
return {};
}

@@ -35,0 +32,0 @@ }

{
"name": "get-value",
"description": "Use property paths (`a.b.c`) get a nested value from an object.",
"version": "0.2.0",
"version": "0.2.1",
"homepage": "https://github.com/jonschlinkert/get-value",

@@ -6,0 +6,0 @@ "author": {

@@ -24,6 +24,6 @@ /*!

it('should return null if the path is not found', function () {
it('should return an empty object if the path is not found', function () {
var fixture = {};
(get(fixture, 'a.locals.name') == null).should.be.true;
(get(fixture, 'b.locals.name') == null).should.be.true;
get(fixture, 'a.locals.name').should.eql({});
get(fixture, 'b.locals.name').should.eql({});
});

@@ -30,0 +30,0 @@

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