Skip to content

Commit 21369f0

Browse files
Merge pull request #31 from angular-package/4.2.x
4.2.0
2 parents 58cd294 + 0c0bfba commit 21369f0

File tree

3 files changed

+28
-15
lines changed

3 files changed

+28
-15
lines changed

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,15 @@ Checks if **any** value is
159159
* an `object` with the [`Key`][key] by using the [`in`][js-in-operator] operator with [`isObjectKeyIn()`](#isobjectkeyin).
160160
* an `object` with some of its own specified [`Key`][key] with [`isObjectKeys()`](#isobjectkeys).
161161
* primitive of a [`Primitive`](#primitive) type with [`isPrimitive()`](#isprimitive).
162-
* a regular expression of a `RegExp` type with [`isRegExp()`](#isregexp).
162+
* a regular expression of a [`RegExp`][js-regexp] type with [`isRegExp()`](#isregexp).
163163
* a `string` with [`isString()`](#isstring).
164-
* a `string` with the specified length with [`isStringLength`](#isstringlength).
164+
* a `string` with the specified length with [`isStringLength()`](#isstringlength).
165165
* an `object` type and instance of [`String`][js-string] and [`Object`][js-object] with [`isStringObject()`](#isstringobject).
166166
* a `string` type and **not** instance of [`String`][js-string] and [`Object`][js-object] with [`isStringType()`](#isstringtype).
167167
* a `symbol` with [`isSymbol()`](#issymbol).
168168
* a `true` value with [`isTrue()`](#istrue).
169169
* a generic type instance, `function`, `object` or primitive type with [`isType()`](#istype).
170170
* `undefined` with [`isUndefined()`](#isundefined).
171-
* a generic type value is
172171
* **not**
173172
* a `boolean` with [`isNotBoolean()`](#isnotboolean)
174173
* a `function` with [`isNotFunction()`](#isnotfunction)
@@ -840,11 +839,11 @@ const isFalse: IsFalse = (
840839

841840
**Returns:**
842841

843-
| Returns | Type | Description |
844-
| :--------------- | :-------: | :--------------------------------------------------------------------------------------------------- |
845-
| `value is false` | `boolean` | The **return type** is a `boolean` as the result of its statement, indicating the `value` is `false` |
842+
| Returns | Type | Description |
843+
| :--------------- | :-------: | :----------------------------------------------------------------------------------------------------------- |
844+
| `value is false` | `boolean` | The **return type** is a `boolean` as the result of its statement, indicating the `value` is equal to`false` |
846845

847-
The **return value** is a `boolean` indicating whether or not the `value` is a date.
846+
The **return value** is a `boolean` indicating whether or not the `value` is a `boolean` equal to `false`.
848847

849848
**Usage:**
850849

@@ -859,7 +858,7 @@ isFalse(true); // false; value is false
859858

860859
### `isFunction()`
861860

862-
Use `isFunction()` or `is.function()` to check if **any** `value` is a `function` type, an instance of [`Function`][js-function] and [`Object`][js-object]. It also **denies** with the regexp that function is a [`class`][ts-classes].
861+
Use `isFunction()` or `is.function()` to check if **any** `value` is a `function` type, an instance of [`Function`][js-function] and [`Object`][js-object]. It also **denies** with the [`RegExp`][js-regexp] that function is a [`class`][ts-classes].
863862

864863
```typescript
865864
const isFunction: IsFunction = (
@@ -1106,7 +1105,7 @@ isNull(NUMBER); // false
11061105

11071106
![new][new]
11081107

1109-
Use `isNumberBetween()` or `is.numberBetween()` to check if **any** `value` is a `boolean` type **not** an instance of [`Boolean`][js-boolean] and [`Object`][js-object], or is an `object` type and instance of [`Boolean`][js-boolean] and [`Object`][js-object], and equal to `false`.
1108+
Use `isNumberBetween()` or `is.numberBetween()` to check if **any** `value` is a `number` type, not instance of [`Object`][js-object] and [`Number`][js-number] or `object` type and instance of [`Number`][js-number] and [`Object`][js-object], in the specified range.
11101109

11111110
```typescript
11121111
const isNumberBetween = <Min extends number, Max extends number>(
@@ -1884,7 +1883,7 @@ The **return value** is a `boolean` indicating whether or not the `value` is a `
18841883

18851884
![new][new]
18861885

1887-
Use `isRegExp()` or `is.regexp()` to check if **any** `value` is a `regexp` type, an instance of `Object` and `RegExp`.
1886+
Use `isRegExp()` or `is.regexp()` to check if **any** `value` is a regular expression of a [`RegExp`][js-regexp] type, an instance of [`Object`][js-object] and [`RegExp`][js-regexp].
18881887

18891888
```typescript
18901889
const isRegExp: IsRegExp = (
@@ -1910,7 +1909,7 @@ const isRegExp: IsRegExp = (
19101909

19111910
| Returns | Type | Description |
19121911
| :---------------- | :-------: | :---------------------------------------------------------------- |
1913-
| `value is RegExp` | `boolean` | The **return type** is a `boolean` as the result of its statement, indicating the `value` is a regular expression of a `RegExp` type |
1912+
| `value is RegExp` | `boolean` | The **return type** is a `boolean` as the result of its statement, indicating the `value` is a regular expression of a [`RegExp`][js-regexp] type |
19141913

19151914
The **return value** is a `boolean` indicating whether or not the `value` is a regular expression.
19161915

@@ -2162,9 +2161,9 @@ const isTrue: IsTrue = (
21622161

21632162
**Returns:**
21642163

2165-
| Returns | Type | Description |
2166-
| :--------------- | :-------: | :--------------------------------------------------------------------------------------------------- |
2167-
| `value is false` | `boolean` | The **return type** is a `boolean` as the result of its statement, indicating the `value` is `true` |
2164+
| Returns | Type | Description |
2165+
| :-------------- | :-------: | :--------------------------------------------------------------------------------------------------- |
2166+
| `value is true` | `boolean` | The **return type** is a `boolean` as the result of its statement, indicating the `value` is `true` |
21682167

21692168
The **return value** is a `boolean` indicating whether or not the `value` is a `boolean` equal to `true`.
21702169

@@ -4190,6 +4189,8 @@ MIT © angular-package ([license][property-badge-license])
41904189

41914190
[primitive]: https://developer.mozilla.org/en-US/docs/Glossary/Primitive
41924191

4192+
[js-regexp]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp
4193+
41934194
[js-string]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
41944195
[stringconstructor]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/String
41954196

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,31 @@
1616
"bigint",
1717
"boolean",
1818
"check",
19+
"class",
20+
"date",
1921
"defined",
2022
"determine",
23+
"false",
2124
"function",
2225
"guard",
2326
"instance",
2427
"key",
2528
"propertyKey",
29+
"null",
2630
"number",
31+
"number between",
32+
"number object",
33+
"number type",
2734
"object",
2835
"primitive",
36+
"RegExp",
2937
"string",
38+
"string length",
39+
"string object",
40+
"string type",
3041
"symbol",
3142
"undefined",
43+
"true",
3244
"type",
3345
"types",
3446
"type guards",

src/is/lib/is-regexp.func.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { typeOf } from '../../lib/type-of.func';
55
import { IsRegExp } from '../type/is-regexp.type';
66
import { ResultCallback } from '../../type/result-callback.type';
77
/**
8-
* Checks if any `value` is a `regexp` type, an instance of `Object` and `RegExp`.
8+
* Checks if any `value` is a regular expression of a `RegExp` type, an instance of `Object` and `RegExp`.
99
* @param value Any `value` to check.
1010
* @param callback An optional `ResultCallback` function to handle the result before returns.
1111
* @returns A `boolean` indicating whether or not the `value` is a regular expression.

0 commit comments

Comments
 (0)