@instructure/debounce 8.12.1-snapshot.7 → 8.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [8.13.0](https://github.com/instructure/instructure-ui/compare/v8.12.0...v8.13.0) (2021-12-01)
7
+
8
+ **Note:** Version bump only for package @instructure/debounce
9
+
6
10
  # [8.12.0](https://github.com/instructure/instructure-ui/compare/v8.11.1...v8.12.0) (2021-11-17)
7
11
 
8
12
  **Note:** Version bump only for package @instructure/debounce
package/es/debounce.js CHANGED
@@ -52,7 +52,9 @@
52
52
  * Specify invoking on the trailing edge of the timeout.
53
53
  * @returns {Function} Returns the new debounced function.
54
54
  */
55
- function debounce(func, wait = 0, options = {}) {
55
+ function debounce(func) {
56
+ let wait = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
57
+ let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
56
58
  let lastArgs;
57
59
  let lastThis;
58
60
  let result;
@@ -154,9 +156,14 @@ function debounce(func, wait = 0, options = {}) {
154
156
  timers = [];
155
157
  }
156
158
 
157
- function debounced(...args) {
159
+ function debounced() {
158
160
  const time = Date.now();
159
161
  const isInvoking = shouldInvoke(time);
162
+
163
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
164
+ args[_key] = arguments[_key];
165
+ }
166
+
160
167
  lastArgs = args; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
161
168
  // @ts-ignore
162
169
 
package/lib/debounce.js CHANGED
@@ -60,7 +60,9 @@ exports.default = void 0;
60
60
  * Specify invoking on the trailing edge of the timeout.
61
61
  * @returns {Function} Returns the new debounced function.
62
62
  */
63
- function debounce(func, wait = 0, options = {}) {
63
+ function debounce(func) {
64
+ let wait = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
65
+ let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
64
66
  let lastArgs;
65
67
  let lastThis;
66
68
  let result;
@@ -162,9 +164,14 @@ function debounce(func, wait = 0, options = {}) {
162
164
  timers = [];
163
165
  }
164
166
 
165
- function debounced(...args) {
167
+ function debounced() {
166
168
  const time = Date.now();
167
169
  const isInvoking = shouldInvoke(time);
170
+
171
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
172
+ args[_key] = arguments[_key];
173
+ }
174
+
168
175
  lastArgs = args; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
169
176
  // @ts-ignore
170
177
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/debounce",
3
- "version": "8.12.1-snapshot.7+1e7ac8219",
3
+ "version": "8.13.0",
4
4
  "description": "A debounce util made by Instructure Inc.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "8.12.1-snapshot.7+1e7ac8219"
26
+ "@instructure/ui-babel-preset": "8.13.0"
27
27
  },
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.13.10"
@@ -31,6 +31,5 @@
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  },
34
- "sideEffects": false,
35
- "gitHead": "1e7ac821932a91fe9ef761c96f747c7ea1f3925a"
34
+ "sideEffects": false
36
35
  }
package/LICENSE.md DELETED
@@ -1,27 +0,0 @@
1
- ---
2
- title: The MIT License (MIT)
3
- category: Getting Started
4
- order: 9
5
- ---
6
-
7
- # The MIT License (MIT)
8
-
9
- Copyright (c) 2015 Instructure, Inc.
10
-
11
- **Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions.**
17
-
18
- The above copyright notice and this permission notice shall be included in all
19
- copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- SOFTWARE.