diff --git a/lib/helpers/functions.helpers.test.ts b/lib/helpers/functions.helpers.test.ts index 32ba457..75e0ec0 100644 --- a/lib/helpers/functions.helpers.test.ts +++ b/lib/helpers/functions.helpers.test.ts @@ -1,6 +1,5 @@ import { head, - tail, isString, isArray, isObject, @@ -40,13 +39,6 @@ test('head(), should return the first element in an array', () => { expect(head(randArr)).toBe(randVal) }) -test('tail(), should return the last element in an array', () => { - const randArr = Array(getRandomInt(100)) - const randVal = getRandomInt(100) - randArr[randArr.length - 1] = randVal - expect(tail(randArr)).toBe(randVal) -}) - describe('isString(), should be true only for strings', () => { test.each(objectTypesTests)('Testing %s', (type, value) => { expect(type !== 'string' || (type === 'string' && isString(value))).toBe( diff --git a/lib/helpers/functions.ts b/lib/helpers/functions.ts index d34adef..0e25651 100644 --- a/lib/helpers/functions.ts +++ b/lib/helpers/functions.ts @@ -82,8 +82,6 @@ export interface FetchDataOptions { export const head = ([first]: T[]): T => first -export const tail = (arr: T[]): T => arr[arr.length - 1] - export const isString = (str: unknown): boolean => typeof str === 'string' || str instanceof String @@ -154,12 +152,6 @@ export const sortBy = ( export const cleanLonelyInt = (val: string): boolean => !(val && /^\d+$/.test(val)) -export const debugPrint = (...args: unknown[]): void => { - if (process.env.NODE_ENV !== 'production') { - console.log(...args) - } -} - export const errorPrint = (...args: unknown[]): void => { console.error(...args) } diff --git a/package.json b/package.json index 6793096..7c3953e 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "linkifyjs": "^4.3.2" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + "react": "^19.0.0" }, "devDependencies": { "@eslint-react/eslint-plugin": "^4.2.3",