Class: utls

utls


new utls()

Throws error if u try to instantiate utls class
Author:

Methods


<static> camelCase(string)

Returns a camel-cased string. Word boundaries are "\b", "-", "_", " "
Parameters:
Name Type Description
string String
Returns:
Type
String

<static> equals(first, second)

Checks objects or arrays are equal
Parameters:
Name Type Description
first Array | Object
second Array | Object
Returns:
Type
Boolean

<static> extend(destination, source)

Copy properties from source to destination object
Parameters:
Name Type Description
destination Object
source Object
Returns:
Type
*

<static> fileExists()

Checks whether a file or directory exists
Throws:
Error
Returns:
Type
Boolean

<static> filter(value, callback, key, origin)

Parameters:
Name Type Description
value *
callback function
key String | Number
origin *
Returns:
Type
*

<static> getType(value)

Returns type of given value or name of function/object.
Parameters:
Name Type Description
value *
Returns:
Type
String

<static> isCircular(value)

Parameters:
Name Type Description
value Array | Object
Returns:
Type
*

<static> lcFirst(string)

Returns a string with the first character of string, lowercased if that character is alphabetic.
Parameters:
Name Type Description
string String
Returns:
Type
String

<static> map(value, callback, key, origin)

Parameters:
Name Type Description
value *
callback function
key String | Number
origin *
Returns:
Type
*

<static> microtime()

Returns number of seconds since 1 January 1970 00:00:00 UTC.
Returns:
Type
Number

<static> mkdir(path, options)

Makes directory
Parameters:
Name Type Description
path String
options Options
Throws:
Error

<static> pascalCase(string)

Returns a pascal-cased string. Word boundaries are "\b", "-", "_", " "
Parameters:
Name Type Description
string String
Returns:
Type
String

<static> promisesWaterfall(promises, initial)

Parameters:
Name Type Description
promises Array.<Promise>
initial Promise
Returns:
Type
Promise

<static> traverse(value, match, callback, key, origin)

Parameters:
Name Type Description
value *
match function
callback function
key String | Number
origin *
Returns:
Type
*

<static> ucFirst(string)

Returns a string with the first character of string capitalized, if that character is alphabetic.
Parameters:
Name Type Description
string String
Returns:
Type
String

<static> vcopy(value)

Makes copy of value (dereferences object values)
Parameters:
Name Type Description
value *
Returns:
Type
*