0.1.9 • Published 7 years ago

json-diet v0.1.9

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

json-diet

Travis

skeletonize your json object

returns last elements type

use in node-js

npm install json-diet

usage

var diet=require("json-diet");

supports AMD

  require(["json-diet"],function(diet){
  });

wild web is support

  <script src="json-diet.js"></script>

USAGE

diet({
  "do": "doe a deer a female deer",
  "re": "a drop of golden sun",
  "me":{
    "name": "I call my self"
  },
  "fa": "a long long way to run",
  "so": {
    "needle": {
      "pulling": 0,
      "thread": "~"
    }
  },
  "la": "a note to follow sew",
  "ti": {
    "drink": {
      "with": ["jam", "bread"]
    }
  }
}).result();

USAGE RESULT

{
  do: 'string',
  re: 'string',
  me: { name: 'string' },
  fa: 'string',
  so: { needle: { pulling: 'number', thread: 'string' } },
  la: 'string',
  ti: { drink: { with: 'array' } }
}

LICENSE

MIT

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago