array-asyncify
Advanced tools
Comparing version 0.0.5 to 0.0.6
16
index.js
@@ -42,3 +42,10 @@ const util = require("util") | ||
} | ||
asyncArr.every = async function every(callback, thisArg) { | ||
for (let i = 0; i < array.length; i++) { | ||
if (!await callback.call(thisArg, array[i], i, array)) { | ||
return false | ||
} | ||
} | ||
return true | ||
} | ||
return asyncArr | ||
@@ -84,2 +91,9 @@ } | ||
} | ||
every(predict) { | ||
this.actions_.push({ | ||
method: "every", | ||
params: [predict] | ||
}) | ||
return this | ||
} | ||
async apply() { | ||
@@ -86,0 +100,0 @@ let array = this.array_; |
{ | ||
"name": "array-asyncify", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Async array functions", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -22,3 +22,3 @@ ## Issue | ||
const { asyncify } = require("array-asyncify") | ||
let delay = (t) => new Promise(res => setTimeout(res), t) | ||
let delay = (t) => new Promise(res => setTimeout(res,t)) | ||
console.log("Example:"); | ||
@@ -25,0 +25,0 @@ (async () => { |
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
5593
177