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.3.0 to 0.3.1

benchmark/code/for-path-escape-check.js

7

.verbrc.md

@@ -9,2 +9,9 @@ # {%= name %} {%= badge("fury") %}

## Benchmarks
```bash
node benchmark
```
## Usage

@@ -11,0 +18,0 @@

15

index.js

@@ -42,3 +42,3 @@ /*!

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

@@ -54,12 +54,9 @@ if (typeof last === 'object') {

function replaceStr(str, pattern, replacement) {
var i, from = 0;
while (str.indexOf(pattern, from) !== -1) {
i = str.indexOf(pattern, from);
from = i + pattern.length;
str = str.substr(0, i)
+ replacement
+ str.substr(from, str.length);
from = i + replacement.length;
var i = str.indexOf(pattern);
var end = i + pattern.length;
str = str.substr(0, i) + replacement + str.substr(end, str.length);
if (str.indexOf(pattern, end) !== -1) {
str = replace(str, pattern, replacement);
}
return str;
}

6

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

@@ -31,2 +31,4 @@ "author": {

"devDependencies": {
"benchmarked": "^0.1.1",
"getobject": "^0.1.0",
"mocha": "*",

@@ -59,2 +61,2 @@ "should": "^4.0.4",

}
}
}

@@ -10,2 +10,9 @@ # get-value [![NPM version](https://badge.fury.io/js/get-value.svg)](http://badge.fury.io/js/get-value)

## Benchmarks
```bash
node benchmark
```
## Usage

@@ -64,2 +71,2 @@

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 18, 2014._
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 26, 2014._

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

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

@@ -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