Skip to content

Commit 0d1fc03

Browse files
authored
Merge pull request #3 from wizard04wsu/dev
Dev
2 parents ef1ef23 + a82de6c commit 0d1fc03

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,19 @@ Return value:
2626
The **Type** class extends the **String** class. In addition to storing a type name, its properties reveal whether the tested value was an object or a primitive.
2727

2828
Syntax:
29-
> `new Type(typeName, isPrimitive)`
29+
> `new Type(typeName)`
30+
> `new Type(typeName, objectType)`
3031
3132
Parameters:
3233
- ***typeName*** - (string)
33-
- ***objectType*** - (string) Optional. The object name used by `Object.prototype.toString()`. Pass this argument for object types only.
34+
- ***objectType*** - (string) The object name used by `Object.prototype.toString()`. Include this for object types. Do not include this for primitive types.
3435

3536
| Property | Type | Description |
3637
| --- | --- | --- |
37-
| .**type** | string | The type name. This is also the instance's primitive value. |
38-
| .**objectType** | string | The object name used by `Object.prototype.toString()`.. |
39-
| .**primitive** | string | If the `objectType` argument was falsy when constructed, this property was set to the type name. Otherwise, it's undefined. |
40-
| .**object** | string | If the `objectType` argument was truthy when constructed, this property was set to the type name. Otherwise, it's undefined. |
38+
| .**type** | string | The type name (`typeName`). This is also the instance's primitive value. |
39+
| .**objectType** | string | The object name used by `Object.prototype.toString()`. |
40+
| .**primitive** | string | For primitive types, this property is set to `typeName`. Otherwise, it's undefined. |
41+
| .**object** | string | For object types, this property is set to `typeName`. Otherwise, it's undefined. |
4142

4243
### Example
4344

0 commit comments

Comments
 (0)