Skip to content

Instantly share code, notes, and snippets.

@SergProduction
SergProduction / sequelize-schema-file-generator.js
Last active August 26, 2020 00:44 — forked from manuelbieh/sequelize-schema-file-generator.js
Automatically generates migration files from your sequelize models
/*
check next problenm:
Property and value:
references
defaultValue
onDelete
onUpdate
Tyoes:
@SergProduction
SergProduction / Object Flatten
Created March 13, 2018 23:53 — forked from penguinboy/Object Flatten
Flatten javascript objects into a single-depth object
var flattenObject = function(ob) {
var toReturn = {};
for (var i in ob) {
if (!ob.hasOwnProperty(i)) continue;
if ((typeof ob[i]) == 'object') {
var flatObject = flattenObject(ob[i]);
for (var x in flatObject) {
if (!flatObject.hasOwnProperty(x)) continue;