Skip to content

Fit a one-size-fits-all tshirt over your data.

Notifications You must be signed in to change notification settings

codeocelot/tshirt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#tshirt

How to use

var tshirt = require('tshirt');
var data = [
		{a:1},
		{a:'one',b:4,c:{},d:[]},
		{a:{},b:42},
		{a:[]}
	]
var shape = tshirt(data);
console.log(shape);
/*
{ 
	a: Set { 'number', 'string', 'object', 'array' },
	b: Set { 'number', 'optional' },
	c: Set { 'object', 'optional' },
	d: Set { 'array', 'optional' } 
}
*/

Use case inspiration

It sucks opening a 500mb list of objects and manually enumerate the data types for each property. Tshirt solves this by determining the shape of your documents.

Improvements

Support nested properties.

About

Fit a one-size-fits-all tshirt over your data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published