@deot/helper-utils 1.1.5 → 1.1.6

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/dist/index.cjs CHANGED
@@ -246,6 +246,7 @@ const preZero = (num) => {
246
246
  };
247
247
 
248
248
  const raf = typeof window !== "undefined" && window.requestAnimationFrame || ((fn) => setTimeout(fn, 16));
249
+ const caf = typeof window !== "undefined" && window.cancelAnimationFrame || ((rafIf) => clearTimeout(rafIf));
249
250
 
250
251
  const range = (min, max) => {
251
252
  return Math.floor(Math.random() * (max - min + 1) + min);
@@ -351,6 +352,7 @@ const toPromise = (target, promise) => {
351
352
 
352
353
  exports.asterisk = asterisk;
353
354
  exports.autoCatch = autoCatch;
355
+ exports.caf = caf;
354
356
  exports.canvasToImage = canvasToImage;
355
357
  exports.cloneDeepEasier = cloneDeepEasier;
356
358
  exports.compressImage = compressImage;
package/dist/index.d.ts CHANGED
@@ -2,6 +2,10 @@ export declare const asterisk: (value: string, from?: number, length?: number) =
2
2
 
3
3
  export declare const autoCatch: (impl: any, options?: Record<string, any>) => Promise<any>;
4
4
 
5
+ export declare type Caf = (radIf: number) => void;
6
+
7
+ export declare const caf: Caf;
8
+
5
9
  export declare const canvasToImage: (canvas: HTMLCanvasElement, filename?: string) => Promise<Result>;
6
10
 
7
11
  export declare const cloneDeepEasier: (source: object) => any;
@@ -245,6 +245,7 @@ var HelperUtils = (function (exports) {
245
245
  };
246
246
 
247
247
  const raf = typeof window !== "undefined" && window.requestAnimationFrame || ((fn) => setTimeout(fn, 16));
248
+ const caf = typeof window !== "undefined" && window.cancelAnimationFrame || ((rafIf) => clearTimeout(rafIf));
248
249
 
249
250
  const range = (min, max) => {
250
251
  return Math.floor(Math.random() * (max - min + 1) + min);
@@ -350,6 +351,7 @@ var HelperUtils = (function (exports) {
350
351
 
351
352
  exports.asterisk = asterisk;
352
353
  exports.autoCatch = autoCatch;
354
+ exports.caf = caf;
353
355
  exports.canvasToImage = canvasToImage;
354
356
  exports.cloneDeepEasier = cloneDeepEasier;
355
357
  exports.compressImage = compressImage;
package/dist/index.js CHANGED
@@ -242,6 +242,7 @@ const preZero = (num) => {
242
242
  };
243
243
 
244
244
  const raf = typeof window !== "undefined" && window.requestAnimationFrame || ((fn) => setTimeout(fn, 16));
245
+ const caf = typeof window !== "undefined" && window.cancelAnimationFrame || ((rafIf) => clearTimeout(rafIf));
245
246
 
246
247
  const range = (min, max) => {
247
248
  return Math.floor(Math.random() * (max - min + 1) + min);
@@ -345,4 +346,4 @@ const toPromise = (target, promise) => {
345
346
  return instance;
346
347
  };
347
348
 
348
- export { asterisk, autoCatch, canvasToImage, cloneDeepEasier, compressImage, dataURLToFile, debounce, def, flatten, flattenJSONParse, generateString, getPropByPath, getUid, hasOwn, numberToUnit, preZero, probs, raf, range, sleep, throttle, toPromise };
349
+ export { asterisk, autoCatch, caf, canvasToImage, cloneDeepEasier, compressImage, dataURLToFile, debounce, def, flatten, flattenJSONParse, generateString, getPropByPath, getUid, hasOwn, numberToUnit, preZero, probs, raf, range, sleep, throttle, toPromise };
@@ -248,6 +248,7 @@
248
248
  };
249
249
 
250
250
  const raf = typeof window !== "undefined" && window.requestAnimationFrame || ((fn) => setTimeout(fn, 16));
251
+ const caf = typeof window !== "undefined" && window.cancelAnimationFrame || ((rafIf) => clearTimeout(rafIf));
251
252
 
252
253
  const range = (min, max) => {
253
254
  return Math.floor(Math.random() * (max - min + 1) + min);
@@ -353,6 +354,7 @@
353
354
 
354
355
  exports.asterisk = asterisk;
355
356
  exports.autoCatch = autoCatch;
357
+ exports.caf = caf;
356
358
  exports.canvasToImage = canvasToImage;
357
359
  exports.cloneDeepEasier = cloneDeepEasier;
358
360
  exports.compressImage = compressImage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deot/helper-utils",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",