Skip to content

Instantly share code, notes, and snippets.

View techwraith's full-sized avatar

Daniel Erickson techwraith

View GitHub Profile
{{#selectTag toDos step.toDoId selectOpts}}
{{/selectTag}}
module.exports = function (path, opts) {
return function (err, src) {
if (!opts) opts = {}
if (!path) throw new Error('Path must be provided')
if (err) {
throw err
this.toObj = function () {
var obj = {};
for (var p in this) {
// For some reason if this has more than one if statement
// or if the if is checking more than one thing via "||" it
// completely ignores it and assumes it's true
if ( (typeof this[p] != 'function') && p != 'adapter' && p != 'type') {
obj[p] = this[p];
}