Class: notCommon

notCommon

Collection of common functions

new notCommon()

Members


LOG


MANAGER


deepMerge

Methods


<static> buildURL()

Builds URL with structure like prefix/module/model/id/action If some part absent or set to false it will be excluded from result
Returns:
url path
Type
string

<static> copyObj(obj)

Copies object to secure it from changes
Parameters:
Name Type Description
obj object original object
Returns:
copy of object
Type
object

<async, static> executeObjectFunction(obj, name, params)

Executes method of object in appropriate way inside Promise
Parameters:
Name Type Description
obj object original object
name string method name to execute
params Array array of params
Returns:
results of method execution
Type
Promise

<static> getTodayDate()

Returns today Date object without hours, minutes, seconds
Returns:
current date with 00:00:00 in ms of unix time
Type
number

<static> isAsync(func)

Returns true if argument is Async function
Parameters:
Name Type Description
func function to test
Returns:
if this function is constructed as AsyncFunction
Type
boolean

<static> isDev()

Определяет является ли окружение окружением разработки
Returns:
true если это запущено в окружении разработки
Type
boolean

<static> isError(e)

Parameters:
Name Type Description
e object object to test

<static> isFunc(func)

Test argument type to be 'function'
Parameters:
Name Type Description
func any possible function
Returns:
if this is a function
Type
boolean

<static> mapBind(from, name, list)

Executes method of object in apropriate way inside Promise
Parameters:
Name Type Description
from Object original object
name Object method name to execute
list Array array of params
Returns:
results of method execution
Type
Promise

<static> objHas(obj, name)

Returns true if object has field of name
Parameters:
Name Type Description
obj object some object
name string field name
Returns:
if object contains field with name
Type
boolean

<static> partCopyObj(obj)

Copies object to secure it from changes
Parameters:
Name Type Description
obj object original object
Returns:
copy of object
Type
object