@domql/utils
Advanced tools
Comparing version 2.5.89 to 2.5.91
18
array.js
@@ -103,1 +103,19 @@ 'use strict' | ||
} | ||
export const addItemAfterEveryElement = (array, item) => { | ||
// Create a new array to hold the result | ||
const result = [] | ||
// Loop through the input array | ||
for (let i = 0; i < array.length; i++) { | ||
// Add the current element to the result array | ||
result.push(array[i]) | ||
// If it's not the last element, add the item | ||
if (i < array.length - 1) { | ||
result.push(item) | ||
} | ||
} | ||
return result | ||
} |
@@ -21,2 +21,3 @@ "use strict"; | ||
__export(array_exports, { | ||
addItemAfterEveryElement: () => addItemAfterEveryElement, | ||
arrayContainsOtherArray: () => arrayContainsOtherArray, | ||
@@ -117,1 +118,11 @@ createNestedObject: () => createNestedObject, | ||
}; | ||
const addItemAfterEveryElement = (array, item) => { | ||
const result = []; | ||
for (let i = 0; i < array.length; i++) { | ||
result.push(array[i]); | ||
if (i < array.length - 1) { | ||
result.push(item); | ||
} | ||
} | ||
return result; | ||
}; |
{ | ||
"name": "@domql/utils", | ||
"version": "2.5.89", | ||
"version": "2.5.91", | ||
"license": "MIT", | ||
@@ -26,3 +26,3 @@ "type": "module", | ||
}, | ||
"gitHead": "107aed00dc54d9e9c23948f37c9c704f8ed53cef", | ||
"gitHead": "15a57f968b6c8832cb843c886e251a89ff17cc24", | ||
"devDependencies": { | ||
@@ -29,0 +29,0 @@ "@babel/core": "^7.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
72401
2253