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.16.0 to 0.17.0

docs/assets/foliage.png

3

docs/cheatsheet.md

@@ -11,3 +11,4 @@ # API Cheatsheet

remove - Remove a location in a tree
refine - Return a cursor to a specific location
refine - Return a cursor to a specific location
clear - Revert state to undefined

@@ -14,0 +15,0 @@ Traversal

@@ -1,2 +0,2 @@

module.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){function r(t){this._path=[],this._root=this,this._state=t}var i=n(3),u=n(4),o=n(1);r.prototype={getPath:function(t){return this._path.concat(t).filter(function(t){return void 0!==t})},getRoot:function(){return this._root},commit:function(t){this.getRoot()._state=t},get:function(t,e){return o(this._state,this.getPath(t),e)},set:function(t,e){1===arguments.length&&(e=arguments[0],t=void 0),this.commit(i(this._state,this.getPath(t),e))},remove:function(t){this.commit(u(this._state,this.getPath(t)))},refine:function(t){return Object.create(this,{_path:{value:this.getPath(t)}})},keys:function(){return Object.keys(this.valueOf()||{})},values:function(){return this.keys().map(function(t){return this.get(t)},this)},valueOf:function(){return o(this._state,this.getPath())},toJSON:function(){return this.valueOf()},is:function(t){return t.valueOf()==this.valueOf()},find:function(t,e){return this.filter(t,e)[0]},includes:function(t){return this.indexOf(t)>-1},first:function(){return this.values().shift()},last:function(){return this.values().pop()},size:function(){return this.values().length}};var s=["sort","map","reduce","filter","forEach","some","every","join","indexOf"];s.forEach(function(t){r.prototype[t]=function(){var e;return(e=this.values())[t].apply(e,arguments)}}),t.exports=r},function(t,e,n){t.exports=function(t,e,n){var r=e.reduce(function(t,e){return t?t[e]:void 0},t);return void 0===r?n:r}},function(t,e,n){t.exports=function(t){if(Array.isArray(t))return t.slice();var e={};for(var n in t)e[n]=t[n];return e}},function(t,e,n){var r=n(2),i=n(1);t.exports=function u(t,e,n){if(i(t,e)===n)return t;var o=e[0],s=e.slice(1),f=r(t);return e.length>1?f[o]=u(i(f,[o])||{},s,n):o?f[o]=n:f=n,f}},function(t,e,n){var r=n(2),i=n(1);t.exports=function u(t,e){if(void 0===i(t,e))return t;var n=e[0],o=e.slice(1),s=r(t);return o.length?(s[n]=u(t[n],o),0===Object.keys(s[n]).length&&delete s[n]):delete s[n],s}}]);
module.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){function r(t){this._path=[],this._root=this,this.commit(t)}var i=n(3),o=n(4),u=n(1);r.prototype={getPath:function(t){return this._path.concat(t).filter(function(t){return void 0!==t})},getRoot:function(){return this._root},commit:function(t){this.getRoot()._state=t},clear:function(){this.commit()},get:function(t,e){return u(this._state,this.getPath(t),e)},set:function(t,e){1===arguments.length&&(e=arguments[0],t=void 0),this.commit(i(this._state,this.getPath(t),e))},remove:function(t){this.commit(o(this._state,this.getPath(t)))},refine:function(t){return Object.create(this,{_path:{value:this.getPath(t)}})},keys:function(){return Object.keys(this.valueOf()||{})},values:function(){return this.keys().map(function(t){return this.get(t)},this)},valueOf:function(){return u(this._state,this.getPath())},toJSON:function(){return this.valueOf()},is:function(t){return t.valueOf()==this.valueOf()},find:function(t,e){return this.filter(t,e)[0]},includes:function(t){return this.indexOf(t)>-1},first:function(){return this.values().shift()},last:function(){return this.values().pop()},size:function(){return this.values().length}};var s=["sort","map","reduce","filter","forEach","some","every","join","indexOf"];s.forEach(function(t){r.prototype[t]=function(){var e;return(e=this.values())[t].apply(e,arguments)}}),t.exports=r},function(t,e,n){t.exports=function(t,e,n){var r=e.reduce(function(t,e){return t?t[e]:void 0},t);return void 0===r?n:r}},function(t,e,n){t.exports=function(t){if(Array.isArray(t))return t.slice();var e={};for(var n in t)e[n]=t[n];return e}},function(t,e,n){var r=n(2),i=n(1);t.exports=function o(t,e,n){if(i(t,e)===n)return t;var u=e[0],s=e.slice(1),c=r(t);return e.length>1?c[u]=o(i(c,[u])||{},s,n):u?c[u]=n:c=n,c}},function(t,e,n){var r=n(2),i=n(1);t.exports=function o(t,e){if(void 0===i(t,e))return t;var n=e[0],u=e.slice(1),s=r(t);return u.length?(s[n]=o(t[n],u),0===Object.keys(s[n]).length&&delete s[n]):delete s[n],s}}]);
//# sourceMappingURL=foliage.build.js.map
{
"name": "foliage",
"version": "0.16.0",
"version": "0.17.0",
"description": "A cursor like tree data structure.",
"main": "src/Foliage.js",
"contributors": [
{
"name": "Nate Hunzaker",
"email": "nate.hunzaker@viget.com",
"url": "http://viget.com"
}
],
"repository": {

@@ -10,6 +17,3 @@ "type": "git",

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

@@ -34,2 +34,2 @@ /**

};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hc3NvYy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBVUEsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFBO0FBQzVCLElBQUksR0FBRyxHQUFJLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQTs7QUFFM0IsTUFBTSxDQUFDLE9BQU8sR0FBRyxTQUFTLEtBQUssQ0FBRSxHQUFHLEVBQUUsSUFBSSxFQUFFLEtBQUssRUFBRTtBQUNqRCxNQUFJLEdBQUcsQ0FBQyxHQUFHLEVBQUUsSUFBSSxDQUFDLEtBQUssS0FBSyxFQUFFO0FBQzVCLFdBQU8sR0FBRyxDQUFBO0dBQ1g7O01BRUssSUF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Wx1ZSlcbiAgfSBlbHNlIGlmIChoZWFkKSB7XG4gICAgY2xvbmVbaGVhZF0gPSB2YWx1ZVxuICB9IGVsc2Uge1xuICAgIGNsb25lID0gdmFsdWVcbiAgfVxuXG4gIHJldHVybiBjbG9uZVxufVxuIl19

@@ -10,6 +10,6 @@ /**

// Arrays get out cheap
if (Array.isArray(obj)) {
return obj.slice();
}var clone = {};
if (Array.isArray(obj)) return obj.slice();
var clone = {};
for (var key in obj) {

@@ -21,2 +21,2 @@ clone[key] = obj[key];

};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb3B5LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFPQSxNQUFNLENBQUMsT0FBTyxHQUFHLFNBQVMsSUFBSSxDQUFDLEdBQUcsRUFBRTs7QUFFbEMsTUFBSSxLQUFLLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQztBQUFFLFdBQU8sR0FBRyxDQUFDLEtBQUssRUFBRSxDQUFBO0dBQUEsQUFFMUMsSUFBSSxLQUFLLEdBQUcsRUFBRSxDQUFBOztBQUVkLE9BQUssSUFBSSxHQUFHLElBQUksR0FBRyxFQUFFO0FBQ25CLFNBQUssQ0FBQyxHQUFHLENBQUMsR0FBRyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUE7R0FDdEI7O0FBRUQsU0FBTyxLQUFLLENBQUE7Q0FDYixDQUFBIiwiZmlsZSI6InNyYy9jb3B5LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5XG4gKiBTaGFsbG93IGNvcHkgYW4gb2JqZWN0LlxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fSBvYmogLSBUaGUgdGFyZ2V0IG9iamVjdFxuICovXG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gY29weShvYmopIHtcbiAgLy8gQXJyYXlzIGdldCBvdXQgY2hl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KiBAcGFyYW0ge09iamVjdH0gb2JqICAtIFRoZSB0YXJnZXQgb2JqZWN0XG4gKiBAcGFyYW0ge0FycmF5fSBrZXlzIC0gQSBsaXN0IG9mIHN0cmluZyBrZXlzXG4gKi9cblxubGV0IGNvcHkgPSByZXF1aXJlKCcuL2NvcHknKVxubGV0IGdldCAgPSByZXF1aXJlKCcuL2dldCcpXG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gZGlzc29jIChvYmosIGtleXMpIHtcbiAgaWYgKGdldChvYmosIGtleXMpID09PSB1bmRlZmluZWQpIHtcbiAgICByZXR1cm4gb2JqXG4gIH1cblxuICBsZXQgWyBoZWFkLCAuLi50YWlsIF0gPSBrZXlzXG4gIGxldCBjbG9uZSA9IGNvcHkob2JqKVxuXG4gIGlmICh0YWlsLmxlbmd0aCkge1xuICAgIGNsb25lW2hlYWRdID0gZGlzc29jKG9ialtoZWFkXSwgdGFpbClcblxuICAgIC8vIEF1dG9wcnVuZSBrZXlzXG4gICAgaWYgKE9iamVjdC5rZXlzKGNsb25lW2hlYWRdKS5sZW5ndGggPT09IDApIHtcbiAgICAgIGRlbGV0ZSBjbG9uZVtoZWFkXVxuICAgIH1cbiAgfSBlbHNlIHtcbiAgICBkZWxldGUgY2xvbmVbaGVhZF1cbiAgfVxuXG4gIHJldHVybiBjbG9uZVxufVxuIl19

@@ -15,3 +15,4 @@ /**

this._root = this;
this._state = state;
this.commit(state);
}

@@ -35,2 +36,6 @@

clear: function clear() {
this.commit();
},
get: function get(key, fallback) {

@@ -118,2 +123,2 @@ return getIn(this._state, this.getPath(key), fallback);

module.exports = Foliage;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Gb2xpYWdlLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFPQSxJQUFJLEtBQUssR0FBSSxPQUFPLENBQUMsU0FBUyxDQUFDLENBQUE7Q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VdID0gZnVuY3Rpb24oKSB7XG4gICAgcmV0dXJuIHRoaXMudmFsdWVzKClbbmFtZV0oLi4uYXJndW1lbnRzKVxuICB9XG59KVxuXG5tb2R1bGUuZXhwb3J0cyA9IEZvbGlhZ2VcbiJdfQ==

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