Urara-Blog/node_modules/.pnpm-store/v3/files/2a/801da1c61728c709c6c12d3a3233affbc1dcb802aaeb332fdd85d5f83ec5365176a9a95fd864ee32eedc99a8ea597ed00a075eadd59b47367e3e58b10064bf
2022-08-14 01:14:53 +08:00

39 lines
801 B
Text

'use strict';
var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();
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.hasIndices) {
result += 'd';
}
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;
};
if (functionsHaveConfigurableNames && Object.defineProperty) {
Object.defineProperty(module.exports, 'name', { value: 'get flags' });
}