feat: migrate to esm

This commit is contained in:
2023-03-16 01:58:13 +01:00
parent fd740b3091
commit 4df19e8c20
512 changed files with 3016 additions and 2222 deletions

View File

@@ -18,9 +18,9 @@
*/
export function mapValues<T extends object, U>(
object: T,
transform: (value: T[keyof T], key: keyof T) => U,
): {[key in keyof T]: U} {
const result = {} as {[key in keyof T]: U};
transform: (value: T[keyof T], key: keyof T) => U
): { [key in keyof T]: U } {
const result = {} as { [key in keyof T]: U };
for (const key in object) {
if (object.hasOwnProperty(key)) {