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

@zag-js/utils

Package Overview
Dependencies
Maintainers
1
Versions
786
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.0.0-dev-20220510084727 to 0.0.0-dev-20220603082742

11

dist/guard.d.ts

@@ -17,2 +17,3 @@ export declare const isDev: () => boolean;

export declare const isFunction: (v: any) => v is Function;
export declare const hasProp: <T extends string>(obj: any, prop: T) => obj is Record<T, any>;
export declare const supportsPointerEvent: () => boolean;

@@ -23,6 +24,10 @@ export declare const supportsTouchEvent: () => boolean;

export declare const isTouchEvent: (v: any) => v is TouchEvent;
export declare const isLeftClick: (v: MouseEvent | PointerEvent) => boolean;
export declare const isRightClick: (v: MouseEvent | PointerEvent) => boolean;
export declare const isLeftClick: (v: {
button: number;
}) => boolean;
export declare const isRightClick: (v: {
button: number;
}) => boolean;
export declare const isModifiedEvent: (v: Pick<KeyboardEvent, "ctrlKey" | "metaKey" | "altKey">) => boolean;
export declare const isCtrlKey: (v: KeyboardEvent) => boolean;
export declare const isCtrlKey: (v: Pick<KeyboardEvent, "ctrlKey" | "metaKey">) => boolean;
//# sourceMappingURL=guard.d.ts.map

@@ -30,2 +30,3 @@ var __defProp = Object.defineProperty;

has: () => has,
hasProp: () => hasProp,
invariant: () => invariant,

@@ -175,3 +176,3 @@ isApple: () => isApple,

var isDev = () => void 0 !== "production";
var isDom = () => !!(typeof window !== "undefined");
var isDom = () => typeof window !== "undefined";
var isMac = () => platform(/^Mac/);

@@ -191,7 +192,8 @@ var isIPhone = () => platform(/^iPhone/);

var isFunction = (v) => typeof v === "function";
var hasProp = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
var supportsPointerEvent = () => isDom() && window.onpointerdown === null;
var supportsTouchEvent = () => isDom() && window.ontouchstart === null;
var supportsMouseEvent = () => isDom() && window.onmousedown === null;
var isMouseEvent = (v) => isObject(v) && "button" in v;
var isTouchEvent = (v) => isObject(v) && "touches" in v;
var isMouseEvent = (v) => isObject(v) && hasProp(v, "button");
var isTouchEvent = (v) => isObject(v) && hasProp(v, "touches");
var isLeftClick = (v) => v.button === 0;

@@ -198,0 +200,0 @@ var isRightClick = (v) => v.button === 2;

{
"name": "@zag-js/utils",
"version": "0.0.0-dev-20220510084727",
"version": "0.0.0-dev-20220603082742",
"description": "",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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