function filterStackString(stackString) {
    var lines = stackString.split("\n");
    var desiredLines = [];
    for (var i = 0; i < lines.length; ++i) {
        var line = lines[i];

        if (!isInternalFrame(line) && !isNodeFrame(line) && line) {
            desiredLines.push(line);
        }
    }
    return desiredLines.join("\n");
}
Constructs a {promise, resolve, reject} object.

`resolve` is a callback to invoke with a more resolved value for the
promise. To fulfill the promise, invoke `resolve` with any value that is
not a thenable. To reject the promise, invoke `resolve` with a rejected
thenable, or invoke `reject` with the reason directly. To resolve the
promise to another thenable, thus putting it in the same state, invoke
`resolve` with that other thenable.