refactor: rename to maxun-core from mx-interpreter

This commit is contained in:
karishmas6
2024-07-31 20:40:14 +05:30
parent 30bfe50906
commit 30edc9a6ac
9 changed files with 1063 additions and 0 deletions

13
maxun-core/utils/utils.ts Normal file
View File

@@ -0,0 +1,13 @@
/**
* ESLint rule in case there is only one util function
* (it still does not represent the "utils" file)
*/
/* eslint-disable import/prefer-default-export */
/**
* Converts an array of scalars to an object with **items** of the array **for keys**.
*/
export function arrayToObject(array : any[]) {
return array.reduce((p, x) => ({ ...p, [x]: [] }), {});
}