angular-html-parser
Advanced tools
Comparing version
@@ -32,13 +32,2 @@ /** | ||
export { _global as global }; | ||
export declare function newArray<T = any>(size: number): T[]; | ||
export declare function newArray<T>(size: number, value: T): T[]; | ||
/** | ||
* Partitions a given array into 2 arrays, based on a boolean value returned by the condition | ||
* function. | ||
* | ||
* @param arr Input array that should be partitioned | ||
* @param conditionFn Condition function that is called for each item in a given array and returns a | ||
* boolean value. | ||
*/ | ||
export declare function partitionArray<T, F = T>(arr: (T | F)[], conditionFn: (value: T | F) => boolean): [T[], F[]]; | ||
export declare function getJitStandaloneDefaultForVersion(version: string): boolean; |
@@ -99,25 +99,2 @@ /** | ||
export { _global as global }; | ||
export function newArray(size, value) { | ||
const list = []; | ||
for (let i = 0; i < size; i++) { | ||
list.push(value); | ||
} | ||
return list; | ||
} | ||
/** | ||
* Partitions a given array into 2 arrays, based on a boolean value returned by the condition | ||
* function. | ||
* | ||
* @param arr Input array that should be partitioned | ||
* @param conditionFn Condition function that is called for each item in a given array and returns a | ||
* boolean value. | ||
*/ | ||
export function partitionArray(arr, conditionFn) { | ||
const truthy = []; | ||
const falsy = []; | ||
for (const item of arr) { | ||
(conditionFn(item) ? truthy : falsy).push(item); | ||
} | ||
return [truthy, falsy]; | ||
} | ||
const V1_TO_18 = /^([1-9]|1[0-8])\./; | ||
@@ -124,0 +101,0 @@ export function getJitStandaloneDefaultForVersion(version) { |
{ | ||
"name": "angular-html-parser", | ||
"version": "9.1.1", | ||
"version": "9.2.0", | ||
"description": "A HTML parser extracted from Angular with some modifications", | ||
@@ -32,3 +32,3 @@ "repository": "https://github.com/prettier/angular-html-parser/blob/HEAD/packages/angular-html-parser", | ||
"devDependencies": { | ||
"@types/node": "22.15.21", | ||
"@types/node": "22.15.23", | ||
"@vitest/coverage-v8": "3.1.4", | ||
@@ -58,3 +58,4 @@ "del-cli": "6.0.0", | ||
}, | ||
"packageManager": "yarn@4.7.0" | ||
"packageManager": "yarn@4.9.1", | ||
"sideEffects": false | ||
} |
316620
-0.38%8130
-0.42%