A Library of Functions and Singletons
- Source:
Members
(static) config
- Source:
- See:
(static) config
- Source:
- See:
(static) sebServerPrimary
- Source:
(static) sebServerPrimary
- Source:
Methods
(static) baseURL(route) → {String}
Parameters:
Name | Type | Description |
---|---|---|
route |
String | a root-relative path |
- Source:
Returns:
an absolute URL relative to baseURL
from config
- Type
- String
(static) baseURL(route) → {String}
Parameters:
Name | Type | Description |
---|---|---|
route |
String | a root-relative path |
- Source:
Returns:
an absolute URL relative to baseURL
from config
- Type
- String
(static) chooseAny(array) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
array |
Array.<Object> | an Array |
- Source:
Returns:
a random value from array
- Type
- Object
(static) chooseAny(array) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
array |
Array.<Object> | an Array |
- Source:
Returns:
a random value from array
- Type
- Object
(static) columnToIndexMap(spaceDelimited) → {Object.<Integer>}
Parameters:
Name | Type | Description |
---|---|---|
spaceDelimited |
String | a space-delimited String of column names |
- Source:
Returns:
a property Object mapping each column name to its column index
- Type
- Object.<Integer>
Example
assert.deepEqual(
lib.columnToIndexMap('zero one two'),
{ zero: 0, one: 1, two: 2 }
)
(static) columnToIndexMap(spaceDelimited) → {Object.<Integer>}
Parameters:
Name | Type | Description |
---|---|---|
spaceDelimited |
String | a space-delimited String of column names |
- Source:
Returns:
a property Object mapping each column name to its column index
- Type
- Object.<Integer>
Example
assert.deepEqual(
lib.columnToIndexMap('zero one two'),
{ zero: 0, one: 1, two: 2 }
)
(static) dataColumnMap(row, columnToIndex) → {Object.<Object>}
Parameters:
Name | Type | Description |
---|---|---|
row |
Array.<Object> | an Array of values |
columnToIndex |
Object.<Integer> | the results of |
- Source:
Returns:
a property Object mapping each column name to its row
value
- Type
- Object.<Object>
Example
assert.deepEqual(
lib.dataColumnMap([ 'cero', 'uno', 'dos' ], { zero: 0, one: 1, two: 2 }),
{ zero: 'cero', one: 'uno', two: 'dos' }
)
(static) dataColumnMap(row, columnToIndex) → {Object.<Object>}
Parameters:
Name | Type | Description |
---|---|---|
row |
Array.<Object> | an Array of values |
columnToIndex |
Object.<Integer> | the results of |
- Source:
Returns:
a property Object mapping each column name to its row
value
- Type
- Object.<Object>
Example
assert.deepEqual(
lib.dataColumnMap([ 'cero', 'uno', 'dos' ], { zero: 0, one: 1, two: 2 }),
{ zero: 'cero', one: 'uno', two: 'dos' }
)
(static) forget()
Forgets any results cached by lib.willMemoize
- Source:
(static) forget()
Forgets any results cached by lib.willMemoize
- Source:
(static) willMemoize(will)
Parameters:
Name | Type | Description |
---|---|---|
will |
function | a Function executing a Promise whose result will be memoized |
- Source:
Returns:
(static) willMemoize(will)
Parameters:
Name | Type | Description |
---|---|---|
will |
function | a Function executing a Promise whose result will be memoized |
- Source:
Returns:
(static) willRenderView(res, filename, context) → {Promise.<String>}
Parameters:
Name | Type | Description |
---|---|---|
res |
express.Response | |
filename |
String | the template filename, relative to |
context |
Object | a render context Object |
- Source:
Returns:
a Promise resolving the results of ejs
rendering
- Type
- Promise.<String>
(static) willRenderView(res, filename, context) → {Promise.<String>}
Parameters:
Name | Type | Description |
---|---|---|
res |
express.Response | |
filename |
String | the template filename, relative to |
context |
Object | a render context Object |
- Source:
Returns:
a Promise resolving the results of ejs
rendering
- Type
- Promise.<String>