https://github.com/leonardpauli/string-from-object
neatly formatted, indent based presentation of js object, handles circular structures, depth levels, + logs with color
https://github.com/leonardpauli/string-from-object
colors js json logging pretty-print stringify yaml
Last synced: 5 months ago
JSON representation
neatly formatted, indent based presentation of js object, handles circular structures, depth levels, + logs with color
- Host: GitHub
- URL: https://github.com/leonardpauli/string-from-object
- Owner: leonardpauli
- License: agpl-3.0
- Created: 2017-11-29T12:48:08.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-12T20:29:39.000Z (almost 8 years ago)
- Last Synced: 2025-10-25T22:32:49.425Z (8 months ago)
- Topics: colors, js, json, logging, pretty-print, stringify, yaml
- Language: JavaScript
- Homepage:
- Size: 290 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# string-from-object
*neatly formatted, indentation based presentation of js object, handles circular structures, depth levels, + logs with color*
__for usage, see [./module/\_\_tests\_\_](./module/__tests__)__
__`npm i string-from-object`__
```js
import {log} from 'string-from-object'
log({some: {object: ['or', 'value']}})
import strFromObj from 'string-from-object'
console.log(strFromObj(..., {
depth: 1, indentation: '\t', colors: false,
filter: ({key})=> key!=='name',
nameExtractor: obj=> obj.name,
}))
```
### Contribute
Feel free to fork and send PR's :)
Copyright © Leonard Pauli, 2017-2018
Licence: GNU Affero General Public License v3.0 or later.
For commersial / closed-source / custom licencing needs, please contact us.