Socket
Socket
Sign inDemoInstall

itertools

Package Overview
Dependencies
0
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.2 to 2.2.0-test1

dist/index.cjs

6

dist/index.d.ts

@@ -1,3 +0,3 @@

declare type Predicate<T> = (value: T) => boolean;
declare type Primitive = string | number | boolean;
type Predicate<T> = (value: T) => boolean;
type Primitive = string | number | boolean;

@@ -454,2 +454,2 @@ /**

export { Predicate, Primitive, all, any, chain, chunked, compact, compactObject, compress, contains, count, cycle, dropwhile, enumerate, every, filter, find, first, flatmap, flatten, groupby, heads, icompact, icompress, ifilter, imap, islice, itake, iter, izip, izip2, izip3, izipLongest, izipMany, map, max, min, pairwise, partition, permutations, range, reduce, roundrobin, some, sorted, sum, take, takewhile, uniqueEverseen, uniqueJustseen, zip, zip3, zipLongest, zipMany };
export { type Predicate, type Primitive, all, any, chain, chunked, compact, compactObject, compress, contains, count, cycle, dropwhile, enumerate, every, filter, find, first, flatmap, flatten, groupby, heads, icompact, icompress, ifilter, imap, islice, itake, iter, izip, izip2, izip3, izipLongest, izipMany, map, max, min, pairwise, partition, permutations, range, reduce, roundrobin, some, sorted, sum, take, takewhile, uniqueEverseen, uniqueJustseen, zip, zip3, zipLongest, zipMany };

@@ -1,4 +0,575 @@

"use strict";Object.defineProperty(exports, "__esModule", {value: true});function O(e){return(t,r)=>{let n=e(t),i=e(r);return typeof n=="boolean"&&typeof i=="boolean"?n===i?0:!n&&i?-1:1:typeof n=="number"&&typeof i=="number"?n-i:typeof n=="string"&&typeof i=="string"?n===i?0:n<i?-1:1:-1}}function v(e){return!!e}function g(e){if(typeof e!="number")throw new Error("Inputs must be numbers");return e}function c(e){if(typeof e!="string"&&typeof e!="number"&&typeof e!="boolean")throw new Error("Please provide a key function that can establish object identity");return e}function*$(e,t){if(t<1)throw new Error(`Invalid chunk size: ${t}`);let r=a(e);for(;;){let n=K(t,r);if(n.length>0&&(yield n),n.length<t)return}}function*s(e){for(let t of e)for(let r of t)yield r}function*V(e,t){let r=a(t),n=e;for(;n-- >0;){let i=r.next();if(!i.done)yield i.value;else return}}function*B(e){let t=a(e),r=t.next();if(r.done)return;let n=r.value;for(let i of t)yield[n,i],n=i}function H(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}function*Q(...e){let t=d(e,a);for(;t.length>0;){let r=0;for(;r<t.length;){let i=t[r].next();i.done?t.splice(r,1):(yield i.value,r++)}}}function*U(...e){let t=d(e,a);for(;t.length>0;){let r=0,n=[];for(;r<t.length;){let o=t[r].next();o.done?t.splice(r,1):(n.push(o.value),r++)}n.length>0&&(yield n)}}function K(e,t){return Array.from(V(e,t))}function*W(e,t=c){let r=new Set;for(let n of e){let i=t(n);r.has(i)||(r.add(i),yield n)}}function*X(e,t=c){let r;for(let n of e){let i=t(n);i!==r&&(yield n,r=i)}}var N=Symbol();function E(e,t){return r=>e(r)&&t(r)}function Y(e,t,r){if(e<0)throw new Error("start cannot be negative");if(t!==null&&t<0)throw new Error("stop cannot be negative");if(r<=0)throw new Error("step cannot be negative");let n=i=>i>=e;if(t!==null){let i=t;n=E(n,o=>o<i)}return r>1&&(n=E(n,i=>(i-e)%r===0)),n}function Z(...e){return s(e)}function*h(e=0,t=1){let r=e;for(;;)yield r,r+=t}function F(e,t){return Array.from(L(e,t))}function*ee(e){let t=[];for(let r of e)yield r,t.push(r);for(;t.length>0;)for(let r of t)yield r}function*te(e,t){let r=a(e);for(let n of r)if(!t(n)){yield n;break}for(let n of r)yield n}function*re(e,t=c){let r=a(e),n,i=N,o=i,l=function*(T){for(;i===T;){yield n;let f=r.next();if(f.done)return;n=f.value,i=t(n)}};for(;;){for(;i===o;){let u=r.next();if(u.done){i=N;return}n=u.value,i=t(n)}o=i,yield[i,l(o)]}}function*L(e,t){for(let[r,n]of I(e,t))n&&(yield r)}function*p(e,t){for(let r of e)t(r)&&(yield r)}function*m(e,t){for(let r of e)yield t(r)}function*ne(e,t,r,n=1){let i,o;r!==void 0?(i=t,o=r):(i=0,o=t);let l=Y(i,o,n);for(let[u,T]of z(e))l(u)&&(yield T)}function*j(e,t){let r=a(e),n=a(t);for(;;){let i=r.next(),o=n.next();if(!i.done&&!o.done)yield[i.value,o.value];else return}}function*P(e,t,r){let n=a(e),i=a(t),o=a(r);for(;;){let l=n.next(),u=i.next(),T=o.next();if(!l.done&&!u.done&&!T.done)yield[l.value,u.value,T.value];else return}}var I=j;function*q(e,t,r){let n=r,i=a(e),o=a(t);for(;;){let l=i.next(),u=o.next();if(l.done&&u.done)return;yield[l.done?n:l.value,u.done?n:u.value]}}function*_(...e){let t=e.map(a);for(;;){let r=t.map(n=>n.next());if(x(r,n=>!n.done))yield r.map(n=>n.value);else return}}function*ie(e,t){let r=Array.from(e),n=r.length,i=t===void 0?n:t;if(i>n)return;let o=Array.from(b(n)),l=Array.from(b(n,n-i,-1)),u=T=>r[T];for(yield o.slice(0,i).map(u);n>0;){let T=!0;for(let f of b(i-1,-1,-1))if(l[f]-=1,l[f]===0)o=o.slice(0,f).concat(o.slice(f+1)).concat(o.slice(f,f+1)),l[f]=n-f;else{let k=l[f],[G,J]=[o[o.length-k],o[f]];o[f]=G,o[o.length-k]=J,yield o.slice(0,i).map(u),T=!1;break}if(T)return}}function*w(e,t){for(let r of e){if(!t(r))return;yield r}}function oe(e,t,r){return Array.from(q(e,t,r))}var ae=q,le= exports.zipLongest =oe;function ue(...e){return Array.from(_(...e))}function fe(e){return e!=null}function Te(e){return e!==void 0}function C(e){return p(e,fe)}function ce(e){return Array.from(C(e))}function se(e){let t={};for(let[r,n]of Object.entries(e)){let i=n;i!=null&&(t[r]=i)}return t}function y(e,t){if(t===void 0){for(let r of e)return r;return}else{for(let r of e)if(t(r))return r;return}}function be(e,t){return y(e,t!=null?t:Te)}function pe(e,t){return s(m(e,t))}function x(e,t=v){for(let r of e)if(!t(r))return!1;return!0}function A(e,t=v){for(let r of e)if(t(r))return!0;return!1}var me=x,de= exports.any =A;function Ie(e,t){return A(e,r=>r===t)}function*z(e,t=0){let r=t;for(let n of e)yield[r++,n]}function xe(e,t){return Array.from(p(e,t))}function a(e){return e[Symbol.iterator]()}function d(e,t){return Array.from(m(e,t))}function ye(e,t=g){return D(e,(r,n)=>t(r)>t(n)?r:n)}function ve(e,t=g){return D(e,(r,n)=>t(r)<t(n)?r:n)}function M(e,t,r){let n=h(e,r),i=r>=0?o=>o<t:o=>o>t;return w(n,i)}function b(e,t,r=1){return t!==void 0?M(e,t,r):M(0,e,r)}function R(e,t,r){return r===void 0?D(e,t):S(e,t,r)}function S(e,t,r){let n=r,i=0;for(let o of e)n=t(n,o,i++);return n}function D(e,t){let r=a(e),n=y(r);if(n!==void 0)return S(r,t,n)}function ge(e,t=c,r=!1){let n=Array.from(e);return n.sort(O(t)),r&&n.reverse(),n}function he(e){return R(e,(t,r)=>t+r,0)}function Pe(e,t){return Array.from(I(e,t))}function we(e,t,r){return Array.from(P(e,t,r))}exports.all = me; exports.any = de; exports.chain = Z; exports.chunked = $; exports.compact = ce; exports.compactObject = se; exports.compress = F; exports.contains = Ie; exports.count = h; exports.cycle = ee; exports.dropwhile = te; exports.enumerate = z; exports.every = x; exports.filter = xe; exports.find = y; exports.first = be; exports.flatmap = pe; exports.flatten = s; exports.groupby = re; exports.heads = U; exports.icompact = C; exports.icompress = L; exports.ifilter = p; exports.imap = m; exports.islice = ne; exports.itake = V; exports.iter = a; exports.izip = I; exports.izip2 = j; exports.izip3 = P; exports.izipLongest = ae; exports.izipMany = _; exports.map = d; exports.max = ye; exports.min = ve; exports.pairwise = B; exports.partition = H; exports.permutations = ie; exports.range = b; exports.reduce = R; exports.roundrobin = Q; exports.some = A; exports.sorted = ge; exports.sum = he; exports.take = K; exports.takewhile = w; exports.uniqueEverseen = W; exports.uniqueJustseen = X; exports.zip = Pe; exports.zip3 = we; exports.zipLongest = le; exports.zipMany = ue;
// src/utils.ts
function keyToCmp(keyFn) {
return (a, b) => {
const ka = keyFn(a);
const kb = keyFn(b);
if (typeof ka === "boolean" && typeof kb === "boolean") {
return ka === kb ? 0 : !ka && kb ? -1 : 1;
} else if (typeof ka === "number" && typeof kb === "number") {
return ka - kb;
} else if (typeof ka === "string" && typeof kb === "string") {
return ka === kb ? 0 : ka < kb ? -1 : 1;
} else {
return -1;
}
};
}
function identityPredicate(x) {
return !!x;
}
function numberIdentity(x) {
if (typeof x !== "number") {
throw new Error("Inputs must be numbers");
}
return x;
}
function primitiveIdentity(x) {
if (typeof x !== "string" && typeof x !== "number" && typeof x !== "boolean") {
throw new Error("Please provide a key function that can establish object identity");
}
return x;
}
// src/more-itertools.ts
function* chunked(iterable, size) {
if (size < 1) {
throw new Error(`Invalid chunk size: ${size}`);
}
const it = iter(iterable);
for (; ; ) {
const chunk = take(size, it);
if (chunk.length > 0) {
yield chunk;
}
if (chunk.length < size) {
return;
}
}
}
function* flatten(iterableOfIterables) {
for (const iterable of iterableOfIterables) {
for (const item of iterable) {
yield item;
}
}
}
function* itake(n, iterable) {
const it = iter(iterable);
let count2 = n;
while (count2-- > 0) {
const s = it.next();
if (!s.done) {
yield s.value;
} else {
return;
}
}
}
function* pairwise(iterable) {
const it = iter(iterable);
const first2 = it.next();
if (first2.done) {
return;
}
let r1 = first2.value;
for (const r2 of it) {
yield [r1, r2];
r1 = r2;
}
}
function partition(iterable, predicate) {
const good = [];
const bad = [];
for (const item of iterable) {
if (predicate(item)) {
good.push(item);
} else {
bad.push(item);
}
}
return [good, bad];
}
function* roundrobin(...iters) {
const iterables = map(iters, iter);
while (iterables.length > 0) {
let index = 0;
while (index < iterables.length) {
const it = iterables[index];
const result = it.next();
if (!result.done) {
yield result.value;
index++;
} else {
iterables.splice(index, 1);
}
}
}
}
function* heads(...iters) {
const iterables = map(iters, iter);
while (iterables.length > 0) {
let index = 0;
const round = [];
while (index < iterables.length) {
const it = iterables[index];
const result = it.next();
if (!result.done) {
round.push(result.value);
index++;
} else {
iterables.splice(index, 1);
}
}
if (round.length > 0) {
yield round;
}
}
}
function take(n, iterable) {
return Array.from(itake(n, iterable));
}
function* uniqueEverseen(iterable, keyFn = primitiveIdentity) {
const seen = /* @__PURE__ */ new Set();
for (const item of iterable) {
const key = keyFn(item);
if (!seen.has(key)) {
seen.add(key);
yield item;
}
}
}
function* uniqueJustseen(iterable, keyFn = primitiveIdentity) {
let last = void 0;
for (const item of iterable) {
const key = keyFn(item);
if (key !== last) {
yield item;
last = key;
}
}
}
// src/itertools.ts
var SENTINEL = Symbol();
function composeAnd(f1, f2) {
return (n) => f1(n) && f2(n);
}
function slicePredicate(start, stop, step) {
if (start < 0)
throw new Error("start cannot be negative");
if (stop !== null && stop < 0)
throw new Error("stop cannot be negative");
if (step <= 0)
throw new Error("step cannot be negative");
let pred = (n) => n >= start;
if (stop !== null) {
const definedStop = stop;
pred = composeAnd(pred, (n) => n < definedStop);
}
if (step > 1) {
pred = composeAnd(pred, (n) => (n - start) % step === 0);
}
return pred;
}
function chain(...iterables) {
return flatten(iterables);
}
function* count(start = 0, step = 1) {
let n = start;
for (; ; ) {
yield n;
n += step;
}
}
function compress(data, selectors) {
return Array.from(icompress(data, selectors));
}
function* cycle(iterable) {
const saved = [];
for (const element of iterable) {
yield element;
saved.push(element);
}
while (saved.length > 0) {
for (const element of saved) {
yield element;
}
}
}
function* dropwhile(iterable, predicate) {
const it = iter(iterable);
for (const value of it) {
if (!predicate(value)) {
yield value;
break;
}
}
for (const value of it) {
yield value;
}
}
function* groupby(iterable, keyFn = primitiveIdentity) {
const it = iter(iterable);
let currentValue;
let currentKey = SENTINEL;
let targetKey = currentKey;
const grouper = function* grouper2(tgtKey) {
while (currentKey === tgtKey) {
yield currentValue;
const nextVal = it.next();
if (nextVal.done)
return;
currentValue = nextVal.value;
currentKey = keyFn(currentValue);
}
};
for (; ; ) {
while (currentKey === targetKey) {
const nextVal = it.next();
if (nextVal.done) {
currentKey = SENTINEL;
return;
}
currentValue = nextVal.value;
currentKey = keyFn(currentValue);
}
targetKey = currentKey;
yield [currentKey, grouper(targetKey)];
}
}
function* icompress(data, selectors) {
for (const [d, s] of izip(data, selectors)) {
if (s) {
yield d;
}
}
}
function* ifilter(iterable, predicate) {
for (const value of iterable) {
if (predicate(value)) {
yield value;
}
}
}
function* imap(iterable, mapper) {
for (const value of iterable) {
yield mapper(value);
}
}
function* islice(iterable, stopOrStart, possiblyStop, step = 1) {
let start, stop;
if (possiblyStop !== void 0) {
start = stopOrStart;
stop = possiblyStop;
} else {
start = 0;
stop = stopOrStart;
}
const pred = slicePredicate(start, stop, step);
for (const [i, value] of enumerate(iterable)) {
if (pred(i)) {
yield value;
}
}
}
function* izip2(xs, ys) {
const ixs = iter(xs);
const iys = iter(ys);
for (; ; ) {
const x = ixs.next();
const y = iys.next();
if (!x.done && !y.done) {
yield [x.value, y.value];
} else {
return;
}
}
}
function* izip3(xs, ys, zs) {
const ixs = iter(xs);
const iys = iter(ys);
const izs = iter(zs);
for (; ; ) {
const x = ixs.next();
const y = iys.next();
const z = izs.next();
if (!x.done && !y.done && !z.done) {
yield [x.value, y.value, z.value];
} else {
return;
}
}
}
var izip = izip2;
function* izipLongest2(xs, ys, filler) {
const filler_ = filler;
const ixs = iter(xs);
const iys = iter(ys);
for (; ; ) {
const x = ixs.next();
const y = iys.next();
if (x.done && y.done) {
return;
} else {
yield [!x.done ? x.value : filler_, !y.done ? y.value : filler_];
}
}
}
function* izipMany(...iters) {
const iterables = iters.map(iter);
for (; ; ) {
const heads2 = iterables.map((xs) => xs.next());
if (every(heads2, (h) => !h.done)) {
yield heads2.map((h) => h.value);
} else {
return;
}
}
}
function* permutations(iterable, r) {
const pool = Array.from(iterable);
const n = pool.length;
const x = r === void 0 ? n : r;
if (x > n) {
return;
}
let indices = Array.from(range(n));
const cycles = Array.from(range(n, n - x, -1));
const poolgetter = (i) => pool[i];
yield indices.slice(0, x).map(poolgetter);
while (n > 0) {
let cleanExit = true;
for (const i of range(x - 1, -1, -1)) {
cycles[i] -= 1;
if (cycles[i] === 0) {
indices = indices.slice(0, i).concat(indices.slice(i + 1)).concat(indices.slice(i, i + 1));
cycles[i] = n - i;
} else {
const j = cycles[i];
const [p, q] = [indices[indices.length - j], indices[i]];
indices[i] = p;
indices[indices.length - j] = q;
yield indices.slice(0, x).map(poolgetter);
cleanExit = false;
break;
}
}
if (cleanExit) {
return;
}
}
}
function* takewhile(iterable, predicate) {
for (const value of iterable) {
if (!predicate(value))
return;
yield value;
}
}
function zipLongest2(xs, ys, filler) {
return Array.from(izipLongest2(xs, ys, filler));
}
var izipLongest = izipLongest2;
var zipLongest = zipLongest2;
function zipMany(...iters) {
return Array.from(izipMany(...iters));
}
// src/custom.ts
function isNullish(x) {
return x != null;
}
function isDefined(x) {
return x !== void 0;
}
function icompact(iterable) {
return ifilter(iterable, isNullish);
}
function compact(iterable) {
return Array.from(icompact(iterable));
}
function compactObject(obj) {
const result = {};
for (const [key, value_] of Object.entries(obj)) {
const value = value_;
if (value != null) {
result[key] = value;
}
}
return result;
}
function find(iterable, keyFn) {
if (keyFn === void 0) {
for (const value of iterable) {
return value;
}
return void 0;
} else {
for (const value of iterable) {
if (keyFn(value)) {
return value;
}
}
return void 0;
}
}
function first(iterable, keyFn) {
return find(iterable, keyFn != null ? keyFn : isDefined);
}
function flatmap(iterable, mapper) {
return flatten(imap(iterable, mapper));
}
// src/builtins.ts
function every(iterable, keyFn = identityPredicate) {
for (const item of iterable) {
if (!keyFn(item)) {
return false;
}
}
return true;
}
function some(iterable, keyFn = identityPredicate) {
for (const item of iterable) {
if (keyFn(item)) {
return true;
}
}
return false;
}
var all = every;
var any = some;
function contains(haystack, needle) {
return some(haystack, (x) => x === needle);
}
function* enumerate(iterable, start = 0) {
let index = start;
for (const value of iterable) {
yield [index++, value];
}
}
function filter(iterable, predicate) {
return Array.from(ifilter(iterable, predicate));
}
function iter(iterable) {
return iterable[Symbol.iterator]();
}
function map(iterable, mapper) {
return Array.from(imap(iterable, mapper));
}
function max(iterable, keyFn = numberIdentity) {
return reduce2(iterable, (x, y) => keyFn(x) > keyFn(y) ? x : y);
}
function min(iterable, keyFn = numberIdentity) {
return reduce2(iterable, (x, y) => keyFn(x) < keyFn(y) ? x : y);
}
function range_(start, stop, step) {
const counter = count(start, step);
const pred = step >= 0 ? (n) => n < stop : (n) => n > stop;
return takewhile(counter, pred);
}
function range(startOrStop, definitelyStop, step = 1) {
if (definitelyStop !== void 0) {
return range_(startOrStop, definitelyStop, step);
} else {
return range_(0, startOrStop, step);
}
}
function reduce(iterable, reducer, start) {
if (start === void 0) {
return reduce2(iterable, reducer);
} else {
return reduce3(iterable, reducer, start);
}
}
function reduce3(iterable, reducer, start) {
let output = start;
let index = 0;
for (const item of iterable) {
output = reducer(output, item, index++);
}
return output;
}
function reduce2(iterable, reducer) {
const it = iter(iterable);
const start = find(it);
if (start === void 0) {
return void 0;
} else {
return reduce3(it, reducer, start);
}
}
function sorted(iterable, keyFn = primitiveIdentity, reverse = false) {
const result = Array.from(iterable);
result.sort(keyToCmp(keyFn));
if (reverse) {
result.reverse();
}
return result;
}
function sum(iterable) {
return reduce(iterable, (x, y) => x + y, 0);
}
function zip(xs, ys) {
return Array.from(izip(xs, ys));
}
function zip3(xs, ys, zs) {
return Array.from(izip3(xs, ys, zs));
}
export {
all,
any,
chain,
chunked,
compact,
compactObject,
compress,
contains,
count,
cycle,
dropwhile,
enumerate,
every,
filter,
find,
first,
flatmap,
flatten,
groupby,
heads,
icompact,
icompress,
ifilter,
imap,
islice,
itake,
iter,
izip,
izip2,
izip3,
izipLongest,
izipMany,
map,
max,
min,
pairwise,
partition,
permutations,
range,
reduce,
roundrobin,
some,
sorted,
sum,
take,
takewhile,
uniqueEverseen,
uniqueJustseen,
zip,
zip3,
zipLongest,
zipMany
};
// istanbul ignore else -- @preserve
// istanbul ignore if -- @preserve
//# sourceMappingURL=index.js.map
{
"name": "itertools",
"version": "2.1.2",
"description": "A JavaScript port of Python's awesome itertools standard library",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/nvie/itertools.git"
},
"author": "Vincent Driessen",
"homepage": "https://github.com/nvie/itertools#readme",
"bugs": {
"url": "https://github.com/nvie/itertools/issues"
},
"types": "./dist/index.d.ts",
"main": "./dist/index.js",
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"module": "./dist/index.mjs",
"default": "./dist/index.js"
}
}
},
"scripts": {
"actually-prepublish": "echo \"\\n\\nPlease run \\`bin/publish.sh <options>\\` instead.\\n\\n\" && exit 2",
"build": "tsup",
"clean": "rimraf dist",
"format": "prettier --write src/",
"lint": "npm run lint:eslint && npm run lint:prettier",
"lint:eslint": "eslint --report-unused-disable-directives src/",
"lint:prettier": "prettier --list-different src/",
"lint:package": "publint --strict && attw --pack",
"prepublish": "in-publish && npm run actually-prepublish || not-in-publish",
"test": "vitest run --coverage"
},
"files": [
"dist/",
"LICENSE",
"README.md"
],
"keywords": [
"itertool",
"itertools",
"node-itertools"
],
"devDependencies": {
"@arethetypeswrong/cli": "^0.4.2",
"@typescript-eslint/eslint-plugin": "^5.58.0",
"@typescript-eslint/parser": "^5.58.0",
"@vitest/coverage-istanbul": "^0.29.8",
"eslint": "^8.44.0",
"fast-check": "^3.8.0",
"in-publish": "^2.0.1",
"prettier": "^2.8.7",
"publint": "^0.1.15",
"tsup": "^7.1.0",
"typescript": "^4.3.5",
"vitest": "^0.32.3"
},
"githubUrl": "https://github.com/nvie/itertools",
"sideEffects": false
"name": "itertools",
"version": "2.2.0-test1",
"description": "A JavaScript port of Python's awesome itertools standard library",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/nvie/itertools.git"
},
"author": "Vincent Driessen",
"homepage": "https://github.com/nvie/itertools#readme",
"bugs": {
"url": "https://github.com/nvie/itertools/issues"
},
"type": "module",
"types": "./dist/index.d.cts",
"main": "./dist/index.cjs",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"module": "./dist/index.js",
"default": "./dist/index.cjs"
}
}
},
"scripts": {
"build": "tsup",
"clean": "rimraf dist",
"format": "prettier --write src/ test/",
"lint": "npm run lint:eslint && npm run lint:prettier",
"lint:eslint": "eslint --report-unused-disable-directives src/ test/",
"lint:prettier": "prettier --list-different src/ test/",
"lint:package": "publint --strict && attw --pack",
"test": "vitest run --coverage",
"release": "release-it"
},
"files": [
"dist/",
"LICENSE",
"README.md"
],
"keywords": [
"itertool",
"itertools",
"node-itertools"
],
"devDependencies": {
"@arethetypeswrong/cli": "^0.13.5",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"@vitest/coverage-istanbul": "^1.1.0",
"eslint": "^8.56.0",
"fast-check": "^3.15.0",
"in-publish": "^2.0.1",
"prettier": "^3.1.1",
"publint": "^0.2.7",
"release-it": "^17.0.1",
"tsup": "^8.0.1",
"typescript": "^5.3.3",
"vite-tsconfig-paths": "^4.2.2",
"vitest": "^1.1.0"
},
"githubUrl": "https://github.com/nvie/itertools",
"sideEffects": false
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc