added whole system from ola4doc
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
if (!require('./is-implemented')()) {
|
||||
Object.defineProperty(RegExp.prototype, 'split', { value: require('./shim'),
|
||||
configurable: true, enumerable: false, writable: true });
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./is-implemented')()
|
||||
? RegExp.prototype.split
|
||||
: require('./shim');
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
var re = /\|/;
|
||||
|
||||
module.exports = function () {
|
||||
if (typeof re.split !== 'function') return false;
|
||||
return re.split('bar|foo')[1] === 'foo';
|
||||
};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
var validRegExp = require('../../valid-reg-exp');
|
||||
|
||||
module.exports = function (string) {
|
||||
validRegExp(this);
|
||||
return String(string).split(this);
|
||||
};
|
||||
Reference in New Issue
Block a user