Created
June 22, 2015 22:12
-
-
Save anotheredward/aa5111adbae0a01940dd to your computer and use it in GitHub Desktop.
Creates an Ember model body from a loopback json model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs') | |
function printFormat(key) { | |
console.log(key + ": attr('" + model.properties[key].type + "'),") | |
} | |
var model = JSON.parse(fs.readFileSync(process.argv[2], {encoding: 'ascii'})) | |
Object.keys(model.properties).map(printFormat) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1