Skip to content

Commit

Permalink
Merge pull request #18 from jdalton/module
Browse files Browse the repository at this point in the history
Make Module assignment more generic.
  • Loading branch information
ilearnio committed Nov 22, 2017
2 parents 1ccacf4 + 9808ed4 commit e519e75
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.js
@@ -1,6 +1,12 @@
'use strict'

var Module = require('module').Module
var BuiltinModule = require('module')

// Guard against poorly mocked module constructors
var Module = module.constructor.length > 1
? module.constructor
: BuiltinModule

var nodePath = require('path')

var modulePaths = []
Expand Down

0 comments on commit e519e75

Please sign in to comment.