Skip to content

Commit fa98061

Browse files
Merge pull request #8 from angular-package/3.3.x
3.3.0
2 parents 5fe8440 + d32f86e commit fa98061

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+859
-143
lines changed

README.md

Lines changed: 298 additions & 43 deletions
Large diffs are not rendered by default.

packages/type/README.md

Lines changed: 298 additions & 43 deletions
Large diffs are not rendered by default.

packages/type/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/type/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular-package/type",
3-
"version": "3.2.4",
3+
"version": "3.3.0",
44
"description": "Common types, type guards and type checkers.",
55
"author": "Angular Package <[email protected]> (https://wvvw.dev)",
66
"homepage": "https://github.com/angular-package/type#readme",

packages/type/src/is/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export { isNumberObject } from './lib/is-number-object.func';
1414
export { isNumberType } from './lib/is-number-type.func';
1515
export { isObject } from './lib/is-object.func';
1616
export { isObjectKey } from './lib/is-object-key.func';
17+
export { isObjectKeyIn } from './lib/is-object-key-in.func';
1718
export { isPrimitive } from './lib/is-primitive.func';
1819
export { isString } from './lib/is-string.func';
1920
export { isStringObject } from './lib/is-string-object.func';

packages/type/src/is/interface/is.interface.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@ import { IsArray } from '../type/is-array.type';
22
import { IsBigInt } from '../type/is-big-int.type';
33
import { IsBoolean } from '../type/is-boolean.type';
44
import { IsBooleanObject } from '../type/is-boolean-object.type';
5+
import { IsBooleanType } from '../type/is-boolean-type.type';
56
import { IsDefined } from '../type/is-defined.type';
67
import { IsFunction } from '../type/is-function.type';
78
import { IsInstance } from '../type/is-instance.type';
89
import { IsKey } from '../type/is-key.type';
910
import { IsNot } from '../not/interface/is-not.interface';
1011
import { IsNull } from '../type/is-null.type';
1112
import { IsNumber } from '../type/is-number.type';
13+
import { IsNumberObject } from '../type/is-number-object.type';
14+
import { IsNumberType } from '../type/is-number-type.type';
1215
import { IsObject } from '../type/is-object.type';
1316
import { IsObjectKey } from '../type/is-object-key.type';
17+
import { IsObjectKeyIn } from '../type/is-object-key-in.type';
1418
import { IsPrimitive } from '../type/is-primitive.type';
1519
import { IsString } from '../type/is-string.type';
1620
import { IsStringObject } from '../type/is-string-object.type';
1721
import { IsStringType } from '../type/is-string-type.type';
1822
import { IsSymbol } from '../type/is-symbol.type';
1923
import { IsType } from '../type/is-type.type';
2024
import { IsUndefined } from '../type/is-undefined.type';
21-
import { IsBooleanType } from '../type/is-boolean-type.type';
22-
import { IsNumberObject } from '../type/is-number-object.type';
23-
import { IsNumberType } from '../type/is-number-type.type';
24-
2525
export interface Is {
2626
array: IsArray;
2727
bigInt: IsBigInt;
@@ -40,6 +40,7 @@ export interface Is {
4040
numberType: IsNumberType;
4141
object: IsObject;
4242
objectKey: IsObjectKey;
43+
objectKeyIn: IsObjectKeyIn;
4344
primitive: IsPrimitive;
4445
string: IsString;
4546
stringObject: IsStringObject;

packages/type/src/is/lib/is-array.func.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ export const isArray: IsArray = <Type>(value: any, callback: ResultCallback = re
1616
typeOf(value) === 'array' &&
1717
Array.isArray(value) === true &&
1818
value instanceof Array === true &&
19-
typeof value === 'object'
19+
typeof value === 'object',
20+
value
2021
);

packages/type/src/is/lib/is-big-int.func.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ import { ResultCallback } from '../../type/result-callback.type';
1212
* @returns A `boolean` indicating whether or not the `value` is a `bigint`.
1313
*/
1414
export const isBigInt: IsBigInt = (value: any, callback: ResultCallback = resultCallback): value is bigint =>
15-
callback(typeOf(value) === 'bigint' && typeof value === 'bigint');
15+
callback(typeOf(value) === 'bigint' && typeof value === 'bigint', value);

packages/type/src/is/lib/is-boolean-object.func.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ import { ResultCallback } from '../../type/result-callback.type';
1212
* @returns A `boolean` indicating whether or not the `value` is a `Boolean` instance.
1313
*/
1414
export const isBooleanObject: IsBooleanObject = (value: any, callback: ResultCallback = resultCallback): value is boolean =>
15-
callback(typeof value === 'object' && value instanceof Boolean === true && value instanceof Object === true);
15+
callback(typeof value === 'object' && value instanceof Boolean === true && value instanceof Object === true, value);

packages/type/src/is/lib/is-boolean-type.func.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ export const isBooleanType: IsBooleanType = (value: any, callback: ResultCallbac
1616
value instanceof Boolean === false &&
1717
value instanceof Object === false &&
1818
typeof value === 'boolean' &&
19-
(value === true || value === false)
19+
(value === true || value === false),
20+
value
2021
);

0 commit comments

Comments
 (0)