Socket
Socket
Sign inDemoInstall

@zag-js/utils

Package Overview
Dependencies
Maintainers
1
Versions
778
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.2.0 to 0.3.0

4

dist/index.d.ts

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

declare function compact<T extends Record<string, unknown> | undefined>(obj: T): T;
declare function warn(m: string): void;

@@ -42,2 +44,2 @@ declare function warn(c: boolean, m: string): void;

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 };
export { IndexOptions, add, callAll, cast, chunk, clear, compact, 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 };

@@ -28,2 +28,3 @@ "use strict";

clear: () => clear,
compact: () => compact,
first: () => first,

@@ -146,2 +147,11 @@ fromLength: () => fromLength,

// src/object.ts
function compact(obj) {
if (obj === void 0)
return obj;
return Object.fromEntries(
Object.entries(obj).filter(([, value]) => value !== void 0).map(([key, value]) => [key, isObject(value) ? compact(value) : value])
);
}
// src/warning.ts

@@ -169,2 +179,3 @@ function warn(...a) {

clear,
compact,
first,

@@ -171,0 +182,0 @@ fromLength,

{
"name": "@zag-js/utils",
"version": "0.2.0",
"version": "0.3.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

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