How to use the putout.codeframe function in putout

To help you get started, we’ve selected a few putout examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github coderaiser / cloudcmd / server / user-menu.js View on Github external
function getError(error, source) {
    return `
        const e = Error(\`<pre>${codeframe({
        error,
        source,
        highlightCode: false,
    })}</pre>\`);
        
        e.code = 'frame';
        
        throw e;
    `;
}