Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zag-js/core

Package Overview
Dependencies
Maintainers
1
Versions
903
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/core - npm Package Compare versions

Comparing version 0.0.0-dev-20221111132133 to 0.0.0-dev-20221111134129

4

dist/index.d.ts
export { proxy, ref, snapshot, subscribe } from '@zag-js/store';
declare function deepMerge<T extends Record<string, any>>(source: T, ...objects: T[]): T;
declare type Dict<T = any> = Record<string, T>;

@@ -421,2 +423,2 @@ declare type MaybeArray<T> = T | T[];

export { AnyMachine, ContextFrom, EventFrom, Machine, MachineSrc, StateFrom, StateMachine, choose, createMachine, guards, mergeProps };
export { AnyMachine, ContextFrom, EventFrom, Machine, MachineSrc, StateFrom, StateMachine, choose, createMachine, deepMerge, guards, mergeProps };

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

createMachine: () => createMachine,
deepMerge: () => deepMerge,
guards: () => guards,

@@ -95,2 +96,20 @@ mergeProps: () => mergeProps,

// src/deep-merge.ts
function deepMerge(source, ...objects) {
for (const obj of objects) {
const target = compact(obj);
for (const key in target) {
if (isObject(obj[key])) {
if (!source[key]) {
source[key] = {};
}
deepMerge(source[key], obj[key]);
} else {
source[key] = obj[key];
}
}
}
return source;
}
// src/utils.ts

@@ -479,3 +498,3 @@ var import_store = require("@zag-js/store");

return;
Object.assign(this.state.context, compact(context));
deepMerge(this.state.context, context);
});

@@ -853,2 +872,3 @@ __publicField(this, "withContext", (context) => {

createMachine,
deepMerge,
guards,

@@ -855,0 +875,0 @@ mergeProps,

{
"name": "@zag-js/core",
"version": "0.0.0-dev-20221111132133",
"version": "0.0.0-dev-20221111134129",
"description": "A minimal implementation of xstate fsm for UI machines",

@@ -35,3 +35,3 @@ "main": "dist/index.js",

"devDependencies": {
"@zag-js/utils": "0.0.0-dev-20221111132133"
"@zag-js/utils": "0.0.0-dev-20221111134129"
},

@@ -38,0 +38,0 @@ "scripts": {

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