example-default.js « example « init-package-json « node_modules - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
var init = require('../init-package-json.js')
var dir = process.cwd()
init(dir, 'file that does not exist', function (err, data) {
if (!err) console.log('written successfully')
})