util

NSPIT util module

Methods

(inner) compareValues(key, order) → {function}

Compare object values to sort them

Parameters:
Name Type Default Description
key string

Object key to sort

order 'asc' | 'desc' asc

Order ascending or descending

Returns:
Type
function

(inner) hasNestedProperty(obj, propertyPath) → {boolean}

Check if an object has a nested property

Parameters:
Name Type Description
obj object

Object to check

propertyPath string

Path of property. Syntax: 'prop1.prop2.prop3...'

Returns:
Type
boolean