Skip to content

Option to not add newline #30

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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