@three11/debounce
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -1,142 +0,51 @@ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
if(typeof exports === 'object' && typeof module === 'object') | ||
module.exports = factory(); | ||
else if(typeof define === 'function' && define.amd) | ||
define([], factory); | ||
else if(typeof exports === 'object') | ||
exports["debounce"] = factory(); | ||
else | ||
root["debounce"] = factory(); | ||
})(window, function() { | ||
return /******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
/******/ | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ | ||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) { | ||
/******/ return installedModules[moduleId].exports; | ||
/******/ } | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ i: moduleId, | ||
/******/ l: false, | ||
/******/ exports: {} | ||
/******/ }; | ||
/******/ | ||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
/******/ | ||
/******/ // Flag the module as loaded | ||
/******/ module.l = true; | ||
/******/ | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ | ||
/******/ | ||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
/******/ | ||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
/******/ | ||
/******/ // define getter function for harmony exports | ||
/******/ __webpack_require__.d = function(exports, name, getter) { | ||
/******/ if(!__webpack_require__.o(exports, name)) { | ||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); | ||
/******/ } | ||
/******/ }; | ||
/******/ | ||
/******/ // define __esModule on exports | ||
/******/ __webpack_require__.r = function(exports) { | ||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | ||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
/******/ } | ||
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ }; | ||
/******/ | ||
/******/ // create a fake namespace object | ||
/******/ // mode & 1: value is a module id, require it | ||
/******/ // mode & 2: merge all properties of value into the ns | ||
/******/ // mode & 4: return value when already ns object | ||
/******/ // mode & 8|1: behave like require | ||
/******/ __webpack_require__.t = function(value, mode) { | ||
/******/ if(mode & 1) value = __webpack_require__(value); | ||
/******/ if(mode & 8) return value; | ||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; | ||
/******/ var ns = Object.create(null); | ||
/******/ __webpack_require__.r(ns); | ||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); | ||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); | ||
/******/ return ns; | ||
/******/ }; | ||
/******/ | ||
/******/ // getDefaultExport function for compatibility with non-harmony modules | ||
/******/ __webpack_require__.n = function(module) { | ||
/******/ var getter = module && module.__esModule ? | ||
/******/ function getDefault() { return module['default']; } : | ||
/******/ function getModuleExports() { return module; }; | ||
/******/ __webpack_require__.d(getter, 'a', getter); | ||
/******/ return getter; | ||
/******/ }; | ||
/******/ | ||
/******/ // Object.prototype.hasOwnProperty.call | ||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; | ||
/******/ | ||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
/******/ | ||
/******/ | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 0); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(["exports"], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(exports); | ||
} else { | ||
var mod = { | ||
exports: {} | ||
}; | ||
factory(mod.exports); | ||
global.debounce = mod.exports; | ||
} | ||
})(this, function (_exports) { | ||
"use strict"; | ||
"use strict"; | ||
Object.defineProperty(_exports, "__esModule", { | ||
value: true | ||
}); | ||
_exports.default = void 0; | ||
var _this = void 0, | ||
_arguments = arguments; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var debounce = function debounce(func, wait, immediate) { | ||
var timeout; | ||
wait = wait ? wait : 15; | ||
return function () { | ||
var context = _this; | ||
var args = _arguments; | ||
var _this = void 0, | ||
_arguments = arguments; | ||
var later = function later() { | ||
timeout = null; | ||
var debounce = function debounce(func, wait, immediate) { | ||
var timeout; | ||
wait = wait ? wait : 15; | ||
return function () { | ||
var context = _this; | ||
var args = _arguments; | ||
if (!immediate) { | ||
func.apply(context, args); | ||
} | ||
}; | ||
var later = function later() { | ||
timeout = null; | ||
var callNow = immediate && timeout; | ||
clearTimeout(timeout); | ||
timeout = setTimeout(later, wait); | ||
if (!immediate) { | ||
if (callNow) { | ||
func.apply(context, args); | ||
} | ||
}; | ||
var callNow = immediate && timeout; | ||
clearTimeout(timeout); | ||
timeout = setTimeout(later, wait); | ||
if (callNow) { | ||
func.apply(context, args); | ||
} | ||
}; | ||
}; | ||
var _default = debounce; | ||
exports.default = _default; | ||
/***/ }) | ||
/******/ ])["default"]; | ||
}); | ||
var _default = debounce; | ||
_exports.default = _default; | ||
}); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.debounce=t():e.debounce=t()}(window,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=arguments,r=function(e,t,n){var r;return t=t||15,function(){var u=o,f=n&&r;clearTimeout(r),r=setTimeout(function(){r=null,n||e.apply(void 0,u)},t),f&&e.apply(void 0,u)}};t.default=r}]).default}); | ||
(function(a,b){if("function"==typeof define&&define.amd)define(["exports"],b);else if("undefined"!=typeof exports)b(exports);else{var c={exports:{}};b(c.exports),a.debounce=c.exports}})(this,function(a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var b=arguments;a.default=function f(a,c,d){var e;return c=c?c:15,function(){var f=b,g=d&&e;clearTimeout(e),e=setTimeout(function b(){e=null,d||a.apply(void 0,f)},c),g&&a.apply(void 0,f)}}}); |
{ | ||
"name": "@three11/debounce", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Debounce multiple function executions", | ||
"main": "dist/debounce.js", | ||
"scripts": { | ||
"build": "webpack" | ||
"dist": "babel src/debounce.js --out-file dist/debounce.js", | ||
"minify": "babel src/debounce.js --out-file dist/debounce.min.js --presets minify,@babel/env", | ||
"build": "npm run dist && npm run minify" | ||
}, | ||
@@ -13,3 +15,9 @@ "repository": { | ||
}, | ||
"keywords": ["Debounce", "Function", "Wait", "JavaScript", "ES2017"], | ||
"keywords": [ | ||
"Debounce", | ||
"Function", | ||
"Wait", | ||
"JavaScript", | ||
"ES2017" | ||
], | ||
"authors": [ | ||
@@ -38,11 +46,17 @@ { | ||
"devDependencies": { | ||
"@babel/cli": "^7.0.0-beta.52", | ||
"@babel/core": "^7.0.0-beta.52", | ||
"@babel/preset-env": "^7.0.0-beta.52", | ||
"@babel/preset-stage-2": "^7.0.0-beta.52", | ||
"babel-loader": "^8.0.0-beta", | ||
"unminified-webpack-plugin": "^2.0.0", | ||
"webpack": "^4.15.1", | ||
"webpack-cli": "^3.0.8" | ||
"@babel/cli": "7.1.2", | ||
"@babel/core": "7.1.2", | ||
"@babel/plugin-proposal-class-properties": "7.1.0", | ||
"@babel/plugin-proposal-decorators": "7.1.2", | ||
"@babel/plugin-proposal-export-namespace-from": "7.0.0", | ||
"@babel/plugin-proposal-function-sent": "7.1.0", | ||
"@babel/plugin-proposal-json-strings": "7.0.0", | ||
"@babel/plugin-proposal-numeric-separator": "7.0.0", | ||
"@babel/plugin-proposal-throw-expressions": "7.0.0", | ||
"@babel/plugin-syntax-dynamic-import": "7.0.0", | ||
"@babel/plugin-syntax-import-meta": "7.0.0", | ||
"@babel/preset-env": "7.1.0", | ||
"babel-loader": "8.0.4", | ||
"babel-minify": "0.5.0" | ||
} | ||
} |
@@ -1,20 +0,11 @@ | ||
[![GitHub stars](https://img.shields.io/github/stars/three11/debounce.svg?style=social&label=Stars)](https://github.com/three11/debounce) | ||
[![GitHub forks](https://img.shields.io/github/forks/three11/debounce.svg?style=social&label=Fork)](https://github.com/three11/debounce/network#fork-destination-box) | ||
[![GitHub release](https://img.shields.io/github/release/three11/debounce.svg)](https://github.com/three11/debounce/releases/latest) | ||
[![GitHub issues](https://img.shields.io/github/issues/three11/debounce.svg)](https://github.com/three11/debounce/issues) | ||
[![GitHub last commit](https://img.shields.io/github/last-commit/three11/debounce.svg)](https://github.com/three11/debounce/commits/master) | ||
[![Github file size](https://img.shields.io/github/size/three11/debounce/dist/index.min.js.svg)](https://github.com/three11/debounce/) | ||
[![Github file size](https://img.shields.io/github/size/three11/debounce/dist/debounce.min.js.svg)](https://github.com/three11/debounce/) | ||
[![Build Status](https://travis-ci.org/three11/debounce.svg?branch=master)](https://travis-ci.org/three11/debounce) | ||
[![npm](https://img.shields.io/npm/dt/@three11/debounce.svg)](https://www.npmjs.com/package/@three11/debounce) | ||
[![npm](https://img.shields.io/npm/v/@three11/debounce.svg)](https://www.npmjs.com/package/@three11/debounce) | ||
[![license](https://img.shields.io/github/license/three11/debounce.svg)](https://github.com/three11/debounce) | ||
[![Analytics](https://ga-beacon.appspot.com/UA-83446952-1/github.com/three11/debounce/README.md)](https://github.com/three11/debounce/) | ||
[![Open Source Love svg1](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/three11/debounce/) | ||
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/three11/debounce/graphs/commit-activity) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/three11/debounce.svg)](https://greenkeeper.io/) | ||
[![dependencies Status](https://david-dm.org/three11/debounce/status.svg)](https://david-dm.org/three11/debounce) | ||
[![devDependencies Status](https://david-dm.org/three11/debounce/dev-status.svg)](https://david-dm.org/three11/debounce?type=dev) | ||
[![ForTheBadge built-with-love](https://ForTheBadge.com/images/badges/built-with-love.svg)](https://github.com/three11/) | ||
# Debounce | ||
@@ -21,0 +12,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
7
0
40958
14
71
68