Socket
Socket
Sign inDemoInstall

@zag-js/utils

Package Overview
Dependencies
Maintainers
1
Versions
769
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/utils - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

3

dist/index.d.ts

@@ -26,3 +26,2 @@ declare function toArray<T>(v: T | T[] | undefined | null): T[];

declare const uuid: () => string;
declare function merge<T, U>(origin: T, patch: U): T & U;

@@ -43,2 +42,2 @@ declare const isDev: () => boolean;

export { IndexOptions, add, callAll, cast, chunk, clear, first, fromLength, has, hasProp, invariant, isArray, isBoolean, isDev, isEmpty, isFunction, isNumber, isObject, isString, last, merge, next, nextIndex, noop, prev, prevIndex, remove, removeAt, runIfFn, toArray, uuid, warn };
export { IndexOptions, add, callAll, cast, chunk, clear, first, fromLength, has, hasProp, invariant, isArray, isBoolean, isDev, isEmpty, isFunction, isNumber, isObject, isString, last, next, nextIndex, noop, prev, prevIndex, remove, removeAt, runIfFn, toArray, uuid, warn };

@@ -1,57 +0,1 @@

"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
add: () => add,
callAll: () => callAll,
cast: () => cast,
chunk: () => chunk,
clear: () => clear,
first: () => first,
fromLength: () => fromLength,
has: () => has,
hasProp: () => hasProp,
invariant: () => invariant,
isArray: () => isArray,
isBoolean: () => isBoolean,
isDev: () => isDev,
isEmpty: () => isEmpty,
isFunction: () => isFunction,
isNumber: () => isNumber,
isObject: () => isObject,
isString: () => isString,
last: () => last,
merge: () => merge,
next: () => next,
nextIndex: () => nextIndex,
noop: () => noop,
prev: () => prev,
prevIndex: () => prevIndex,
remove: () => remove,
removeAt: () => removeAt,
runIfFn: () => runIfFn,
toArray: () => toArray,
uuid: () => uuid,
warn: () => warn
});
module.exports = __toCommonJS(src_exports);
// src/array.ts

@@ -135,18 +79,2 @@ function toArray(v) {

})();
function merge(origin, patch) {
if (!(typeof patch === "object"))
return patch;
const result = !(typeof origin === "object") ? {} : Object.assign({}, origin);
for (const key of Object.keys(patch)) {
const value = patch[key];
const src = result[key];
if (value === null)
delete result[key];
else if (Array.isArray(value) || Array.isArray(src))
result[key] = (src || []).concat(value || []);
else
result[key] = merge(src, value);
}
return result;
}

@@ -178,4 +106,3 @@ // src/guard.ts

}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
export {
add,

@@ -200,3 +127,2 @@ callAll,

last,
merge,
next,

@@ -213,2 +139,2 @@ nextIndex,

warn
});
};
{
"type": "module",
"name": "@zag-js/utils",
"version": "0.1.4",
"version": "0.1.5",
"description": "",

@@ -14,3 +15,2 @@ "keywords": [

"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",

@@ -29,5 +29,5 @@ "repository": "https://github.com/chakra-ui/zag/tree/main/packages/utilities/core",

"scripts": {
"build-fast": "tsup src/index.ts --format=esm,cjs",
"build-fast": "tsup src/index.ts --format=esm",
"start": "pnpm build --watch",
"build": "tsup src/index.ts --format=esm,cjs --dts",
"build": "tsup src/index.ts --format=esm --dts",
"test": "jest --config ../../../jest.config.js --rootDir . --passWithNoTests",

@@ -34,0 +34,0 @@ "lint": "eslint src --ext .ts,.tsx",

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