# eyespect

> a customizable value inspector, the same as eyes.js but with different default colors

Latest version **0.1.10** (published 2013-06-15) · BSD license · 0 weekly downloads

## Install

```sh
npm install eyespect
pnpm add eyespect
yarn add eyespect
bun add eyespect
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.10 |
| Published | 2013-06-15 |
| First published | 2013-01-20 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Node | > 0.1.90 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alexis Sellier |
| Maintainers | clewfirst |
| Keywords | inspector, debug, inspect, print |

## Links

- npm: https://www.npmjs.com/package/eyespect
- Repository: https://github.com/nisaacson/eyespect
- Issues: https://github.com/nisaacson/eyespect/issues
- npm.io page: https://npm.io/package/eyespect

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 0.1.10 (latest) — 2013-06-15
- 0.1.8 — 2013-01-20

## README

eyes
====

a customizable value inspector for Node.js

synopsis
--------

I was tired of looking at cluttered output in the console -- something needed to be done,
`sys.inspect()` didn't display regexps correctly, and was too verbose, and I had an hour or two to spare. 
So I decided to have some fun. _eyes_ were born.

![eyes-ss](http://dl.dropbox.com/u/251849/eyes-js-ss.gif)

_example of the output of a user-customized eyes.js inspector_

*eyes* also deals with circular objects in an intelligent way, and can pretty-print object literals.

usage
-----

    var inspect = require('eyes').inspector({styles: {all: 'magenta'}});

    inspect(something); // inspect with the settings passed to `inspector`

or

    var eyes = require('eyes');

    eyes.inspect(something); // inspect with the default settings

you can pass a _label_ to `inspect()`, to keep track of your inspections:

    eyes.inspect(something, "a random value");

If you want to return the output of eyes without printing it, you can set it up this way:

    var inspect = require('eyes').inspector({ stream: null });

    sys.puts(inspect({ something: 42 }));

customization
-------------

These are the default styles and settings used by _eyes_.

    styles: {                 // Styles applied to stdout
        all:     'cyan',      // Overall style applied to everything
        label:   'underline', // Inspection labels, like 'array' in `array: [1, 2, 3]`
        other:   'inverted',  // Objects which don't have a literal representation, such as functions
        key:     'bold',      // The keys in object literals, like 'a' in `{a: 1}`
        special: 'grey',      // null, undefined...
        string:  'green',
        number:  'magenta',
        bool:    'blue',      // true false
        regexp:  'green',     // /\d+/
    },
    
    pretty: true,             // Indent object literals
    hideFunctions: false,     // Don't output functions at all
    stream: process.stdout,   // Stream to write to, or null
    maxLength: 2048           // Truncate output if longer

You can overwrite them with your own, by passing a similar object to `inspector()` or `inspect()`.

    var inspect = require('eyes').inspector({
        styles: {
            all: 'magenta',
            special: 'bold'
        },
        maxLength: 512
    });

---
_Source: https://npm.io/package/eyespect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
