1.0.95 • Published 26 days ago

yves v1.0.95

Weekly downloads
104
License
MIT
Repository
github
Last release
26 days ago

yves

a customizable value inspector for Node.js inspired by eyes

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. yves were born.

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

usage

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

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

or

var yves = require('yves');

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

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

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

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

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

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

customization

These are the default styles and settings used by yves.

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('yves').inspector({
    styles: {
        all: 'magenta',
        special: 'bold'
    },
    maxLength: 512
});
1.0.95

26 days ago

1.0.91

6 months ago

1.0.94

6 months ago

1.0.93

6 months ago

1.0.92

6 months ago

1.0.90

10 months ago

1.0.88

1 year ago

1.0.87

1 year ago

1.0.86

1 year ago

1.0.89

1 year ago

1.0.84

1 year ago

1.0.83

2 years ago

1.0.85

1 year ago

1.0.82

2 years ago

1.0.81

2 years ago

1.0.80

3 years ago

1.0.79

3 years ago

1.0.78

3 years ago

1.0.77

3 years ago

1.0.76

3 years ago

1.0.75

4 years ago

1.0.74

4 years ago

1.0.73

4 years ago

1.0.72

5 years ago

1.0.71

5 years ago

1.0.70

5 years ago

1.0.69

5 years ago

1.0.68

5 years ago

1.0.67

5 years ago

1.0.66

5 years ago

1.0.65

5 years ago

1.0.64

5 years ago

1.0.63

5 years ago

1.0.62

5 years ago

1.0.61

6 years ago

1.0.60

6 years ago

1.0.59

6 years ago

1.0.58

6 years ago

1.0.57

6 years ago

1.0.56

6 years ago

1.0.55

6 years ago

1.0.54

6 years ago

1.0.53

6 years ago

1.0.52

6 years ago

1.0.51

6 years ago

1.0.50

6 years ago

1.0.49

6 years ago

1.0.48

6 years ago

1.0.47

6 years ago

1.0.46

6 years ago

1.0.45

6 years ago

1.0.44

6 years ago

1.0.43

6 years ago

1.0.42

6 years ago

1.0.41

6 years ago

1.0.40

6 years ago

1.0.39

6 years ago

1.0.38

6 years ago

1.0.37

6 years ago

1.0.36

6 years ago

1.0.35

6 years ago

1.0.34

6 years ago

1.0.33

6 years ago

1.0.32

6 years ago

1.0.31

6 years ago

1.0.30

6 years ago

1.0.29

6 years ago

1.0.27

6 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago