@lumino/virtualdom
Advanced tools
Comparing version 2.0.0 to 2.0.1
import { ArrayExt } from '@lumino/algorithm'; | ||
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
/*----------------------------------------------------------------------------- | ||
| Copyright (c) 2014-2017, PhosphorJS Contributors | ||
| | ||
| Distributed under the terms of the BSD 3-Clause License. | ||
| | ||
| The full license is in the file LICENSE, distributed with this software. | ||
|----------------------------------------------------------------------------*/ | ||
/** | ||
* @packageDocumentation | ||
* @module virtualdom | ||
*/ | ||
/** | ||
* A virtual node which represents plain text content. | ||
@@ -6,0 +18,0 @@ * |
@@ -8,3 +8,15 @@ (function (global, factory) { | ||
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
/*----------------------------------------------------------------------------- | ||
| Copyright (c) 2014-2017, PhosphorJS Contributors | ||
| | ||
| Distributed under the terms of the BSD 3-Clause License. | ||
| | ||
| The full license is in the file LICENSE, distributed with this software. | ||
|----------------------------------------------------------------------------*/ | ||
/** | ||
* @packageDocumentation | ||
* @module virtualdom | ||
*/ | ||
/** | ||
* A virtual node which represents plain text content. | ||
@@ -11,0 +23,0 @@ * |
@@ -1,2 +0,2 @@ | ||
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports,require("@lumino/algorithm")):"function"==typeof define&&define.amd?define(["exports","@lumino/algorithm"],i):i((t="undefined"!=typeof globalThis?globalThis:t||self).lumino_virtualdom={},t.lumino_algorithm)}(this,(function(t,i){"use strict";class e{constructor(t){this.type="text",this.content=t}}class n{constructor(t,i,e,n){this.type="element",this.tag=t,this.attrs=i,this.children=e,this.renderer=n}}class d extends n{constructor(t,i,e){super(t,i,[],e||void 0)}}function o(t){let i,d={},o=[];for(let t=1,a=arguments.length;t<a;++t){let a=arguments[t];"string"==typeof a?o.push(new e(a)):a instanceof e||a instanceof n?o.push(a):a instanceof Array?r(o,a):1!==t&&2!==t||!a||"object"!=typeof a||("render"in a?i=a:d=a)}return new n(t,d,o,i);function r(t,i){for(let d of i)"string"==typeof d?t.push(new e(d)):(d instanceof e||d instanceof n)&&t.push(d)}}var r,a;!function(t){t.a=t.bind(void 0,"a"),t.abbr=t.bind(void 0,"abbr"),t.address=t.bind(void 0,"address"),t.area=t.bind(void 0,"area"),t.article=t.bind(void 0,"article"),t.aside=t.bind(void 0,"aside"),t.audio=t.bind(void 0,"audio"),t.b=t.bind(void 0,"b"),t.bdi=t.bind(void 0,"bdi"),t.bdo=t.bind(void 0,"bdo"),t.blockquote=t.bind(void 0,"blockquote"),t.br=t.bind(void 0,"br"),t.button=t.bind(void 0,"button"),t.canvas=t.bind(void 0,"canvas"),t.caption=t.bind(void 0,"caption"),t.cite=t.bind(void 0,"cite"),t.code=t.bind(void 0,"code"),t.col=t.bind(void 0,"col"),t.colgroup=t.bind(void 0,"colgroup"),t.data=t.bind(void 0,"data"),t.datalist=t.bind(void 0,"datalist"),t.dd=t.bind(void 0,"dd"),t.del=t.bind(void 0,"del"),t.dfn=t.bind(void 0,"dfn"),t.div=t.bind(void 0,"div"),t.dl=t.bind(void 0,"dl"),t.dt=t.bind(void 0,"dt"),t.em=t.bind(void 0,"em"),t.embed=t.bind(void 0,"embed"),t.fieldset=t.bind(void 0,"fieldset"),t.figcaption=t.bind(void 0,"figcaption"),t.figure=t.bind(void 0,"figure"),t.footer=t.bind(void 0,"footer"),t.form=t.bind(void 0,"form"),t.h1=t.bind(void 0,"h1"),t.h2=t.bind(void 0,"h2"),t.h3=t.bind(void 0,"h3"),t.h4=t.bind(void 0,"h4"),t.h5=t.bind(void 0,"h5"),t.h6=t.bind(void 0,"h6"),t.header=t.bind(void 0,"header"),t.hr=t.bind(void 0,"hr"),t.i=t.bind(void 0,"i"),t.iframe=t.bind(void 0,"iframe"),t.img=t.bind(void 0,"img"),t.input=t.bind(void 0,"input"),t.ins=t.bind(void 0,"ins"),t.kbd=t.bind(void 0,"kbd"),t.label=t.bind(void 0,"label"),t.legend=t.bind(void 0,"legend"),t.li=t.bind(void 0,"li"),t.main=t.bind(void 0,"main"),t.map=t.bind(void 0,"map"),t.mark=t.bind(void 0,"mark"),t.meter=t.bind(void 0,"meter"),t.nav=t.bind(void 0,"nav"),t.noscript=t.bind(void 0,"noscript"),t.object=t.bind(void 0,"object"),t.ol=t.bind(void 0,"ol"),t.optgroup=t.bind(void 0,"optgroup"),t.option=t.bind(void 0,"option"),t.output=t.bind(void 0,"output"),t.p=t.bind(void 0,"p"),t.param=t.bind(void 0,"param"),t.pre=t.bind(void 0,"pre"),t.progress=t.bind(void 0,"progress"),t.q=t.bind(void 0,"q"),t.rp=t.bind(void 0,"rp"),t.rt=t.bind(void 0,"rt"),t.ruby=t.bind(void 0,"ruby"),t.s=t.bind(void 0,"s"),t.samp=t.bind(void 0,"samp"),t.section=t.bind(void 0,"section"),t.select=t.bind(void 0,"select"),t.small=t.bind(void 0,"small"),t.source=t.bind(void 0,"source"),t.span=t.bind(void 0,"span"),t.strong=t.bind(void 0,"strong"),t.sub=t.bind(void 0,"sub"),t.summary=t.bind(void 0,"summary"),t.sup=t.bind(void 0,"sup"),t.table=t.bind(void 0,"table"),t.tbody=t.bind(void 0,"tbody"),t.td=t.bind(void 0,"td"),t.textarea=t.bind(void 0,"textarea"),t.tfoot=t.bind(void 0,"tfoot"),t.th=t.bind(void 0,"th"),t.thead=t.bind(void 0,"thead"),t.time=t.bind(void 0,"time"),t.title=t.bind(void 0,"title"),t.tr=t.bind(void 0,"tr"),t.track=t.bind(void 0,"track"),t.u=t.bind(void 0,"u"),t.ul=t.bind(void 0,"ul"),t.var_=t.bind(void 0,"var"),t.video=t.bind(void 0,"video"),t.wbr=t.bind(void 0,"wbr")}(o||(o={})),t.VirtualDOM=void 0,(r=t.VirtualDOM||(t.VirtualDOM={})).realize=function(t){return a.createDOMNode(t)},r.render=function(t,i){let e=a.hostMap.get(i)||[],n=a.asContentArray(t);a.hostMap.set(i,n),a.updateContent(i,e,n)},function(t){function e(t){let i=arguments[1]||null;const n=arguments[2]||null;if(i)i.insertBefore(e(t),n);else{if("text"===t.type)return document.createTextNode(t.content);if(i=document.createElement(t.tag),o(i,t.attrs),t.renderer)return t.renderer.render(i,{attrs:t.attrs,children:t.children}),i;for(let n=0,d=t.children.length;n<d;++n)e(t.children[n],i)}return i}function n(t,i,e,d){for(let o=i.length-1;o>=e;--o){const e=i[o],r=d?t.lastChild:t.childNodes[o];"text"===e.type||(e.renderer&&e.renderer.unrender?e.renderer.unrender(r,{attrs:e.attrs,children:e.children}):n(r,e.children,0,!1)),d&&t.removeChild(r)}}t.hostMap=new WeakMap,t.asContentArray=function(t){return t?t instanceof Array?t:[t]:[]},t.createDOMNode=e,t.updateContent=function t(d,o,a){if(o===a)return;let s=function(t,i){let e=t.firstChild,n=Object.create(null);for(let t of i)"element"===t.type&&t.attrs.key&&(n[t.attrs.key]={vNode:t,element:e}),e=e.nextSibling;return n}(d,o),l=o.slice(),b=d.firstChild,v=a.length;for(let n=0;n<v;++n){if(n>=l.length){e(a[n],d);continue}let o=l[n],v=a[n];if(o===v){b=b.nextSibling;continue}if("text"===o.type&&"text"===v.type){b.textContent!==v.content&&(b.textContent=v.content),b=b.nextSibling;continue}if("text"===o.type||"text"===v.type){i.ArrayExt.insert(l,n,v),e(v,d,b);continue}if(!o.renderer!=!v.renderer){i.ArrayExt.insert(l,n,v),e(v,d,b);continue}let u=v.attrs.key;if(u&&u in s){let t=s[u];t.vNode!==o&&(i.ArrayExt.move(l,l.indexOf(t.vNode,n+1),n),d.insertBefore(t.element,b),o=t.vNode,b=t.element)}if(o===v){b=b.nextSibling;continue}let c=o.attrs.key;c&&c!==u?(i.ArrayExt.insert(l,n,v),e(v,d,b)):o.tag===v.tag?(r(b,o.attrs,v.attrs),v.renderer?v.renderer.render(b,{attrs:v.attrs,children:v.children}):t(b,o.children,v.children),b=b.nextSibling):(i.ArrayExt.insert(l,n,v),e(v,d,b))}n(d,l,v,!0)};const d={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};function o(t,i){for(let e in i)e in d||("on"===e.substr(0,2)?t[e]=i[e]:t.setAttribute(e,i[e]));void 0!==i.className&&t.setAttribute("class",i.className),void 0!==i.htmlFor&&t.setAttribute("for",i.htmlFor),i.dataset&&function(t,i){for(let e in i)t.setAttribute(`data-${e}`,i[e])}(t,i.dataset),i.style&&function(t,i){let e,n=t.style;for(e in i)n[e]=i[e]}(t,i.style)}function r(t,i,e){if(i===e)return;let n;for(n in i)n in d||n in e||("on"===n.substr(0,2)?t[n]=null:t.removeAttribute(n));for(n in e)n in d||i[n]===e[n]||("on"===n.substr(0,2)?t[n]=e[n]:t.setAttribute(n,e[n]));i.className!==e.className&&(void 0!==e.className?t.setAttribute("class",e.className):t.removeAttribute("class")),i.htmlFor!==e.htmlFor&&(void 0!==e.htmlFor?t.setAttribute("for",e.htmlFor):t.removeAttribute("for")),i.dataset!==e.dataset&&function(t,i,e){for(let n in i)n in e||t.removeAttribute(`data-${n}`);for(let n in e)i[n]!==e[n]&&t.setAttribute(`data-${n}`,e[n])}(t,i.dataset||{},e.dataset||{}),i.style!==e.style&&function(t,i,e){let n,d=t.style;for(n in i)n in e||(d[n]="");for(n in e)i[n]!==e[n]&&(d[n]=e[n])}(t,i.style||{},e.style||{})}}(a||(a={})),t.VirtualElement=n,t.VirtualElementPass=d,t.VirtualText=e,t.h=o,t.hpass=function(t){let i={},e=null;if(2===arguments.length){const t=arguments[1];"render"in t?e=t:i=t}else if(3===arguments.length)i=arguments[1],e=arguments[2];else if(arguments.length>3)throw new Error("hpass() should be called with 1, 2, or 3 arguments");return new d(t,i,e)}})); | ||
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports,require("@lumino/algorithm")):"function"==typeof define&&define.amd?define(["exports","@lumino/algorithm"],i):i((t="undefined"!=typeof globalThis?globalThis:t||self).lumino_virtualdom={},t.lumino_algorithm)}(this,(function(t,i){"use strict";class e{constructor(t){this.type="text",this.content=t}}class n{constructor(t,i,e,n){this.type="element",this.tag=t,this.attrs=i,this.children=e,this.renderer=n}}class d extends n{constructor(t,i,e){super(t,i,[],e||void 0)}}function o(t){let i,d={},o=[];for(let t=1,a=arguments.length;t<a;++t){let a=arguments[t];"string"==typeof a?o.push(new e(a)):a instanceof e||a instanceof n?o.push(a):a instanceof Array?r(o,a):1!==t&&2!==t||!a||"object"!=typeof a||("render"in a?i=a:d=a)}return new n(t,d,o,i);function r(t,i){for(let d of i)"string"==typeof d?t.push(new e(d)):(d instanceof e||d instanceof n)&&t.push(d)}}var r,a;!function(t){t.a=t.bind(void 0,"a"),t.abbr=t.bind(void 0,"abbr"),t.address=t.bind(void 0,"address"),t.area=t.bind(void 0,"area"),t.article=t.bind(void 0,"article"),t.aside=t.bind(void 0,"aside"),t.audio=t.bind(void 0,"audio"),t.b=t.bind(void 0,"b"),t.bdi=t.bind(void 0,"bdi"),t.bdo=t.bind(void 0,"bdo"),t.blockquote=t.bind(void 0,"blockquote"),t.br=t.bind(void 0,"br"),t.button=t.bind(void 0,"button"),t.canvas=t.bind(void 0,"canvas"),t.caption=t.bind(void 0,"caption"),t.cite=t.bind(void 0,"cite"),t.code=t.bind(void 0,"code"),t.col=t.bind(void 0,"col"),t.colgroup=t.bind(void 0,"colgroup"),t.data=t.bind(void 0,"data"),t.datalist=t.bind(void 0,"datalist"),t.dd=t.bind(void 0,"dd"),t.del=t.bind(void 0,"del"),t.dfn=t.bind(void 0,"dfn"),t.div=t.bind(void 0,"div"),t.dl=t.bind(void 0,"dl"),t.dt=t.bind(void 0,"dt"),t.em=t.bind(void 0,"em"),t.embed=t.bind(void 0,"embed"),t.fieldset=t.bind(void 0,"fieldset"),t.figcaption=t.bind(void 0,"figcaption"),t.figure=t.bind(void 0,"figure"),t.footer=t.bind(void 0,"footer"),t.form=t.bind(void 0,"form"),t.h1=t.bind(void 0,"h1"),t.h2=t.bind(void 0,"h2"),t.h3=t.bind(void 0,"h3"),t.h4=t.bind(void 0,"h4"),t.h5=t.bind(void 0,"h5"),t.h6=t.bind(void 0,"h6"),t.header=t.bind(void 0,"header"),t.hr=t.bind(void 0,"hr"),t.i=t.bind(void 0,"i"),t.iframe=t.bind(void 0,"iframe"),t.img=t.bind(void 0,"img"),t.input=t.bind(void 0,"input"),t.ins=t.bind(void 0,"ins"),t.kbd=t.bind(void 0,"kbd"),t.label=t.bind(void 0,"label"),t.legend=t.bind(void 0,"legend"),t.li=t.bind(void 0,"li"),t.main=t.bind(void 0,"main"),t.map=t.bind(void 0,"map"),t.mark=t.bind(void 0,"mark"),t.meter=t.bind(void 0,"meter"),t.nav=t.bind(void 0,"nav"),t.noscript=t.bind(void 0,"noscript"),t.object=t.bind(void 0,"object"),t.ol=t.bind(void 0,"ol"),t.optgroup=t.bind(void 0,"optgroup"),t.option=t.bind(void 0,"option"),t.output=t.bind(void 0,"output"),t.p=t.bind(void 0,"p"),t.param=t.bind(void 0,"param"),t.pre=t.bind(void 0,"pre"),t.progress=t.bind(void 0,"progress"),t.q=t.bind(void 0,"q"),t.rp=t.bind(void 0,"rp"),t.rt=t.bind(void 0,"rt"),t.ruby=t.bind(void 0,"ruby"),t.s=t.bind(void 0,"s"),t.samp=t.bind(void 0,"samp"),t.section=t.bind(void 0,"section"),t.select=t.bind(void 0,"select"),t.small=t.bind(void 0,"small"),t.source=t.bind(void 0,"source"),t.span=t.bind(void 0,"span"),t.strong=t.bind(void 0,"strong"),t.sub=t.bind(void 0,"sub"),t.summary=t.bind(void 0,"summary"),t.sup=t.bind(void 0,"sup"),t.table=t.bind(void 0,"table"),t.tbody=t.bind(void 0,"tbody"),t.td=t.bind(void 0,"td"),t.textarea=t.bind(void 0,"textarea"),t.tfoot=t.bind(void 0,"tfoot"),t.th=t.bind(void 0,"th"),t.thead=t.bind(void 0,"thead"),t.time=t.bind(void 0,"time"),t.title=t.bind(void 0,"title"),t.tr=t.bind(void 0,"tr"),t.track=t.bind(void 0,"track"),t.u=t.bind(void 0,"u"),t.ul=t.bind(void 0,"ul"),t.var_=t.bind(void 0,"var"),t.video=t.bind(void 0,"video"),t.wbr=t.bind(void 0,"wbr")}(o||(o={})),t.VirtualDOM=void 0,(r=t.VirtualDOM||(t.VirtualDOM={})).realize=function(t){return a.createDOMNode(t)},r.render=function(t,i){let e=a.hostMap.get(i)||[],n=a.asContentArray(t);a.hostMap.set(i,n),a.updateContent(i,e,n)},function(t){function e(t){let i=arguments[1]||null;const n=arguments[2]||null;if(i)i.insertBefore(e(t),n);else{if("text"===t.type)return document.createTextNode(t.content);if(i=document.createElement(t.tag),function(t,i){for(let e in i)e in d||("on"===e.substr(0,2)?t[e]=i[e]:t.setAttribute(e,i[e]));void 0!==i.className&&t.setAttribute("class",i.className);void 0!==i.htmlFor&&t.setAttribute("for",i.htmlFor);i.dataset&&function(t,i){for(let e in i)t.setAttribute(`data-${e}`,i[e])}(t,i.dataset);i.style&&function(t,i){let e,n=t.style;for(e in i)n[e]=i[e]}(t,i.style)}(i,t.attrs),t.renderer)return t.renderer.render(i,{attrs:t.attrs,children:t.children}),i;for(let n=0,d=t.children.length;n<d;++n)e(t.children[n],i)}return i}function n(t,i,e,d){for(let o=i.length-1;o>=e;--o){const e=i[o],r=d?t.lastChild:t.childNodes[o];"text"===e.type||(e.renderer&&e.renderer.unrender?e.renderer.unrender(r,{attrs:e.attrs,children:e.children}):n(r,e.children,0,!1)),d&&t.removeChild(r)}}t.hostMap=new WeakMap,t.asContentArray=function(t){return t?t instanceof Array?t:[t]:[]},t.createDOMNode=e,t.updateContent=function t(d,r,a){if(r===a)return;let s=function(t,i){let e=t.firstChild,n=Object.create(null);for(let t of i)"element"===t.type&&t.attrs.key&&(n[t.attrs.key]={vNode:t,element:e}),e=e.nextSibling;return n}(d,r),l=r.slice(),b=d.firstChild,v=a.length;for(let n=0;n<v;++n){if(n>=l.length){e(a[n],d);continue}let r=l[n],v=a[n];if(r===v){b=b.nextSibling;continue}if("text"===r.type&&"text"===v.type){b.textContent!==v.content&&(b.textContent=v.content),b=b.nextSibling;continue}if("text"===r.type||"text"===v.type){i.ArrayExt.insert(l,n,v),e(v,d,b);continue}if(!r.renderer!=!v.renderer){i.ArrayExt.insert(l,n,v),e(v,d,b);continue}let u=v.attrs.key;if(u&&u in s){let t=s[u];t.vNode!==r&&(i.ArrayExt.move(l,l.indexOf(t.vNode,n+1),n),d.insertBefore(t.element,b),r=t.vNode,b=t.element)}if(r===v){b=b.nextSibling;continue}let c=r.attrs.key;c&&c!==u?(i.ArrayExt.insert(l,n,v),e(v,d,b)):r.tag===v.tag?(o(b,r.attrs,v.attrs),v.renderer?v.renderer.render(b,{attrs:v.attrs,children:v.children}):t(b,r.children,v.children),b=b.nextSibling):(i.ArrayExt.insert(l,n,v),e(v,d,b))}n(d,l,v,!0)};const d={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};function o(t,i,e){if(i===e)return;let n;for(n in i)n in d||n in e||("on"===n.substr(0,2)?t[n]=null:t.removeAttribute(n));for(n in e)n in d||i[n]===e[n]||("on"===n.substr(0,2)?t[n]=e[n]:t.setAttribute(n,e[n]));i.className!==e.className&&(void 0!==e.className?t.setAttribute("class",e.className):t.removeAttribute("class")),i.htmlFor!==e.htmlFor&&(void 0!==e.htmlFor?t.setAttribute("for",e.htmlFor):t.removeAttribute("for")),i.dataset!==e.dataset&&function(t,i,e){for(let n in i)n in e||t.removeAttribute(`data-${n}`);for(let n in e)i[n]!==e[n]&&t.setAttribute(`data-${n}`,e[n])}(t,i.dataset||{},e.dataset||{}),i.style!==e.style&&function(t,i,e){let n,d=t.style;for(n in i)n in e||(d[n]="");for(n in e)i[n]!==e[n]&&(d[n]=e[n])}(t,i.style||{},e.style||{})}}(a||(a={})),t.VirtualElement=n,t.VirtualElementPass=d,t.VirtualText=e,t.h=o,t.hpass=function(t){let i={},e=null;if(2===arguments.length){const t=arguments[1];"render"in t?e=t:i=t}else if(3===arguments.length)i=arguments[1],e=arguments[2];else if(arguments.length>3)throw new Error("hpass() should be called with 1, 2, or 3 arguments");return new d(t,i,e)}})); | ||
//# sourceMappingURL=index.min.js.map |
{ | ||
"name": "@lumino/virtualdom", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Lumino Virtual DOM", | ||
@@ -54,7 +54,7 @@ "homepage": "https://github.com/jupyterlab/lumino", | ||
"dependencies": { | ||
"@lumino/algorithm": "^2.0.0" | ||
"@lumino/algorithm": "^2.0.1" | ||
}, | ||
"devDependencies": { | ||
"@lumino/buildutils": "^2.0.0", | ||
"@microsoft/api-extractor": "^7.6.0", | ||
"@lumino/buildutils": "^2.0.1", | ||
"@microsoft/api-extractor": "^7.36.0", | ||
"@rollup/plugin-commonjs": "^24.0.0", | ||
@@ -72,12 +72,11 @@ "@rollup/plugin-node-resolve": "^15.0.1", | ||
"mocha": "^9.0.3", | ||
"playwright": "^1.29.0", | ||
"postcss": "^8.4.14", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^3.9.1", | ||
"playwright": "^1.35.0", | ||
"postcss": "^8.4.24", | ||
"rimraf": "^5.0.1", | ||
"rollup": "^3.25.1", | ||
"rollup-plugin-postcss": "^4.0.2", | ||
"rollup-plugin-sourcemaps": "^0.6.3", | ||
"terser": "^5.7.1", | ||
"tslib": "^2.4.0", | ||
"typedoc": "^0.23.25", | ||
"typescript": "~4.9.4" | ||
"terser": "^5.18.1", | ||
"tslib": "^2.5.3", | ||
"typescript": "~5.1.3" | ||
}, | ||
@@ -84,0 +83,0 @@ "publishConfig": { |
@@ -10,2 +10,6 @@ // Copyright (c) Jupyter Development Team. | ||
|----------------------------------------------------------------------------*/ | ||
/** | ||
* @packageDocumentation | ||
* @module virtualdom | ||
*/ | ||
import { ArrayExt } from '@lumino/algorithm'; | ||
@@ -12,0 +16,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
339574
23
3591
Updated@lumino/algorithm@^2.0.1