feat: add comment

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2019-09-09 14:48:19 +08:00
parent 0df2d2b71f
commit 96639d0978

View File

@ -1,17 +1,21 @@
(function(root, logger) {
// Init Global Value
global.root = root;
global.logger = logger;
// Init Global Function
global.noop = global.engineDisable = function() { };
// disable
global.engineLoad = load;
global.load = function __PreventGlobalLoadFunction__() {
throw new Error('Internal engine system not allow use `load` function!');
};
// Init console and require
global.console = engineLoad(global.root + '/core/console.js')(logger);
global.require = engineLoad(global.root + '/core/require.js')(root);
String.prototype.contains = function(searchString/*, position*/) {
return String.prototype.indexOf.call(this, searchString, arguments[1]) > -1;
// String contains playfill
String.prototype.contains = function(searchString, position) {
return String.prototype.indexOf.call(this, searchString, position) > -1;
};
// ES6 Map Symbol playfill
require('es6-map/implement');
require('es6-symbol/implement');
});