mirror of
https://github.com/thangisme/notes.git
synced 2024-11-01 01:27:31 -04:00
23 lines
765 B
JavaScript
23 lines
765 B
JavaScript
|
var freeGlobal = require('./_freeGlobal');
|
||
|
|
||
|
/** Detect free variable `exports`. */
|
||
|
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
||
|
|
||
|
/** Detect free variable `module`. */
|
||
|
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
||
|
|
||
|
/** Detect the popular CommonJS extension `module.exports`. */
|
||
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
||
|
|
||
|
/** Detect free variable `process` from Node.js. */
|
||
|
var freeProcess = moduleExports && freeGlobal.process;
|
||
|
|
||
|
/** Used to access faster Node.js helpers. */
|
||
|
var nodeUtil = (function() {
|
||
|
try {
|
||
|
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
||
|
} catch (e) {}
|
||
|
}());
|
||
|
|
||
|
module.exports = nodeUtil;
|