Comparing version
# 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 @@ |
@@ -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", |
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
147011
0.26%2183
0.14%0
-100%14
27.27%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed