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
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,6 +177,7 @@ For the sake of clarity, however, only the first "flavour" (namely `allowXXX`) i
177
177
178
178
### Utility Functions ###
179
179
180
+
***`throwableError (Message:string):Error`**<br>this function has been provided in order to simplify the construction of "named" `Error` instances: if the given `Message` starts with a JavaScript identifier followed by a colon, identifier and colon are stripped apart and the identifier is used as the `name` property of a newly constructed `Error` instance for the remaining part of `Message`. Otherwise, this function is equivalent to `new Error(Message)`
180
181
***`throwError (Message:string):never`**<br>this function has been provided in order to simplify throwing "named" `Error` instances: if the given `Message` starts with a JavaScript identifier followed by a colon, identifier and colon are stripped apart and the identifier is used as the `name` property of a newly constructed `Error` instance for the remaining part of `Message`. Otherwise, this function is equivalent to `throw new Error(Message)` <br> <br>
181
182
***`ObjectMergedWith (TargetObject:object, ...otherObjectList:object[]):object`**<br>`Object.assign` can not be used to copy properties with getters and setters from one object into another - this is what `ObjectMergedWith` is good for: it copies the descriptors of all *own* properties from any object found in `otherObjectList` into the given `TargetObject` and also returns that object as its function result. Any descriptor already existing for a given property in `TargetObject` will be overwritten<br> <br>
182
183
***`constrained (Value:number, Minimum:number = -Infinity, Maximum:number = Infinity):number`**<br>limits the given `Value` to the range specified by `Minimum` and `Maximum` - i.e., the function returns `Minimum` if `Value` is less than (or equal to) `Minimum`, `Maximum` if `Value` is greater than (or equal to) `Maximum`, or `Value` itself otherwise. `Minimum` and `Maximum` are optional and default to `-Infinity` or `+Infinity`, resp.<br> <br>
0 commit comments