Module: @lumjs/core/meta

Meta-programming helpers.

Source:

Classes

AbstractClass

Namespaces

Functions

Methods

(static) NYI(fatalopt, prefixopt) → {void}

A placeholder function for when something is not implemented.

Parameters:
Name Type Attributes Default Description
fatal boolean <optional>
true

If true throw Error. If false use console.error() instead.

prefix string <optional>
''

A prefix for the error message.

Source:
Returns:
Type
void

(static) stacktrace(msgopt) → {Array.<string>}

Get a stacktrace. Differs from browser to browser.

Uses the stack property of an Error object as the source. This is a super simplistic hack. For a more complete solution, try the stacktrace-js library, which will be used in the new @lumjs/debug library as a dependency.

Parameters:
Name Type Attributes Description
msg string <optional>

A message for the Error object.

Source:
Returns:

An array of stack strings.

Type
Array.<string>