Skip to content

Commit a7242a9

Browse files
committed
[REM] helpers: remove unused helpers
closes #7359 Task: 0 Signed-off-by: Adrien Minne (adrm) <adrm@odoo.com>
1 parent 6c86004 commit a7242a9

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

packages/o-spreadsheet-engine/src/functions/helpers.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,6 @@ export function toNumber(
9898
}
9999
}
100100

101-
/** Convert the data to a number, ignoring undefined values */
102-
export function toNumberIgnoreUndefined(
103-
data: FunctionResultObject | CellValue | undefined,
104-
locale: Locale
105-
): number | undefined {
106-
return data === undefined ? undefined : toNumber(data, locale);
107-
}
108-
109101
export function tryToNumber(
110102
value: string | number | boolean | null | undefined,
111103
locale: Locale
@@ -228,13 +220,6 @@ export function toBoolean(data: FunctionResultObject | CellValue | undefined): b
228220
}
229221
}
230222

231-
/** Convert the data to a boolean, ignoring undefined values */
232-
export function toBooleanIgnoreUndefined(
233-
data: FunctionResultObject | CellValue | undefined
234-
): boolean | undefined {
235-
return data === undefined ? undefined : toBoolean(data);
236-
}
237-
238223
function strictToBoolean(data: FunctionResultObject | CellValue | undefined): boolean {
239224
const value = toValue(data);
240225
if (value === "") {

packages/o-spreadsheet-engine/src/xlsx/helpers/misc.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,6 @@ export function arrayToObject<T>(array: T[], indexOffset = 0): { [key: number]:
4242
return obj;
4343
}
4444

45-
/**
46-
* Convert an object whose keys are numbers to an array were the element index was their key in the object.
47-
*
48-
* eg. : {0:"a", 2:"b"} => ["a", undefined, "b"]
49-
*/
50-
export function objectToArray<T>(obj: { [key: number]: T }): T[] {
51-
const arr: T[] = [];
52-
for (const key of Object.keys(obj).map(Number)) {
53-
arr[key] = obj[key];
54-
}
55-
return arr;
56-
}
57-
5845
/**
5946
* In xlsx we can have string with unicode characters with the format _x00fa_.
6047
* Replace with characters understandable by JS

0 commit comments

Comments
 (0)