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

foliage

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

foliage - npm Package Compare versions

Comparing version 0.15.0 to 0.16.0-rc1

.babelrc

23

package.json
{
"name": "foliage",
"version": "0.15.0",
"version": "0.16.0-rc1",
"description": "A cursor like tree data structure.",
"main": "dist/Foliage.js",
"main": "src/Foliage.js",
"scripts": {
"coveralls": "CONTINUOUS_INTEGRATION=true npm test && coveralls < coverage/report-lcov/lcov.info",
"prepublish": "./scripts/prepublish",
"test": "NODE_ENV=test karma start",
"test:once": "CONTINUOUS_INTEGRATION=true npm test"
"coveralls": "make test-coverage",
"prepublish": "make build",
"test": "make test"
},

@@ -17,3 +16,5 @@ "repository": {

"license": "MIT",
"dependencies": {},
"dependencies": {
"karma-cli": "0.0.4"
},
"devDependencies": {

@@ -23,8 +24,5 @@ "babel": "^5.x.x",

"babel-runtime": "^5.x.x",
"chai": "^2.1.2",
"coveralls": "^2.11.2",
"istanbul": "^0.3.11",
"istanbul-instrumenter-loader": "^0.1.2",
"karma": "^0.12.32",
"karma-cli": "0.0.4",
"karma-coverage": "^0.2.7",

@@ -35,7 +33,4 @@ "karma-firefox-launcher": "^0.1.3",

"karma-sourcemap-loader": "^0.3.4",
"karma-spec-reporter": "0.0.19",
"karma-webpack": "^1.3.1",
"source-map-loader": "^0.1.3",
"webpack": "^1.7.2"
"karma-webpack": "^1.3.1"
}
}

@@ -28,6 +28,2 @@ /**

getState() {
return this.getRoot()._state
},
commit(state) {

@@ -38,4 +34,3 @@ this.getRoot()._state = state

get(key, fallback) {
let value = getIn(this.getState(), this.getPath(key))
return value === void 0 ? fallback : value
return getIn(this._state, this.getPath(key), fallback)
},

@@ -49,7 +44,7 @@

this.commit(assoc(this.getState(), this.getPath(key), value))
this.commit(assoc(this._state, this.getPath(key), value))
},
remove(key) {
this.commit(dissoc(this.getState(), this.getPath(key)))
this.commit(dissoc(this._state, this.getPath(key)))
},

@@ -77,3 +72,3 @@

valueOf() {
return getIn(this.getState(), this.getPath())
return getIn(this._state, this.getPath())
},

@@ -80,0 +75,0 @@

@@ -7,8 +7,11 @@ /**

* @param {Array} keys - A list of string keys
* @param {any} fallback - If the value is undefined, a fallback
*/
module.exports = function (obj, keys) {
return keys.reduce(function(tree, key) {
module.exports = function (obj, keys, fallback) {
let value = keys.reduce(function(tree, key) {
return tree ? tree[key] : undefined
}, obj)
return value === undefined ? fallback : value
}

Sorry, the diff of this file is not supported yet

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