Skip to content

Commit

Permalink
🐛 Deprecate core functions
Browse files Browse the repository at this point in the history
  • Loading branch information
TomokiMiyauci committed Jun 28, 2021
1 parent 2620e0c commit da10771
Show file tree
Hide file tree
Showing 18 changed files with 22 additions and 37 deletions.
2 changes: 1 addition & 1 deletion src/endsWith.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type EndsWith<T extends string | undefined = undefined> = T extends undefined
*
* @see Related to {@link startsWith}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
const endsWith = <T extends string, U extends string | undefined = undefined>(
val: T,
Expand Down
2 changes: 1 addition & 1 deletion src/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { entries as _entries } from './constants/index.ts'
*
* @see Related to {@link keys} {@link values}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
const entries: {
<T>(
Expand Down
2 changes: 1 addition & 1 deletion src/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { keys as _keys } from './constants/index.ts'
*
* @see Related to {@link values} {@link entries}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
const keys = <T extends PropertyKey>(val: Record<T, unknown>): string[] =>
_keys(val)
Expand Down
2 changes: 1 addition & 1 deletion src/length.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* length({length: 5, text: 'hello'}) // 5
* ```
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
const length = <T extends { length: number }>(val: T): T['length'] => val.length

Expand Down
2 changes: 1 addition & 1 deletion src/lowerCase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @see Related to {@link upperCase}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
const lowerCase = <T extends string>(val: T): Lowercase<T> =>
val.toLowerCase() as Lowercase<T>
Expand Down
2 changes: 1 addition & 1 deletion src/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { isArray } from './isArray.ts'
*
* @category `Array` `Object`
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
const map: {
<T extends readonly unknown[], U>(
Expand Down
4 changes: 2 additions & 2 deletions src/replace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @see Related to {@link ReplaceAll}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
type Replace<
T extends string,
Expand Down Expand Up @@ -46,7 +46,7 @@ type Replace<
*
* @see Related to {@link replaceAll}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
*/
const replace = <From extends string, To extends string, T extends string>(
from: From,
Expand Down
4 changes: 2 additions & 2 deletions src/replaceAll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @see Related to {@link Replace}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
type ReplaceAll<
T extends string,
Expand Down Expand Up @@ -46,7 +46,7 @@ type ReplaceAll<
*
* @see Related to {@link replace}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
*/
const replaceAll = <From extends string, To extends string, T extends string>(
from: From,
Expand Down
2 changes: 1 addition & 1 deletion src/reverse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { isString } from './isString.ts'
*
* @category `Array`
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
*/
const reverse: {
(val: string): string
Expand Down
2 changes: 1 addition & 1 deletion src/slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
* @category `String` `Array`
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
const slice = <T extends readonly unknown[] | string>(
from: number,
Expand Down
2 changes: 1 addition & 1 deletion src/startsWith.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type StartsWith<T extends string | undefined = undefined> = T extends undefined
*
* @see Related to {@link endsWith}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
const startsWith = <T extends string, U extends string | undefined = undefined>(
val: T,
Expand Down
2 changes: 1 addition & 1 deletion src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const _test = (regExp: RegExp, val: string): boolean => regExp.test(val)
*
* @category `String`
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
const test = curry(_test)

Expand Down
15 changes: 0 additions & 15 deletions src/toString.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/trim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { TrimRight } from './trimRight.ts'
*
* @see Related to {@link TrimLeft} {@link TrimRight}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
*/
type Trim<T extends string> = TrimLeft<TrimRight<T>>

Expand All @@ -42,7 +42,7 @@ type Trim<T extends string> = TrimLeft<TrimRight<T>>
*
* @see Related to {@link trimLeft} {@link trimRight}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
const trim = <T extends string>(val: T): Trim<T> => val.trim() as Trim<T>

Expand Down
4 changes: 2 additions & 2 deletions src/trimLeft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Space } from './types/index.ts'
*
* @see Related to {@link TrimRight} {@link Trim}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
type TrimLeft<T extends string> = T extends `${Space}${infer R}`
? TrimLeft<R>
Expand Down Expand Up @@ -49,7 +49,7 @@ type TrimLeft<T extends string> = T extends `${Space}${infer R}`
*
* @see Related to {@link trimRight} {@link trim}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
const trimLeft = <T extends string>(val: T): TrimLeft<T> =>
val.trimLeft() as TrimLeft<T>
Expand Down
4 changes: 2 additions & 2 deletions src/trimRight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Space } from './types/index.ts'
*
* @see Related to {@link TrimLeft} {@link Trim}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
type TrimRight<T extends string> = T extends `${infer R}${Space}`
? TrimRight<R>
Expand Down Expand Up @@ -50,7 +50,7 @@ type TrimRight<T extends string> = T extends `${infer R}${Space}`
*
* @see Related to {@link trimLeft} {@link trim}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
const trimRight = <T extends string>(val: T): TrimRight<T> =>
val.trimRight() as TrimRight<T>
Expand Down
2 changes: 1 addition & 1 deletion src/upperCase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @see Related to {@link lowerCase}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
const upperCase = <T extends string>(val: T): Uppercase<T> =>
val.toUpperCase() as Uppercase<T>
Expand Down
2 changes: 1 addition & 1 deletion src/values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { values as _values } from './constants/index.ts'
*
* @see Related to {@link keys} {@link entries}
*
* @public
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/core-fn}.
*/
const values = <T extends unknown>(
val: Record<PropertyKey, T> | ArrayLike<T>
Expand Down

0 comments on commit da10771

Please sign in to comment.