Replace remaining ramda references with shlinkio/data-manipulation

This commit is contained in:
Alejandro Celaya
2023-11-01 16:19:51 +01:00
parent 7ba78fd919
commit 8ad1e7e0d9
7 changed files with 18 additions and 38 deletions

View File

@@ -1,5 +1,5 @@
import { memoizeWith } from '@shlinkio/data-manipulation';
import { compare } from 'compare-versions';
import { memoizeWith } from 'ramda';
export type Empty = null | undefined | '' | never[];

View File

@@ -1,10 +1,6 @@
import { range } from 'ramda';
import type { SyntheticEvent } from 'react';
export const handleEventPreventingDefault = <T>(handler: () => T) => (e: SyntheticEvent) => {
e.preventDefault();
handler();
};
export const rangeOf = <T>(size: number, mappingFn: (value: number) => T, startAt = 1): T[] =>
range(startAt, size + 1).map(mappingFn);