Skip to content

Stringify JSON *just enough* to see what it is

License

Notifications You must be signed in to change notification settings

jamiebuilds/json-peek

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json-peek

Stringify JSON just enough to see what it is

Install

yarn add json-peek

Usage

const jsonPeek = require('json-peek');

jsonPeek({ prop: 'value' }); // {"prop": "value"}

Example

Input:

{
  "name": "json-peek",
  "version": "0.0.0",
  "description": "Stringify JSON *just enough* to see what it is",
  "main": "index.js",
  "repository": "https://github.com/jamiebuilds/json-peek",
  "author": "Jamie Kyle <[email protected]>",
  "license": "MIT",
  "keywords": [
    "json",
    "stringify",
    "peek",
    "preview",
    "pretty",
    "print"
  ],
  "files": [
    "index.js"
  ],
  "scripts": {
    "test": "ava"
  },
  "devDependencies": {
    "ava": "^0.25.0",
    "flow-bin": "^0.74.0"
  }
}

Output:

{"name": "json-peek", ...}