Classes
Methods
(static) joinLines(strings, values) → {String}
A small helper for multiline template strings that allows you to
not worry about new lines and indentations within your code from
breaking up the format of the string.
Parameters:
Name | Type | Description |
---|---|---|
strings |
Array
|
an array of Strings from the template, broken up by |
values |
Array
|
an array of values to be inserted after each string |
Returns:
- Type:
-
String
a template String without any prefixed or postfixed tabs
and other whitespaced characters.
(inner) promisify(method, context) → {function}
A simply promisify style function that returns an async function wrapped
around a supplied function designed for the standard callback methodology.
If the callback is the last parameter, and that callback is in the form of
(error, ...results) then this wrapper will do the trick for you.
Parameters:
Name | Type | Description |
---|---|---|
method |
function
|
a function to wrap in an asynchronous function |
context |
mixed
|
an optional |
Returns:
- Type:
-
function
an asynchronous function, i.e. one that returns a promise
containing the contents the callback results, that wraps the supplied
function.