0.0.4 • Published 10 years ago

ponzi v0.0.4

Weekly downloads
17
License
-
Repository
github
Last release
10 years ago

a true inspiration

Ponzi

We needed a quick way to generate schema's for objects so that ETL's further down the pipe would know how to parse the darn things.

usage

var Ponzi = require('ponzi');

var schema = Ponzi.toSchema({ aString : 'abc',
                              aNumber : 123, 
                              anObject : { hello : 'world'},
                              anArray  : [1, 2, 3] });

<!-- yields
{ type: 'object',
  properties: 
   { aNumber: { type: 'number' },
     aString: { type: 'string' },
     anArray: { type: 'array', items: [Object] },
     anObject: 
      { type: 'object',
        '$ref': '211b43b6a3324ea9dd280dfb567fedb8' } },
  definitions: { '211b43b6a3324ea9dd280dfb567fedb8': { type: 'object', properties: [Object] } } } -->

known bummers

Arrays containing different datatypes will yield little information. ie) type : 'mixed' (which is not super helpful);

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago