Any value to test
if obj is an object and not an array, returns true; Otherwise, false
Clones a class with a default constructor
Instance of class with default constructor
cloned copy of class.
Deep copy function for TypeScript.
Generic type of target/copied value.
Target value to be copied.
Merges sources into target and returns target.
The target to merge all sources into
The sources to merge into target
target will be overwritten. To return a new object make the target {}
const merged = Util.DeepMerge(myTargetObj, sourceObj1, sourceObj2);
// myTargetObj will be be equal to merged ( same object )
or
const merged = Util.DeepMerge({}, myTargetObj, sourceObj1, sourceObj2);
Merges sources into target and returns target. This method is the same as DeepMerge with the excption sources must be of the same type
The target to merge all sources into
The sources to merge into target
target will be overwritten. To return a new object make the target {}
const merged = Util.DeepMergeGeneric(myTargetObj, sourceObj1, sourceObj2);
// myTargetObj will be be equal to merged ( same object )
or
const merged = Util.DeepMergeGeneric({}, myTargetObj, sourceObj1, sourceObj2);
Gets an encoding from an input string
the encoding such as ascii, utf8 to return as BufferEncoding
If no valid match is made the utf8 will be returned. node fs file system requires a fixed string for encoding option. This menthod ensure that a valid option is returned.
Escapes a string for use in a regular expression
String to escape
Generates a random alpha Numeric string
the length of the string to generate
Generates a random alpha string
the length of the string to generate
Test if a string is only white space. Multi-line string are okay to use with this method.
string to test.
true
if str is empty or whitespace:
Otherwise, false
Test if an object is a function
Object to test
true
if obj is a function; Otherwise, false
Builds a string of key value pairs for an object
Any object that has key value pairs
The seperator between each key value pair
Merges two or more objects and return a new object of the same type.
The object that contains any key/values to replace default values
The object(s) to merge with defaults
an object that containg options key/values and any missing key/values that are in defaults,
The order of the objects are passed into opt matters. Object passed in eariler will be have any properties overwritten by objects passed in laster with the same key names.
Parses a value to enum of lnEndOpt
The string or number to convert into enum
If true will match an enum value of any case; Otherwise, case must match.
The value converted into lnEndOpt
Parses a value to enum of splitByOpt
The string or number to convert into enum
If true will match an enum value of any case; Otherwise, case must match.
The value converted into splitByOpt
Generates a random string
the length of the string to generate
string of characters use to generate the the random string.
A random string the length of len.
Generated using TypeDoc
IsObject gets if a object is actually an object add not null or an array.