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

bedrock

Package Overview
Dependencies
Maintainers
5
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bedrock - npm Package Compare versions

Comparing version 3.3.0 to 3.3.1

5

CHANGELOG.md
# bedrock ChangeLog
## 3.3.1 - 2020-12-07
### Changed
- Replace `lodash` dependency with standalone per method packages.
## 3.3.0 - 2020-10-22

@@ -4,0 +9,0 @@

23

lib/util.js

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

const _ = require('lodash');
const config = require('./config');
const delay = require('delay');
const lodashGet = require('lodash.get');
const lodashSet = require('lodash.set');
const lodashTemplate = require('lodash.template');
const lodashToPath = require('lodash.topath');
const util = require('util');

@@ -263,9 +266,9 @@ const uuid = require('uuid-random');

if(typeof path === 'string') {
path = _.toPath(path);
path = lodashToPath(path);
}
if(path.length) {
let target = _.get(object, path);
let target = lodashGet(object, path);
if(!target) {
target = value;
_.set(object, path, target);
lodashSet(object, path, target);
}

@@ -304,6 +307,6 @@ return target;

if(!_isPath(path)) {
Object.keys(path).forEach(key => _.set(this.object, key, path[key]));
Object.keys(path).forEach(key => lodashSet(this.object, key, path[key]));
return;
}
_.set(this.object, path, value);
lodashSet(this.object, path, value);
};

@@ -365,3 +368,3 @@

// handle strings as templates
fnOrExpression = _.template(fnOrExpression);
fnOrExpression = lodashTemplate(fnOrExpression);
} else if(typeof fnOrExpression !== 'function') {

@@ -373,3 +376,3 @@ // handle non-string non-functions as simple values

if(typeof path === 'string') {
path = _.toPath(path);
path = lodashToPath(path);
}

@@ -431,5 +434,5 @@ // locals

// get target or default array
const target = _.get(this.object, path, []);
const target = lodashGet(this.object, path, []);
// add next index
const pushPath = _.toPath(path);
const pushPath = lodashToPath(path);
pushPath.push(target.length);

@@ -436,0 +439,0 @@ // use default parent array

{
"name": "bedrock",
"version": "3.3.0",
"version": "3.3.1",
"description": "A core foundation for rich Web applications.",

@@ -32,3 +32,6 @@ "license": "SEE LICENSE IN LICENSE.md",

"errio": "^1.2.2",
"lodash": "^4.17.14",
"lodash.get": "^4.4.2",
"lodash.set": "^4.3.2",
"lodash.template": "^4.5.0",
"lodash.topath": "^4.5.2",
"pkginfo": "^0.4.1",

@@ -35,0 +38,0 @@ "uid-number": "0.0.6",

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