Show More
Commit Description:
utf8mb4
Commit Description:
utf8mb4
References:
File last commit:
Show/Diff file:
Action:
node_modules/regexp.prototype.flags/implementation.js
| 30 lines
| 515 B
| application/javascript
| JavascriptLexer
|
r789 | 'use strict'; | |||
var $Object = Object; | ||||
var $TypeError = TypeError; | ||||
module.exports = function flags() { | ||||
if (this != null && this !== $Object(this)) { | ||||
throw new $TypeError('RegExp.prototype.flags getter called on non-object'); | ||||
} | ||||
var result = ''; | ||||
if (this.global) { | ||||
result += 'g'; | ||||
} | ||||
if (this.ignoreCase) { | ||||
result += 'i'; | ||||
} | ||||
if (this.multiline) { | ||||
result += 'm'; | ||||
} | ||||
if (this.dotAll) { | ||||
result += 's'; | ||||
} | ||||
if (this.unicode) { | ||||
result += 'u'; | ||||
} | ||||
if (this.sticky) { | ||||
result += 'y'; | ||||
} | ||||
return result; | ||||
}; | ||||