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

use-double-tap

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-double-tap - npm Package Compare versions

Comparing version 1.3.0 to 1.3.3

dist/index.modern.js

2

dist/index.module.js

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

import{useCallback as n,useRef as r}from"react";function e(e,t,o){void 0===t&&(t=300),void 0===o&&(o={});var u=r(null),i=n(function(n){u.current?(clearTimeout(u.current),u.current=null,e&&e(n)):u.current=setTimeout(function(){o.onSingleTap&&o.onSingleTap(n),u.current=null},t)},[e,t,o.onSingleTap]);return e?{onClick:i}:{}}export{e as useDoubleTap};
import{useRef as n,useCallback as r}from"react";function e(e,t,o){void 0===t&&(t=300),void 0===o&&(o={});var u=n(null),i=r(function(n){u.current?(clearTimeout(u.current),u.current=null,e&&e(n)):u.current=setTimeout(function(){o.onSingleTap&&o.onSingleTap(n),u.current=null},t)},[e,t,o.onSingleTap]);return e?{onClick:i}:{}}export{e as useDoubleTap};
//# sourceMappingURL=index.module.js.map

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

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n(e.useDoubleTap={},e.react)}(this,function(e,n){e.useDoubleTap=function(e,t,u){void 0===t&&(t=300),void 0===u&&(u={});var o=n.useRef(null),r=n.useCallback(function(n){o.current?(clearTimeout(o.current),o.current=null,e&&e(n)):o.current=setTimeout(function(){u.onSingleTap&&u.onSingleTap(n),o.current=null},t)},[e,t,u.onSingleTap]);return e?{onClick:r}:{}}});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((e=e||self).useDoubleTap={},e.react)}(this,function(e,n){e.useDoubleTap=function(e,t,u){void 0===t&&(t=300),void 0===u&&(u={});var o=n.useRef(null),r=n.useCallback(function(n){o.current?(clearTimeout(o.current),o.current=null,e&&e(n)):o.current=setTimeout(function(){u.onSingleTap&&u.onSingleTap(n),o.current=null},t)},[e,t,u.onSingleTap]);return e?{onClick:r}:{}}});
//# sourceMappingURL=index.umd.js.map
{
"name": "use-double-tap",
"version": "1.3.0",
"version": "1.3.3",
"description": "React hook for handling double tap on mobile devices",

@@ -8,20 +8,25 @@ "author": "minwork",

"keywords": [
"double tap",
"react",
"hook",
"use",
"tap",
"double tap"
"hook"
],
"repository": "https://github.com/minwork/use-double-tap",
"main": "./dist/index.js",
"browser": "./dist/index.umd.js",
"umd:main": "./dist/index.umd.js",
"scripts": {
"build": "rimraf dist/* && microbundle --jsx React.createElement --external react --name useDoubleTap --output dist/index.js",
"deploy": "yarn test && yarn build && npm publish",
"test": "jest",
"start": "microbundle watch",
"lint": "eslint src tests --ext .ts,.tsx"
},
"main": "dist/index.js",
"browser": "dist/index.umd.js",
"umd:main": "dist/index.umd.js",
"jsnext:main": "./dist/index.modern.js",
"module": "./dist/index.module.js",
"source": "./src/index.ts",
"module": "dist/index.module.js",
"source": "src/index.ts",
"syntax": {
"esmodules": "./dist/index.modern.js"
"esmodules": "dist/index.modern.js"
},
"types": "./dist/index.d.ts",
"typings": "./dist/index.d.ts",
"types": "dist/index.d.ts",
"typings": "dist/index.d.ts",
"exports": {

@@ -39,20 +44,10 @@ ".": {

"engines": {
"node": ">=8",
"node": ">=10",
"npm": ">=5"
},
"scripts": {
"build": "rimraf dist/* && microbundle --jsx React.createElement --external react --name useDoubleTap --output dist/index.js",
"deploy": "yarn test && yarn build && npm publish",
"test": "jest",
"start": "microbundle watch",
"lint": "eslint src tests --ext .ts,.tsx"
},
"babel": {
"presets": [
"@babel/preset-typescript",
"@babel/preset-react",
"@babel/preset-env"
],
"plugins": [
"@babel/transform-runtime"
"@babel/preset-env",
"@babel/preset-react"
]

@@ -62,10 +57,10 @@ },

"peerDependencies": {
"react": "^16.8.0"
"react": "^16.8.0 || 17.x"
},
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/plugin-transform-runtime": "^7.6.0",
"@babel/preset-env": "^7.6.0",
"@babel/preset-typescript": "^7.6.0",
"@babel/runtime": "^7.6.0",
"@babel/core": "^7.13.15",
"@babel/plugin-transform-runtime": "^7.13.15",
"@babel/preset-env": "^7.13.15",
"@babel/preset-react": "^7.13.13",
"@babel/preset-typescript": "^7.13.0",
"@testing-library/jest-dom": "^5.5.0",

@@ -79,21 +74,10 @@ "@testing-library/react": "^9.1.4",

"@typescript-eslint/eslint-plugin": "^2.29.0",
"babel-preset-react": "^6.24.1",
"cross-env": "^5.2.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.1.0",
"eslint-config-airbnb-typescript": "^7.2.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "2.20.1",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "7.19.0",
"eslint-plugin-react-hooks": "2.5.0",
"jest": "^24.9.0",
"microbundle": "^0.11.0",
"microbundle": "^0.12.4",
"prettier": "^1.18.2",
"react": "^16.9.0",
"react-dom": "^16.13.1",
"react-scripts": "^3.4.1",
"react-test-renderer": "^16.13.1",

@@ -100,0 +84,0 @@ "rimraf": "^3.0.0",

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