Comparing version 1.0.15 to 2.0.0
if (process.fiberLib) { | ||
return module.exports = process.fiberLib; | ||
} | ||
var fs = require('fs'), path = require('path'); | ||
module.exports = process.fiberLib; | ||
} else { | ||
var fs = require('fs'), path = require('path'); | ||
// Seed random numbers [gh-82] | ||
Math.random(); | ||
// Seed random numbers [gh-82] | ||
Math.random(); | ||
// Look for binary for this platform | ||
var modPath = path.join(__dirname, 'bin', process.platform+ '-'+ process.arch+ '-'+ process.versions.modules, 'fibers'); | ||
try { | ||
fs.statSync(modPath+ '.node'); | ||
} catch (ex) { | ||
// No binary! | ||
console.error( | ||
'## There is an issue with `node-fibers` ##\n'+ | ||
'`'+ modPath+ '.node` is missing.\n\n'+ | ||
'Try running this to fix the issue: '+ process.execPath+ ' '+ __dirname.replace(' ', '\\ ')+ '/build' | ||
); | ||
throw new Error('Missing binary. See message above.'); | ||
// Look for binary for this platform | ||
var modPath = path.join(__dirname, 'bin', process.platform+ '-'+ process.arch+ '-'+ process.versions.modules, 'fibers'); | ||
try { | ||
fs.statSync(modPath+ '.node'); | ||
} catch (ex) { | ||
// No binary! | ||
console.error( | ||
'## There is an issue with `node-fibers` ##\n'+ | ||
'`'+ modPath+ '.node` is missing.\n\n'+ | ||
'Try running this to fix the issue: '+ process.execPath+ ' '+ __dirname.replace(' ', '\\ ')+ '/build' | ||
); | ||
throw new Error('Missing binary. See message above.'); | ||
} | ||
// Pull in fibers implementation | ||
process.fiberLib = module.exports = require(modPath).Fiber; | ||
} | ||
// Pull in fibers implementation | ||
process.fiberLib = module.exports = require(modPath).Fiber; |
{ | ||
"name": "fibers", | ||
"version": "1.0.15", | ||
"version": "2.0.0", | ||
"description": "Cooperative multi-tasking for Javascript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1383719
915