lib/database.js
function push(data, point) {
	if (!point) {
		point = '';
	} else if (typeof(point) === 'string') {
		point = point + '.';
	} else {
		logger('DB_SAVE_INVALID_REFERENCE');
	}

	const newKey = point + randomstring.generate();
	set(data, newKey, true);
	goblin.goblinDataEmitter.emit('change', {
		type: 'push',
		value: data,
		key: newKey
	});
}
function push(data, point) {
	if (!point) {
		point = '';
	} else if (typeof(point) === 'string') {
		point = point + '.';
	} else {
		logger('DB_SAVE_INVALID_REFERENCE');
	}

	const newKey = point + randomstring.generate();
	set(data, newKey, true);
	goblin.goblinDataEmitter.emit('change', {
		type: 'push',
		value: data,
		key: newKey
	});
}
function push ( data , point ) { if ( ! point ) { point = '' ; } else if ( typeof ( point ) === 'string' ) { point = point + '.' ; } else { logger ( 'DB_SAVE_INVALID_REFERENCE' ) ; } const newKey = point + randomstring . generate ( ) ; set ( data , newKey , true ) ; goblin . goblinDataEmitter . emit ( 'change' , { type : 'push' , value : data , key : newKey } ) ; }
Push data to a point in the database nested tree. If you don't set a point where to
store the data then it'll be stored in higher level, in that case the data can not
be an array. The first element of the DB has to be always an object.

@param {object | array} data The data to store in the database.
@param {string} point The place to store the data.
@returns {void}
Push data to a point in the database nested tree . If you don t set a point where to store the data then it ll be stored in higher level in that case the data can not be an array . The first element of the DB has to be always an object .