8000 :bug: Is functions to be deprecated · TomokiMiyauci/fonction@2620e0c · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 2620e0c

Browse files
committed
🐛 Is functions to be deprecated
1 parent 51a3580 commit 2620e0c

16 files changed

+32
-25
lines changed

src/isArray.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
* isArray({}) // false
1313
* ```
1414
*
15-
* @public
15+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
16+
1617
*/
1718
const isArray = (val: unknown): val is any[] => Array.isArray(val)
1819

src/isBigint.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type IsBigint<T extends unknown> = T extends bigint ? true : false
1818
* isBigint(1000) // false
1919
* ```
2020
*
21-
* @public
21+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
2222
*/
2323
const isBigint = (val: unknown): val is bigint => typeof val === 'bigint'
2424

src/isBoolean.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @typeParam T - Any value
66
*
7-
* @public
7+
* @deprecated Removed
88
*/
99
type IsBoolean<T extends unknown> = T extends boolean ? true : false
1010

@@ -20,7 +20,7 @@ type IsBoolean<T extends unknown> = T extends boolean ? true : false
2020
* isBoolean('hello') // false
2121
* ```
2222
*
23-
* @public
23+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
2424
*/
2525
const isBoolean = (val: unknown): val is boolean => typeof val === 'boolean'
2626

src/isEmpty.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { Empty } from './types/index.ts'
3030
* isEmpty(1000) // false
3131
* ```
3232
*
33-
* @public
33+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
3434
*/
3535
const isEmpty = (val: unknown): val is Empty => {
3636
if (or(isString(val), () => isArray(val))) return isLength0(val)

src/isFunction.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { AnyFn } from './types/index.ts'
66
*
77
* @typeParam T - Any value
88
*
9-
* @public
9+
* @deprecated Removed
1010
*/
1111
type IsFunction<T extends unknown> = T extends AnyFn ? true : false
1212

@@ -22,7 +22,7 @@ type IsFunction<T extends unknown> = T extends AnyFn ? true : false
2222
* isFunction('hello') // false
2323
* ```
2424
*
25-
* @public
25+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
2626
*/
2727
const isFunction = (val: unknown): val is AnyFn => typeof val === 'function'
2828

src/isJSONObject.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { constructorName } from './constructorName.ts'
1919
* isJSONObject(new Set()) // false
2020
* ```
2121
*
22-
* @public
22+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
2323
*/
2424
const isJSONObject = (val: unknown): val is Record<PropertyKey, unknown> =>
2525
constructorName(val) === JSON_OBJECT

src/isLength0.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ import { or } from './or.ts'
2121
*
2222
* @category `Array` `String`
2323
*
24-
* @public
24+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
25+
*
2526
*/
2627
const isLength0 = (val: unknown): val is 0 =>
2728
ifElse(

src/isNaN.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* isNaN(100) // false
1515
* ```
1616
*
17-
* @public
17+
* @deprecated Use built-in functions
1818
*
1919
*/
2020
const isNaN = (val: unknown): val is typeof NaN => Number.isNaN(val)

src/isNil.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { or } from './or.ts'
88
*
99
* @typeParam T - Any value
1010
*
11-
* @public
11+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
1212
*/
1313
type IsNil<T extends unknown> = IsUndefined<T> extends true
1414
? true
@@ -29,7 +29,7 @@ type IsNil<T extends unknown> = IsUndefined<T> extends true
2929
* isNil([]) // false
3030
* ```
3131
*
32-
* @public
32+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
3333
*
3434
*/
3535
const isNil = (val: unknown): val is null | undefined =>

src/isNull.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { NULL } from './constants/index.ts'
66
*
77
* @typeParam T - Any value
88
*
9-
* @public
9+
* @deprecated Removed
1010
*/
1111
type IsNull<T extends unknown> = T extends null ? true : false
1212

@@ -22,7 +22,8 @@ type IsNull<T extends unknown> = T extends null ? true : false
2222
* isNull(undefined) // false
2323
* ```
2424
*
25-
* @public
25+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
26+
*
2627
*/
2728
const isNull = (val: unknown): val is null => val === NULL
2829

src/isNumber.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @typeParam T - Any value
66
*
7-
* @public
7+
* @deprecated Removed
88
*/
99
type IsNumber<T extends unknown> = T extends number ? true : false
1010

@@ -20,7 +20,7 @@ type IsNumber<T extends unknown> = T extends number ? true : false
2020
* isNumber('hello') // false
2121
* ```
2222
*
23-
* @public
23+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
2424
*/
2525
const isNumber = (val: unknown): val is number => typeof val === 'number'
2626

src/isObject.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ import { N } from './N.ts'
3030
* isObject('hello') // false
3131
* ```
3232
*
33-
* @public
33+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
34+
*
3435
*/
3536
// eslint-disable-next-line @typescript-eslint/ban-types
3637
const isObject = (val: unknown): val is Record<string, unknown> =>

src/isPrimitive.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { Primitive } from './types/index.ts'
1212
*
1313
* @typeParam T - Any value
1414
*
15-
* @public
15+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
1616
*/
1717
type IsPrimitive<T extends unknown> = IsBigint<T> extends true
1818
? true
@@ -50,7 +50,8 @@ type IsPrimitive<T extends unknown> = IsBigint<T> extends true
5050
* isPrimitive([]) // false
5151
* ```
5252
*
53-
* @public
53+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
54+
*
5455
*/
5556
const isPrimitive = (val: unknown): val is Primitive =>
5657
[isNill, isBoolean, isNumber, isString, isBigint, isSymbol].some((is) =>

src/isString.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @typeParam T - Any value
66
*
7-
* @public
7+
* @deprecated Removed
88
*/
99
type IsString<T extends unknown> = T extends string ? true : false
1010

@@ -20,7 +20,8 @@ type IsString<T extends unknown> = T extends string ? true : false
2020
* isString(1000) // false
2121
* ```
2222
*
23-
* @public
23+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
24+
*
2425
*/
2526
const isString = (val: unknown): val is string => typeof val === 'string'
2627

src/isSymbol.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @typeParam T - Any value
66
*
7-
* @public
7+
* @deprecated Removed
88
*/
99
type IsSymbol<T extends unknown> = T extends symbol ? true : false
1010

@@ -20,7 +20,7 @@ type IsSymbol<T extends unknown> = T extends symbol ? true : false
2020
* isSymbol('hello') // false
2121
* ```
2222
*
23-
* @public
23+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
2424
*/
2525
const isSymbol = (val: unknown): val is symbol => typeof val === 'symbol'
2626

src/isUndefined.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @typeParam T - Any value
66
*
7-
* @public
7+
* @deprecated Removed
88
*/
99
type IsUndefined<T extends unknown> = T extends undefined ? true : false
1010

@@ -20,7 +20,8 @@ type IsUndefined<T extends unknown> = T extends undefined ? true : false
2020
* isUndefined('hello') // false
2121
* ```
2222
*
23-
* @public
23+
* @deprecated The module has moved to {@link https://github.com/TomokiMiyauci/is-valid}.
24+
*
2425
*/
2526
const isUndefined = (val: unknown): val is undefined =>
2627
typeof val === 'undefined'

0 commit comments

Comments
 (0)
0