Socket
Socket
Sign inDemoInstall

it-merge

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

it-merge - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

dist/index.min.js
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.ItMerge = factory()}(typeof self !== 'undefined' ? self : this, function () {
"use strict";var ItMerge=(()=>{var d=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var N=(u,t)=>{for(var e in t)d(u,e,{get:t[e],enumerable:!0})},k=(u,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of L(t))!S.call(u,i)&&i!==e&&d(u,i,{get:()=>t[i],enumerable:!(r=z(t,i))||r.enumerable});return u};var I=u=>k(d({},"__esModule",{value:!0}),u);var j={};N(j,{default:()=>P});var f=class{constructor(t){if(!(t>0)||t-1&t)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(t),this.mask=t-1,this.top=0,this.btm=0,this.next=null}push(t){return this.buffer[this.top]!==void 0?!1:(this.buffer[this.top]=t,this.top=this.top+1&this.mask,!0)}shift(){let t=this.buffer[this.btm];if(t!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,t}isEmpty(){return this.buffer[this.btm]===void 0}},o=class{constructor(t={}){this.hwm=t.splitLimit??16,this.head=new f(this.hwm),this.tail=this.head,this.size=0}calculateSize(t){return t?.byteLength!=null?t.byteLength:1}push(t){if(t?.value!=null&&(this.size+=this.calculateSize(t.value)),!this.head.push(t)){let e=this.head;this.head=e.next=new f(2*this.head.buffer.length),this.head.push(t)}}shift(){let t=this.tail.shift();if(t===void 0&&this.tail.next!=null){let e=this.tail.next;this.tail.next=null,this.tail=e,t=this.tail.shift()}return t?.value!=null&&(this.size-=this.calculateSize(t.value)),t}isEmpty(){return this.head.isEmpty()}};function p(u={}){return M(e=>{let r=e.shift();if(r==null)return{done:!0};if(r.error!=null)throw r.error;return{done:r.done===!0,value:r.value}},u)}function M(u,t){t=t??{};let e=t.onEnd,r=new o,i,s,h,m=async()=>r.isEmpty()?h?{done:!0}:await new Promise((n,g)=>{s=v=>{s=null,r.push(v);try{n(u(r))}catch(E){g(E)}return i}}):u(r),c=n=>s!=null?s(n):(r.push(n),i),y=n=>(r=new o,s!=null?s({error:n}):(r.push({error:n}),i)),b=n=>{if(h)return i;if(t?.objectMode!==!0&&n?.byteLength==null)throw new Error("objectMode was not true but tried to push non-Uint8Array value");return c({done:!1,value:n})},a=n=>h?i:(h=!0,n!=null?y(n):c({done:!0})),w=()=>(r=new o,a(),{done:!0}),x=n=>(a(n),{done:!0});if(i={[Symbol.asyncIterator](){return this},next:m,return:w,throw:x,push:b,end:a,get readableLength(){return r.size}},e==null)return i;let l=i;return i={[Symbol.asyncIterator](){return this},next(){return l.next()},throw(n){return l.throw(n),e!=null&&(e(n),e=void 0),{done:!0}},return(){return l.return(),e!=null&&(e(),e=void 0),{done:!0}},push:b,end(n){return l.end(n),e!=null&&(e(n),e=void 0),i},get readableLength(){return l.readableLength}},i}function _(u){return u[Symbol.asyncIterator]!=null}function A(...u){let t=[];for(let e of u)_(e)||t.push(e);return t.length===u.length?function*(){for(let e of t)yield*e}():async function*(){let e=p({objectMode:!0});Promise.resolve().then(async()=>{try{await Promise.all(u.map(async r=>{for await(let i of r)e.push(i)})),e.end()}catch(r){e.end(r)}}),yield*e}()}var P=A;return I(j);})();
"use strict";var ItMerge=(()=>{var y=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var M=(r,e)=>{for(var t in e)y(r,t,{get:e[t],enumerable:!0})},_=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of P(e))!I.call(r,u)&&u!==t&&y(r,u,{get:()=>e[u],enumerable:!(n=N(e,u))||n.enumerable});return r};var A=r=>_(y({},"__esModule",{value:!0}),r);var B={};M(B,{default:()=>q});function c(){let r={};return r.promise=new Promise((e,t)=>{r.resolve=e,r.reject=t}),r}var p=class{buffer;mask;top;btm;next;constructor(e){if(!(e>0)||e-1&e)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(e),this.mask=e-1,this.top=0,this.btm=0,this.next=null}push(e){return this.buffer[this.top]!==void 0?!1:(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0)}shift(){let e=this.buffer[this.btm];if(e!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}isEmpty(){return this.buffer[this.btm]===void 0}},h=class{size;hwm;head;tail;constructor(e={}){this.hwm=e.splitLimit??16,this.head=new p(this.hwm),this.tail=this.head,this.size=0}calculateSize(e){return e?.byteLength!=null?e.byteLength:1}push(e){if(e?.value!=null&&(this.size+=this.calculateSize(e.value)),!this.head.push(e)){let t=this.head;this.head=t.next=new p(2*this.head.buffer.length),this.head.push(e)}}shift(){let e=this.tail.shift();if(e===void 0&&this.tail.next!=null){let t=this.tail.next;this.tail.next=null,this.tail=t,e=this.tail.shift()}return e?.value!=null&&(this.size-=this.calculateSize(e.value)),e}isEmpty(){return this.head.isEmpty()}};var w=class extends Error{type;code;constructor(e,t){super(e??"The operation was aborted"),this.type="aborted",this.code=t??"ABORT_ERR"}};function v(r={}){return j(t=>{let n=t.shift();if(n==null)return{done:!0};if(n.error!=null)throw n.error;return{done:n.done===!0,value:n.value}},r)}function j(r,e){e=e??{};let t=e.onEnd,n=new h,u,o,f,b=c(),E=async()=>{try{return n.isEmpty()?f?{done:!0}:await new Promise((i,s)=>{o=d=>{o=null,n.push(d);try{i(r(n))}catch(l){s(l)}return u}}):r(n)}finally{n.isEmpty()&&queueMicrotask(()=>{b.resolve(),b=c()})}},x=i=>o!=null?o(i):(n.push(i),u),z=i=>(n=new h,o!=null?o({error:i}):(n.push({error:i}),u)),g=i=>{if(f)return u;if(e?.objectMode!==!0&&i?.byteLength==null)throw new Error("objectMode was not true but tried to push non-Uint8Array value");return x({done:!1,value:i})},m=i=>f?u:(f=!0,i!=null?z(i):x({done:!0})),L=()=>(n=new h,m(),{done:!0}),S=i=>(m(i),{done:!0});if(u={[Symbol.asyncIterator](){return this},next:E,return:L,throw:S,push:g,end:m,get readableLength(){return n.size},onEmpty:async i=>{let s=i?.signal;if(s?.throwIfAborted(),n.isEmpty())return;let d,l;s!=null&&(d=new Promise((D,k)=>{l=()=>{k(new w)},s.addEventListener("abort",l)}));try{await Promise.race([b.promise,d])}finally{l!=null&&s!=null&&s?.removeEventListener("abort",l)}}},t==null)return u;let a=u;return u={[Symbol.asyncIterator](){return this},next(){return a.next()},throw(i){return a.throw(i),t!=null&&(t(i),t=void 0),{done:!0}},return(){return a.return(),t!=null&&(t(),t=void 0),{done:!0}},push:g,end(i){return a.end(i),t!=null&&(t(i),t=void 0),u},get readableLength(){return a.readableLength}},u}function R(r){return r[Symbol.asyncIterator]!=null}function T(...r){let e=[];for(let t of r)R(t)||e.push(t);return e.length===r.length?function*(){for(let t of e)yield*t}():async function*(){let t=v({objectMode:!0});Promise.resolve().then(async()=>{try{await Promise.all(r.map(async n=>{for await(let u of n)t.push(u)})),t.end()}catch(n){t.end(n)}}),yield*t}()}var q=T;return A(B);})();
return ItMerge}));
{
"name": "it-merge",
"version": "3.0.1",
"version": "3.0.2",
"description": "Treat one or more iterables as a single iterable",

@@ -15,6 +15,2 @@ "author": "Alex Potsides <alex@achingbrain.net>",

},
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
},
"type": "module",

@@ -139,8 +135,8 @@ "types": "./dist/src/index.d.ts",

"dependencies": {
"it-pushable": "^3.1.0"
"it-pushable": "^3.2.0"
},
"devDependencies": {
"aegir": "^39.0.2",
"aegir": "^40.0.11",
"it-all": "^3.0.0"
}
}
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