API Docs for:
Show:

Common Class

Module: Common

Methods

Array.prototype.sortBy

()

Defined in src/common.js:39

Extends Array to support sortBy, which sorts an array of objects by given attributes If secondary or more attributes are given and previous attribute comparison is equal, the next attribute is compared in given priority sorting order If an attribute is given with - prefix, the sort order is DESC.

String.prototype.grep

(
  • needle:
  • nomatch:
  • bytes:
)

Defined in src/common.js:74

greps off matching regular expression from a string. If there is more capturing blocs, return an array of strings.

Parameters:

  • needle: Object

    the regular expression to perform for the string

  • nomatch: Object

    default return value if string does not match to regex

  • bytes: Object

    Additional regex bytes as a string.