You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
431 B
20 lines
431 B
'use strict';
|
|
|
|
if (typeof require === 'undefined') {
|
|
var that = this;
|
|
that.require = function(name) {
|
|
var split = name.split('/');
|
|
if (split.length > 0) {
|
|
name = split.pop();
|
|
}
|
|
var module = that[name];
|
|
if (!module) {
|
|
if (!bitcore[name])
|
|
throw new Error('Cannot find module "' + name + '"');
|
|
return bitcore[name];
|
|
}
|
|
return module;
|
|
};
|
|
this.Buffer = require('Buffer');
|
|
|
|
}
|
|
|