Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vadimdemedes/awesome-print
Beautifully print your JavaScript objects
https://github.com/vadimdemedes/awesome-print
List: awesome-print
Last synced: 3 months ago
JSON representation
Beautifully print your JavaScript objects
- Host: GitHub
- URL: https://github.com/vadimdemedes/awesome-print
- Owner: vadimdemedes
- Created: 2015-03-13T11:45:21.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-13T12:03:23.000Z (almost 10 years ago)
- Last Synced: 2024-04-15T12:13:34.350Z (10 months ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 12
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
- awesome-github-repos - vadimdemedes/awesome-print - Beautifully print your JavaScript objects (JavaScript)
README
# awesome-print
Beautifully print your JS objects.
Port of Michael Dvorkin's [awesome_print](https://github.com/michaeldv/awesome_print), which is written in Ruby.### Installation
```
$ npm install awesome-print --save
```### Usage
```javascript
var print = require('awesome-print');print({
id: 100,
name: 'Michael White',
email: '[email protected]',
created_at: new Date(),
updated_at: new Date(),
remember_digest: undefined,
admin: false,
activated: true,
reset_digest: null,
items: [1, 2, 3],
test: function something () { console.log('some function'); }
});
```![](http://cl.ly/image/3m14172Q3M2G/direct)
#### Options
```javascript
var print = require('awesome-print');print.indent = 4; // indent using 4 spaces, default is 2
print.sort = false; // sort object keys alphabetically, default is false
print.plain = false; // disable colors, default is false
```### License
awesome-print is released under MIT license.