Sha256: c0b01bc8d9b4c7b4a1c67e05670c1ba7b10f8f61fd2e5e1bf98ea132d6466531

Contents?: true

Size: 710 Bytes

Versions: 15

Compression:

Stored size: 710 Bytes

Contents

'use strict';

var setFunctionName = require('set-function-name');
var $TypeError = require('es-errors/type');

var $Object = Object;

module.exports = setFunctionName(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.unicodeSets) {
		result += 'v';
	}
	if (this.sticky) {
		result += 'y';
	}
	return result;
}, 'get flags', true);

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
immosquare-cleaner-0.1.52 node_modules/regexp.prototype.flags/implementation.js
immosquare-cleaner-0.1.51 node_modules/regexp.prototype.flags/implementation.js
immosquare-cleaner-0.1.50 node_modules/regexp.prototype.flags/implementation.js
immosquare-cleaner-0.1.49 node_modules/regexp.prototype.flags/implementation.js
immosquare-cleaner-0.1.48 node_modules/regexp.prototype.flags/implementation.js
immosquare-cleaner-0.1.47 node_modules/regexp.prototype.flags/implementation.js
immosquare-cleaner-0.1.46 node_modules/regexp.prototype.flags/implementation.js
immosquare-cleaner-0.1.45 node_modules/regexp.prototype.flags/implementation.js
immosquare-cleaner-0.1.44 node_modules/regexp.prototype.flags/implementation.js
immosquare-cleaner-0.1.43 node_modules/regexp.prototype.flags/implementation.js
immosquare-cleaner-0.1.42 node_modules/regexp.prototype.flags/implementation.js
immosquare-cleaner-0.1.41 node_modules/regexp.prototype.flags/implementation.js
immosquare-cleaner-0.1.40 node_modules/regexp.prototype.flags/implementation.js
immosquare-cleaner-0.1.39 node_modules/regexp.prototype.flags/implementation.js
immosquare-cleaner-0.1.38 node_modules/regexp.prototype.flags/implementation.js