You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9b1802f
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,6 +160,7 @@ The following functions check whether a given argument satisfies a certain const
160
160
***`ValueIsJSONString (Value:unknown):boolean`**<br>returns `true` if the given `Value` is a string which can be parsed with `JSON.parse` - or `false` otherwise
161
161
***`ValueIsBase64 (Value:unknown):boolean`**<br>returns `true` if the given `Value` is a non-empty, correctly padded Base64-encoded string (using the standard alphabet) - or an empty string - and `false` otherwise
162
162
***`ValueIsHexString (Value:unknown):boolean`**<br>returns `true` if the given `Value` is a non-empty string consisting of hexadecimal digits only - or `false` otherwise
163
+
***`ValueIsIdentifier (Value:unknown):boolean`**<br>returns `true` if the given `Value` is a string containing a syntactically valid JavaScript identifier (checked against the full Unicode grammar, i.e., `ID_Start` followed by `ID_Continue` characters, incl. `$`, `_`, ZWNJ and ZWJ - reserved words are *not* rejected) - or `false` otherwise
163
164
164
165
### Argument Validation Functions ###
165
166
@@ -213,7 +214,7 @@ For the sake of clarity, however, only the first "flavour" (namely `allowXXX`) i
213
214
***`allowPhoneNumber (Description:string, Argument:any):string|null|undefined`**<br>checks if the given `Argument` (if it exists) is a string containing a syntactically plausible phone number in a common national or international notation (see `ValueIsPhoneNumber`). If this is the case (or `Argument` is missing), the function returns the primitive value of the given `Argument`, otherwise an error is thrown whose message contains the given `Description`
214
215
***`allowE164PhoneNumber (Description:string, Argument:any):string|null|undefined`**<br>checks if the given `Argument` (if it exists) is a string containing a phone number in the canonical E.164 format (see `ValueIsE164PhoneNumber`). If this is the case (or `Argument` is missing), the function returns the primitive value of the given `Argument`, otherwise an error is thrown whose message contains the given `Description`<br> <br>
215
216
***`allowBigInt`**, **`allowSymbol`**, **`allowMap`**, **`allowSet`**, **`allowTypedArray`**, **`allowArrayBuffer`**<br>validate the given `Argument` using `ValueIsBigInt`, `ValueIsSymbol`, `ValueIsMap`, `ValueIsSet`, `ValueIsTypedArray` or `ValueIsArrayBuffer`, resp., and behave like any other `allowXXX` function described above (incl. their `allowedXXX`, `expectXXX` and `expectedXXX` flavours)
216
-
***`allowUUID`**, **`allowISODate`**, **`allowISOTimestamp`**, **`allowIPv4Address`**, **`allowIPv6Address`**, **`allowHostName`**, **`allowPortNumber`**, **`allowJSONString`**, **`allowBase64`**, **`allowHexString`**<br>validate the given `Argument` using the corresponding `ValueIsXXX` classifier and behave like any other `allowXXX` function described above (incl. their `allowedXXX`, `expectXXX` and `expectedXXX` flavours)
217
+
***`allowUUID`**, **`allowISODate`**, **`allowISOTimestamp`**, **`allowIPv4Address`**, **`allowIPv6Address`**, **`allowHostName`**, **`allowPortNumber`**, **`allowJSONString`**, **`allowBase64`**, **`allowHexString`**, **`allowIdentifier`**<br>validate the given `Argument` using the corresponding `ValueIsXXX` classifier and behave like any other `allowXXX` function described above (incl. their `allowedXXX`, `expectXXX` and `expectedXXX` flavours)
0 commit comments