INNER CODE UNIT · JavaScript

toJSON

cyrus-and/chrome-remote-interface · bin/client.js:22

function toJSON(object) {
    return JSON.stringify(object, null, 4);
}

///

function inspect(target, args, options) {
    options.local = args.local;
    // otherwise the active target
    if (target) {
        if (args.webSocket) {
            // by WebSocket URL
            options.target = target;
        } else {
            // by target id
            options.target = (targets) => {
                return targets.findIndex((_target) => {
                    return _target.id === target;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…