Skip to content

Commit 951c409

Browse files
Merge pull request #23 from angular-package/4.1.x
4.1.2
2 parents b7ce020 + 51d1309 commit 951c409

File tree

89 files changed

+901
-920
lines changed

Some content is hidden

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

89 files changed

+901
-920
lines changed

README.md

Lines changed: 481 additions & 476 deletions
Large diffs are not rendered by default.

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.

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": "4.1.1",
3+
"version": "4.1.2",
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",

src/are/lib/are-string.func.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { check } from './check-args.func';
22
/**
3-
* Checks if any of all the values are a `string`.
4-
* @param value Any values to check.
5-
* @returns A `boolean` indicating whether or not all the values are an `Array`.
3+
* Checks if all the values are a `string`.
4+
* @param value A rest parameter of any type to check.
5+
* @returns A `boolean` indicating whether or not all the values are `string`.
66
*/
77
export const areString = (...value: any): boolean => check('string', ...value);

src/guard/test/guard-array.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import {
1414
ARRAY_SYMBOL_NUMBER,
1515
ARRAY_SYMBOL_STRING,
1616
ARRAY_UNDEFINED
17-
} from '../../testing/variables/strict/array.const';
18-
import { Class } from '../../testing/variables/strict/class.const';
17+
} from '../../testing/src/strict/array.const';
18+
import { Class } from '../../testing/src/strict/class.const';
1919
// Type.
2020
import { Func } from '../../type/func.type';
2121
// Interface.

src/guard/test/guard-bigint.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Function.
22
import { guardBigInt } from '../lib/guard-big-int.func';
33
// Constant.
4-
import { BIGINT, BIGINT_EXPECTATION, BIGINT_INSTANCE } from '../../testing/variables/strict/big-int.const';
5-
import { TRUE } from '../../testing/variables/strict/boolean.const';
4+
import { BIGINT, BIGINT_EXPECTATION, BIGINT_INSTANCE } from '../../testing/src/strict/big-int.const';
5+
import { TRUE } from '../../testing/src/strict/boolean.const';
66

77
describe(guardBigInt.name, () => {
88
// Defined.

src/guard/test/guard-boolean.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Function.
22
import { guardBoolean } from '../lib/guard-boolean.func';
33
// Constant.
4-
import { FALSE_EXPECTATION, TRUE, TRUE_EXPECTATION, FALSE, TRUE_INSTANCE, FALSE_INSTANCE } from '../../testing/variables/strict/boolean.const';
4+
import { FALSE_EXPECTATION, TRUE, TRUE_EXPECTATION, FALSE, TRUE_INSTANCE, FALSE_INSTANCE } from '../../testing/src/strict/boolean.const';
55

66
describe(guardBoolean.name, () => {
77
// Defined.

src/guard/test/guard-class.spec.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@ import { guard } from '../lib/guard.object';
33
// Function.
44
import { guardClass } from '../lib/guard-class.func';
55
// Constant.
6-
import { Persons } from '../../testing/variables/strict/class.const';
7-
import { TRUE } from '../../testing/variables/strict/boolean.const';
6+
import { FALSE } from '../../testing/src/boolean.const';
7+
import { FUNCTION } from '../../testing/src/function.const';
8+
import { Persons } from '../../testing/src/strict/class.const';
9+
import { TRUE } from '../../testing/src/strict/boolean.const';
810

911
describe(guardClass.name, () => {
10-
// TRUE
1112
it('is DEFINED', () => expect(guardClass).toBeDefined());
1213
it(`Class`, () => {
1314
expect(guardClass(Persons)).toBe(TRUE);
1415
expect(guard.is.class(Persons)).toBe(TRUE);
1516
});
17+
it(`FUNCTION`, () => {
18+
expect(guardClass(FUNCTION)).toBe(FALSE);
19+
expect(guard.is.class(FUNCTION)).toBe(FALSE);
20+
});
1621
});

src/guard/test/guard-defined.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Function.
22
import { guardDefined } from '../lib/guard-defined.func';
33
// Constant.
4-
import { STRING } from '../../testing/variables/strict/string.const';
5-
import { TRUE } from '../../testing/variables/strict/boolean.const';
4+
import { STRING } from '../../testing/src/strict/string.const';
5+
import { TRUE } from '../../testing/src/strict/boolean.const';
66

77
describe(guardDefined.name, () => {
88
// Defined.

src/guard/test/guard-function.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Function.
22
import { guardFunction } from '../lib/guard-function.func';
33
// Constant.
4-
import { FUNCTION } from '../../testing/variables/function.const';
4+
import { FUNCTION } from '../../testing/src/function.const';
55

66
describe(guardFunction.name, () => {
77
// TRUE

0 commit comments

Comments
 (0)