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

@autoguru/utilities

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@autoguru/utilities - npm Package Compare versions

Comparing version 1.0.65 to 1.0.66

dist/utilities.cjs.development.js

2

dist/events/bindEvent.d.ts

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

export declare const bindEvent: <Node_1 extends HTMLElement | HTMLDocument, K extends "fullscreenchange" | "fullscreenerror" | "abort" | "animationcancel" | "animationend" | "animationiteration" | "animationstart" | "auxclick" | "blur" | "cancel" | "canplay" | "canplaythrough" | "change" | "click" | "close" | "contextmenu" | "cuechange" | "dblclick" | "drag" | "dragend" | "dragenter" | "dragexit" | "dragleave" | "dragover" | "dragstart" | "drop" | "durationchange" | "emptied" | "ended" | "error" | "focus" | "focusin" | "focusout" | "gotpointercapture" | "input" | "invalid" | "keydown" | "keypress" | "keyup" | "load" | "loadeddata" | "loadedmetadata" | "loadend" | "loadstart" | "lostpointercapture" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "pause" | "play" | "playing" | "pointercancel" | "pointerdown" | "pointerenter" | "pointerleave" | "pointermove" | "pointerout" | "pointerover" | "pointerup" | "progress" | "ratechange" | "reset" | "resize" | "scroll" | "securitypolicyviolation" | "seeked" | "seeking" | "select" | "selectionchange" | "selectstart" | "stalled" | "submit" | "suspend" | "timeupdate" | "toggle" | "touchcancel" | "touchend" | "touchmove" | "touchstart" | "transitioncancel" | "transitionend" | "transitionrun" | "transitionstart" | "volumechange" | "waiting" | "wheel" | "copy" | "cut" | "paste">(node: Node_1, event: K, callback: (event: HTMLElementEventMap[K]) => unknown) => () => void;
export declare const bindEvent: <Node_1 extends HTMLElement | HTMLDocument>(node: Node_1, type: string, callback: (event: any) => unknown) => () => void;

@@ -1,32 +0,8 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
'use strict'
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var tinyWarning = _interopDefault(require('tiny-warning'));
var invariant = _interopDefault(require('tiny-invariant'));
const clamp = (value, min, max) => Math.min(max, Math.max(value, min));
const wrapEvent = (handler, consumerHandler) => (event) => {
invariant(typeof handler === 'function', 'You must supply a handler method.');
handler(event);
if (!event.defaultPrevented && typeof consumerHandler !== 'undefined') {
invariant(typeof consumerHandler === 'function', 'You supplied a consumer handler that was supposed to be a function.');
return consumerHandler(event);
}
};
const bindEvent = (node, event, callback) => {
node.addEventListener(event, callback);
return () => {
node.removeEventListener(event, callback);
};
};
exports.warning = tinyWarning;
exports.invariant = invariant;
exports.bindEvent = bindEvent;
exports.clamp = clamp;
exports.wrapEvent = wrapEvent;
if (process.env.NODE_ENV === 'production') {
module.exports = require('./utilities.cjs.production.min.js')
} else {
module.exports = require('./utilities.cjs.development.js')
}
{
"name": "@autoguru/utilities",
"version": "1.0.65",
"version": "1.0.66",
"description": "A collection of smallish things that help AutoGuru write code.",

@@ -16,3 +16,3 @@ "homepage": "https://github.com/autoguru-au/octane/tree/master/packages/utilities#readme",

"scripts": {
"build": "rollup -c",
"build": "tsdx build",
"prepublish": "yarn run build"

@@ -27,6 +27,4 @@ },

"@autoguru/jest-preset": "^1.0.64",
"@autoguru/tsconfig": "^1.0.63",
"rollup": "^1.20.3",
"rollup-plugin-typescript2": "^0.24.0",
"typescript": "~3.6.2"
"tsdx": "^0.9.1",
"typescript": "next"
},

@@ -36,3 +34,3 @@ "publishConfig": {

},
"gitHead": "76af5f4b3377f49e2d011ad597c4420344121b3d"
"gitHead": "6a3742187b013d2c7602e45564b7246e763484db"
}
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