diff --git a/README.md b/README.md index 0662ba9..d29d9f5 100644 --- a/README.md +++ b/README.md @@ -26,18 +26,19 @@ Return value: 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. Syntax: -> `new Type(typeName, isPrimitive)` +> `new Type(typeName)` +> `new Type(typeName, objectType)` Parameters: - ***typeName*** - (string) -- ***objectType*** - (string) Optional. The object name used by `Object.prototype.toString()`. Pass this argument for object types only. +- ***objectType*** - (string) The object name used by `Object.prototype.toString()`. Include this for object types. Do not include this for primitive types. | Property | Type | Description | | --- | --- | --- | -| .**type** | string | The type name. This is also the instance's primitive value. | -| .**objectType** | string | The object name used by `Object.prototype.toString()`.. | -| .**primitive** | string | If the `objectType` argument was falsy when constructed, this property was set to the type name. Otherwise, it's undefined. | -| .**object** | string | If the `objectType` argument was truthy when constructed, this property was set to the type name. Otherwise, it's undefined. | +| .**type** | string | The type name (`typeName`). This is also the instance's primitive value. | +| .**objectType** | string | The object name used by `Object.prototype.toString()`. | +| .**primitive** | string | For primitive types, this property is set to `typeName`. Otherwise, it's undefined. | +| .**object** | string | For object types, this property is set to `typeName`. Otherwise, it's undefined. | ### Example