8000 Option to not add newline · Issue #30 · cloudhead/eyes.js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Option to not add newline #30
Open
@unphased

Description

@unphased

I'd like to be able to print stuff inline like a sentence. Here's a snippet of my setup code:

var eyes = require('eyes');

var eyes_err = eyes.inspector({stream: process.stderr, maxLength: 1024*1024});

// stdout with a newline
function l(){console.log.apply(console,arguments)}

// uses eyes to send pretty output to stderr
function e() {
    for (var i=0; i<arguments.length; ++i) {
        if (typeof arguments[i] === 'string') {
            process.stderr.write(arguments[i] + " ");
        } else {
            eyes_err(arguments[i]);
        }
    }
    process.stderr.write("\n");
}

This gets me almost there but if I do

e("here is the data", {data: 23}, "and I am done now")

It prints a newline before "and I am done now" which is undesired. I'd in addition prefer for it to let me specify that instead of ending with a newline I actually want it to use a space.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0