regexp.prototype.flags
Advanced tools
Comparing version 1.4.2 to 1.4.3
@@ -8,2 +8,8 @@ # Changelog | ||
## [v1.4.3](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.2...v1.4.3) - 2022-04-14 | ||
### Commits | ||
- [Fix] when shimmed, name must be `get flags` [`fcefd00`](https://github.com/es-shims/RegExp.prototype.flags/commit/fcefd0039177e9cbcb2ed842d353131ace7a3377) | ||
## [v1.4.2](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.1...v1.4.2) - 2022-04-12 | ||
@@ -10,0 +16,0 @@ |
'use strict'; | ||
var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); | ||
var $Object = Object; | ||
@@ -34,1 +36,5 @@ var $TypeError = TypeError; | ||
}; | ||
if (functionsHaveConfigurableNames && Object.defineProperty) { | ||
Object.defineProperty(module.exports, 'name', { value: 'get flags' }); | ||
} |
{ | ||
"name": "regexp.prototype.flags", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"author": "Jordan Harband <ljharb@gmail.com>", | ||
@@ -43,3 +43,4 @@ "funding": { | ||
"call-bind": "^1.0.2", | ||
"define-properties": "^1.1.3" | ||
"define-properties": "^1.1.3", | ||
"functions-have-names": "^1.2.2" | ||
}, | ||
@@ -56,3 +57,2 @@ "devDependencies": { | ||
"foreach": "^2.0.5", | ||
"functions-have-names": "^1.2.2", | ||
"has": "^1.0.3", | ||
@@ -59,0 +59,0 @@ "has-strict-mode": "^1.0.1", |
@@ -11,2 +11,3 @@ 'use strict'; | ||
var functionsHaveNames = require('functions-have-names')(); | ||
var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); | ||
var hasStrictMode = require('has-strict-mode')(); | ||
@@ -22,3 +23,3 @@ | ||
t.test('Function name', { skip: !functionsHaveNames }, function (st) { | ||
st.match(descriptor.get.name, /^(get )?flags$/, 'RegExp#flasgs getter has name "flags"'); | ||
st.equal(descriptor.get.name, functionsHaveConfigurableNames ? 'get flags' : 'flags', 'RegExp#flags getter has name "get flags" (or "flags" if function names are not configurable)'); | ||
st.end(); | ||
@@ -25,0 +26,0 @@ }); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36699
15
294
3
+ Addedfunctions-have-names@^1.2.2
+ Addedfunctions-have-names@1.2.3(transitive)