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.19.0 to 0.19.1

2

foliage.build.js

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

module.exports=function(t){function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){function r(t){s(this),this._path=[],this._root=this,this.commit(t)}var i=e(3),u=e(4),o=e(1),s=e(5);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,this.volley(t)},clear:function(){this.commit()},get:function(t,n){return o(this._state,this.getPath(t),n)},set:function(t,n){1===arguments.length&&(n=arguments[0],t=void 0),this.commit(i(this._state,this.getPath(t),n))},update:function(t,n){1===arguments.length&&(n=arguments[0],t=void 0);for(var e in n)this.set([t,e],n[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,n){return this.filter(t,n)[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 a=["sort","map","reduce","filter","forEach","some","every","join","indexOf"];a.forEach(function(t){r.prototype[t]=function(){var n;return(n=this.values())[t].apply(n,arguments)}}),t.exports=r},function(t,n,e){t.exports=function(t,n,e){var r=n.reduce(function(t,n){return t?t[n]:void 0},t);return void 0===r?e:r}},function(t,n,e){t.exports=function(t){if(Array.isArray(t))return t.slice();var n={};for(var e in t)n[e]=t[e];return n}},function(t,n,e){var r=e(2),i=e(1);t.exports=function u(t,n,e){if(i(t,n)===e)return t;var o=n[0],s=n.slice(1),a=r(t);return n.length>1?a[o]=u(i(a,[o])||{},s,e):o?a[o]=e:a=e,a}},function(t,n,e){var r=e(2),i=e(1);t.exports=function u(t,n){if(void 0===i(t,n))return t;var e=n[0],o=n.slice(1),s=r(t);return o.length?(s[e]=u(t[e],o),0===Object.keys(s[e]).length&&delete s[e]):delete s[e],s}},function(t,n,e){function r(t){var n=[],e=t;t=this instanceof r?this:t||{};var i=function(){for(var e=0;e<n.length;e++)n[e].apply(t,arguments)};return t.listen=t.subscribe=function(e){return n=n.concat(e),t},t.ignore=t.unsubscribe=function(e){return n=n.filter(function(t){return t!==e}),t},t.emit=t.publish=function(){return i.apply(t,arguments),t},t.volley=function(){var r=arguments;return n.length>0&&(cancelAnimationFrame(e),e=requestAnimationFrame(function(){i.apply(t,r)})),t},t}t.exports=r(r),t.exports.decorate=r}]);
module.exports=function(t){function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){function r(t){s(this),this._path=[],this._root=this,this.commit(t)}var i=e(3),u=e(4),o=e(1),s=e(5);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){var n=this.getRoot(),e=n._state;e!==t&&(n._state=t,this.volley(n._state))},clear:function(){this.commit()},get:function(t,n){return o(this._state,this.getPath(t),n)},set:function(t,n){1===arguments.length&&(n=arguments[0],t=void 0),this.commit(i(this._state,this.getPath(t),n))},update:function(t,n){1===arguments.length&&(n=arguments[0],t=void 0);for(var e in n)this.set([t,e],n[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,n){return this.filter(t,n)[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 a=["sort","map","reduce","filter","forEach","some","every","join","indexOf"];a.forEach(function(t){r.prototype[t]=function(){var n;return(n=this.values())[t].apply(n,arguments)}}),t.exports=r},function(t,n,e){function r(t,n){return t?t[n]:void 0}t.exports=function(t,n,e){var i=n.reduce(r,t);return void 0===i?e:i}},function(t,n,e){t.exports=function(t){if(Array.isArray(t))return t.slice();var n={};for(var e in t)n[e]=t[e];return n}},function(t,n,e){var r=e(2),i=e(1);t.exports=function u(t,n,e){if(i(t,n)===e)return t;var o=n[0],s=n.slice(1),a=r(t);return n.length>1?a[o]=u(i(a,[o])||{},s,e):o?a[o]=e:a=e,a}},function(t,n,e){var r=e(2),i=e(1);t.exports=function u(t,n){if(void 0===i(t,n))return t;var e=n[0],o=n.slice(1),s=r(t);return o.length?(s[e]=u(t[e],o),0===Object.keys(s[e]).length&&delete s[e]):delete s[e],s}},function(t,n,e){function r(t){var n=[],e=t;t=this instanceof r?this:t||{};var i=function(){for(var e=0;e<n.length;e++)n[e].apply(t,arguments)};return t.listen=t.subscribe=function(e){return n=n.concat(e),t},t.ignore=t.unsubscribe=function(e){return n=n.filter(function(t){return t!==e}),t},t.emit=t.publish=function(){return i.apply(t,arguments),t},t.volley=function(){var r=arguments;return n.length>0&&(cancelAnimationFrame(e),e=requestAnimationFrame(function(){i.apply(t,r)})),t},t}t.exports=r(r),t.exports.decorate=r}]);
//# sourceMappingURL=foliage.build.js.map
{
"name": "foliage",
"version": "0.19.0",
"version": "0.19.1",
"description": "A cursor like tree data structure.",

@@ -5,0 +5,0 @@ "main": "src/Foliage.js",

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

};
//# sourceMappingURL=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TCxXQUFPLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQTtHQUNuQjs7QUFFRCxTQUFPLEtBQUssQ0FBQTtDQUNiLENBQUEiLCJmaWxlIjoiZGlzc29jLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHaXZlbiBhIGxpc3Qgb2Yga2V5cywgbm9uLWRlc3RydWN0aXZlbHkgcmVtb3ZlIGEgcGF0aHdheSBmcm9tIGFuXG4gKiBvYmplY3RcbiAqXG4gKiBAcGFyYW0ge09iamVjdH0gb2JqICAtIFRoZSB0YXJnZXQgb2JqZWN0XG4gKiBAcGFyYW0ge0FycmF5fSBrZXlzIC0gQSBsaXN0IG9mIHN0cmluZyBrZXlzXG4gKi9cblxubGV0IGNvcHkgPSByZXF1aXJlKCcuL2NvcHknKVxubGV0IGdldCAgPSByZXF1aXJlKCcuL2dldCcpXG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gZGlzc29jIChvYmosIGtleXMpIHtcbiAgaWYgKGdldChvYmosIGtleXMpID09PSB1bmRlZmluZWQpIHtcbiAgICByZXR1cm4gb2JqXG4gIH1cblxuICBsZXQgWyBoZWFkLCAuLi50YWlsIF0gPSBrZXlzXG4gIGxldCBjbG9uZSA9IGNvcHkob2JqKVxuXG4gIGlmICh0YWlsLmxlbmd0aCkge1xuICAgIGNsb25lW2hlYWRdID0gZGlzc29jKG9ialtoZWFkXSwgdGFpbClcblxuICAgIC8vIEF1dG9wcnVuZSBrZXlzXG4gICAgaWYgKE9iamVjdC5rZXlzKGNsb25lW2hlYWRdKS5sZW5ndGggPT09IDApIHtcbiAgICAgIGRlbGV0ZSBjbG9uZVtoZWFkXVxuICAgIH1cbiAgfSBlbHNlIHtcbiAgICBkZWxldGUgY2xvbmVbaGVhZF1cbiAgfVxuXG4gIHJldHVybiBjbG9uZVxufVxuIl19

@@ -34,5 +34,10 @@ /**

commit: function commit(state) {
this.getRoot()._state = state;
this.volley(state);
commit: function commit(next) {
var root = this.getRoot();
var current = root._state;
if (current !== next) {
root._state = next;
this.volley(root._state);
}
},

@@ -137,2 +142,2 @@

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

@@ -5,3 +5,3 @@ /**

*
* @param {Object} obj - The target object
* @param {Object} obj - The target object
* @param {Array} keys - A list of string keys

@@ -11,9 +11,11 @@ * @param {any} fallback - If the value is undefined, a fallback

function pluck(obj, key) {
return obj ? obj[key] : void 0;
}
module.exports = function (obj, keys, fallback) {
var value = keys.reduce(function (tree, key) {
return tree ? tree[key] : void 0;
}, obj);
var value = keys.reduce(pluck, obj);
return value === void 0 ? fallback : value;
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9nZXQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBU0EsTUFBTSxDQUFDLE9BQU8sR0FBRyxVQUFVLEdBQUcsRUFBRSxJQUFJLEVBQUUsUUFBUSxFQUFFO0FBQzlDLE1BQUksS0FBSyxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUMsVUFBUyxJQUFJLEVBQUUsR0FBRyxFQUFFO0FBQzFDLFdBQU8sSUFBSSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsU0FBWSxDQUFBO0dBQ3BDLEVBQUUsR0FBRyxDQUFDLENBQUE7O0FBRVAsU0FBTyxLQUFLLFdBQWMsR0FBRyxRQUFRLEdBQUcsS0FBSyxDQUFBO0NBQzlDLENBQUEiLCJmaWxlIjoic3JjL2dldC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2l2ZW4gYSBsaXN0IG9mIGtleXMsIHJldHVybiBhIHZhbHVlIG9mIG91dCBhIGdpdm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FBUSxHQUFHLEtBQUssQ0FBQTtDQUM5QyxDQUFBIiwiZmlsZSI6ImdldC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2l2ZW4gYSBsaXN0IG9mIGtleXMsIHJldHVybiBhIHZhbHVlIG9mIG91dCBhIGdpdmVuIG9iamVjdC5cbiAqIE9wdGlvbmFsbHksIGlmIGEgdmFsdWUgaXMgbm90IHByZXNlbnQsIHJldHVybiBhIGZhbGxiYWNrXG4gKlxuICogQHBhcmFtIHtPYmplY3R9IG9iaiAtIFRoZSB0YXJnZXQgb2JqZWN0XG4gKiBAcGFyYW0ge0FycmF5fSBrZXlzIC0gQSBsaXN0IG9mIHN0cmluZyBrZXlzXG4gKiBAcGFyYW0ge2FueX0gZmFsbGJhY2sgLSBJZiB0aGUgdmFsdWUgaXMgdW5kZWZpbmVkLCBhIGZhbGxiYWNrXG4gKi9cblxuZnVuY3Rpb24gcGx1Y2sob2JqLCBrZXkpIHtcbiAgcmV0dXJuIG9iaiA/IG9ialtrZXldIDogdW5kZWZpbmVkXG59XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKG9iaiwga2V5cywgZmFsbGJhY2spIHtcbiAgbGV0IHZhbHVlID0ga2V5cy5yZWR1Y2UocGx1Y2ssIG9iailcblxuICByZXR1cm4gdmFsdWUgPT09IHVuZGVmaW5lZCA/IGZhbGxiYWNrIDogdmFsdWVcbn1cbiJdfQ==

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