Comparing version 3.0.2 to 4.0.0
{ | ||
"name": "utilsac", | ||
"version": "3.0.2", | ||
"version": "4.0.0", | ||
"description": "tools mostly", | ||
@@ -5,0 +5,0 @@ "main": "files.js", |
@@ -0,3 +1,12 @@ | ||
export { | ||
fillArrayWithFunctionResult, | ||
chainPromises, | ||
doNTimes, | ||
chainPromiseNTimes, | ||
timeCallback, | ||
timePromise | ||
}; | ||
export const fillArrayWithFunctionResult = function (aFunction, times) { | ||
const fillArrayWithFunctionResult = function (aFunction, times) { | ||
// [].fill is for static values only | ||
const returnArray = []; | ||
@@ -11,3 +20,3 @@ let i; | ||
export const doNTimes = function (task, times) { | ||
const doNTimes = function (task, times) { | ||
let i; | ||
@@ -19,3 +28,3 @@ for (i = 0; i < times; i += 1) { | ||
export const chainPromises = function (promiseCreators) { | ||
const chainPromises = function (promiseCreators) { | ||
// different than Promise.all | ||
@@ -44,3 +53,3 @@ // only executes promiseCreator one after the previous has resolved | ||
export const chainPromiseNTimes = function (promiseCreator, times) { | ||
const chainPromiseNTimes = function (promiseCreator, times) { | ||
// different than Promise.all | ||
@@ -72,3 +81,3 @@ // only executes promiseCreator one after the previous has resolved | ||
export const timeCallback = function (callback) { | ||
const timeCallback = function (callback) { | ||
// executes callback and returns time elapsed in ms | ||
@@ -81,3 +90,3 @@ const startTime = performance.now(); | ||
export const timePromise = function (promiseCreator) { | ||
const timePromise = function (promiseCreator) { | ||
// returns a Promise that resolves with | ||
@@ -84,0 +93,0 @@ // the time elapsed for the promise to resolve and its value |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
5653
6
156
1
25