Benign javascript Download

@zag-js/utils 0.10.3

License text starts MIT/ISC/Apache/BSDPackage has build script (esbuild/babel/vite)
SHA-256282cca9354d94905863dc0c8d70aea5c79c606c6952b4b8239b404ab79d4ad39

Evidence

CommonJS-style exports property assignment array.js · lines 1–48
1'use strict';
2
3Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
5function toArray(v) {
6 if (!v)
7 return [];
8 return Array.isArray(v) ? v : [v];
9}
10const fromLength = (length) => Array.from(Array(length).keys());
11const first = (v) => v[0];
12const last = (v) => v[v.length - 1];
13const isEmpty = (v) => v.length === 0;
14const has = (v, t) => v.indexOf(t) !== -1;
15const add = (v, ...items) => v.concat(items);
16const remove = (v, item) => removeAt(v, v.indexOf(item));
17const removeAt = (v, i) => {
18 if (i > -1)
19 v.splice(i, 1);
20 return v;
21};
22function clear(v) {
23 while (v.length > 0)
24 v.pop();
25 return v;
⋯7 lines
33 return step > 0 ? 0 : last2;
34 if (next2 < 0)
35 return loop ? last2 : 0;
36 if (next2 >= len)
37 return loop ? 0 : idx > len ? len : idx;
⋯11 lines
CommonJS-style exports property assignment functions.js · lines 1–29
1'use strict';
2
3Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
5const runIfFn = (v, ...a) => {
6 const res = typeof v === "function" ? v(...a) : v;
7 return res ?? void 0;
8};
9const cast = (v) => v;
10const noop = () => {
11};
12const callAll = (...fns) => (...a) => {
13 fns.forEach(function(fn) {
14 fn?.(...a);
15 });
16};
17const uuid = /* @__PURE__ */ (() => {
18 let id = 0;
19 return () => {
20 id++;
21 return id.toString(36);
22 };
23})();
24
25exports.callAll = callAll;
26exports.cast = cast;
27exports.noop = noop;
28exports.runIfFn = runIfFn;
29exports.uuid = uuid;

Showing the top 5 files — 5 more files (8 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.