{"size": 1140, "ext": "js", "max_stars_repo_path": "test.js", "max_stars_repo_name": "maiah/level-push", "max_stars_repo_stars_event_min_datetime": "2017-02-18T23:33:34.000Z", "max_stars_repo_stars_event_max_datetime": "2017-10-04T01:46:37.000Z", "max_issues_repo_path": "test.js", "max_issues_repo_name": "maiah/level-push", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test.js", "max_forks_repo_name": "maiah/level-push", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.7272727273, "max_line_length": 71, "alphanum_fraction": 0.6096491228}
var assert = require('assert');

var LevelUp = require('levelup'),
    LevelPush = require('./index');

var db = LevelUp('./testdb');

LevelPush(db);

var ninja = {
	name: 'Maiah',
	occupation: 'Ninja'
};

db.push('/', ninja, function (err, uuid) {
	assert(!err);

	db.get(uuid + '/name', function (err, value) {
		assert(!err);
		assert.strictEqual(value, 'Maiah');
	});

	db.get(uuid + '/occupation', function (err, value) {
		assert(!err);
		assert.strictEqual(value, 'Ninja');
	});
});

db.push('/persons', ninja, function (err, uuid) {
	assert(!err);

	db.get('persons/' + uuid + '/name', function (err, value) {
		assert(!err);
		assert.strictEqual(value, 'Maiah');
	});

	db.get('persons/' + uuid + '/occupation', function (err, value) {
		assert(!err);
		assert.strictEqual(value, 'Ninja');
	});
});

db.push('/persons/army', ninja, function (err, uuid) {
	assert(!err);

	db.get('persons/army/' + uuid + '/name', function (err, value) {
		assert(!err);
		assert.strictEqual(value, 'Maiah');
	});

	db.get('persons/army/' + uuid + '/occupation', function (err, value) {
		assert(!err);
		assert.strictEqual(value, 'Ninja');
	});
});