Utility TypeScript @ 2.0.0-beta.5
    Preparing search index...

    Utility TypeScript @ 2.0.0-beta.5

    Docs

    Changelog
    MIT License
    ReadMe

    Secondary Endpoints

    node

    Utilities specific to the Node environment.

    types

    Exports all global types (no JavaScript).

    Classes

    MessageMaker

    A configurable class for formatting message strings for various outputs.

    MessageMaker

    Used only for MessageMaker.

    MiniConsole

    The simplest implementation of the ConsoleUtility interface, intended as a fallback or to be extended.

    VariableInspector

    Inspects the value of a variable for debugging.

    VariableInspector

    Used only for VariableInspector.

    Functions – Array

    arrayUnique

    Uses Array.filter to create a unique array.

    hasIterator

    Tests if the given object has an iterator function.

    Functions – Map

    mapFlatten

    Returns a single-level map with kebab/snake/etc. case keys based on nested map keys.

    mapFlatten

    Utilities for the mapFlatten function.

    mapFlattenAsync

    Returns a single-level map with kebab/snake/etc. case keys based on nested map keys.

    mapToObject

    Converts a Map (and any of its Map children, recursively) to a simple object.

    mapToObjectAsync

    Converts a Map (and any of its Map children, recursively) to a simple object.

    Functions – Meta

    typeOf

    An alias for the typeof keyword that returns additional options.

    typeOf

    Used only for typeOf function.

    Functions – Object

    deleteUndefinedProps

    Deletes the properties of the given object whose types are undefined.

    deleteUndefinedProps

    Utilities for the deleteUndefinedProps function.

    isObjectEmpty

    Checks whether an object is empty (by checking for keys and constructor).

    mergeArgs

    Returns an updated version of defaults merged with the contents of inputs.

    mergeArgsAsync

    Returns an updated version of defaults merged with the contents of inputs.

    objectFlatten

    Returns a single-level object record with kebab/snake/etc. case keys based on nested object keys.

    objectFlatten

    Utilities for the objectFlatten function.

    objectFlattenAsync

    Returns a single-level object record with kebab/snake/etc. case keys based on nested object keys.

    objectKeySort

    Sorts a record object according to its keys and returns a sorted copy.

    objectKeySortAsync

    Sorts a record object according to its keys and returns a sorted copy.

    objectMap

    A utility to map the values of an object using a callback function.

    objectMapAsync

    Maps a single-level object's properties to new values based on a callback function.

    Functions – Regex

    escRegExp

    Escapes a string for use in a regular expression.

    escRegExpReplace

    Escapes a string for use as a replacement for a regular expression.

    Functions – String

    makeNumber

    Makes any input a number if it can be made into a valid number (e.g., by parsing a string).

    makeNumberAsync

    Makes any input a number if it can be made into a valid number (e.g., by parsing a string).

    slugify

    Turns the given slug into a string with only a-z, 0-9, and hyphens.

    softWrapText

    Takes an input string and inserts \n to soft wrap text within the given width.

    timestamp

    Formats a date in a predictable way.

    timestamp

    Used only for timestamp function.

    toTitleCase

    Converts the given string to title case.

    Misc.

    arrayUnique

    Utilities for the arrayUnique function.

    slugify

    Utilities for the slugify function.