Socket
Socket
Sign inDemoInstall

regexp.prototype.flags

Package Overview
Dependencies
64
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 1.3.0

.github/workflows/rebase.yml

13

CHANGELOG.md

@@ -0,1 +1,14 @@

1.3.0 / 2019-12-14
=================
* [New] add `auto` entry point
* [Refactor] use `callBind` helper from `es-abstract`
* [Deps] update `define-properties`
* [meta] add `funding` field
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `has`, `tape`
* [Tests] use shared travis-ci configs
* [Tests] use `eclint` instead of `editorconfig-tools`
* [Tests] remove `jscs`
* [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops
* [actions] add automatic rebasing / merge commit blocking
1.2.0 / 2017-10-24

@@ -2,0 +15,0 @@ =================

8

implementation.js
'use strict';
var toObject = Object;
var TypeErr = TypeError;
var $Object = Object;
var $TypeError = TypeError;
module.exports = function flags() {
if (this != null && this !== toObject(this)) {
throw new TypeErr('RegExp.prototype.flags getter called on non-object');
if (this != null && this !== $Object(this)) {
throw new $TypeError('RegExp.prototype.flags getter called on non-object');
}

@@ -10,0 +10,0 @@ var result = '';

'use strict';
var define = require('define-properties');
var callBind = require('es-abstract/helpers/callBind');

@@ -9,3 +10,3 @@ var implementation = require('./implementation');

var flagsBound = Function.call.bind(implementation);
var flagsBound = callBind(implementation);

@@ -12,0 +13,0 @@ define(flagsBound, {

{
"name": "regexp.prototype.flags",
"version": "1.2.0",
"author": "Jordan Harband",
"version": "1.3.0",
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"description": "ES6 spec-compliant RegExp.prototype.flags shim.",

@@ -9,13 +12,10 @@ "license": "MIT",

"scripts": {
"pretest": "npm run --silent lint",
"test": "npm run --silent tests-only",
"posttest": "npm run --silent security",
"pretest": "npm run lint",
"test": "npm run tests-only",
"posttest": "npx aud",
"tests-only": "es-shim-api --bound && node --harmony --es-staging test/index.js",
"coverage": "covert test/*.js",
"coverage-quiet": "covert test/*.js --quiet",
"lint": "npm run --silent jscs && npm run --silent eslint",
"eslint": "eslint test/*.js *.js",
"jscs": "jscs test/*.js *.js",
"eccheck": "editorconfig-tools check *.js **/*.js > /dev/null",
"security": "nsp check"
"lint": "eslint .",
"eccheck": "eclint check *.js **/*.js > /dev/null"
},

@@ -40,14 +40,13 @@ "repository": {

"dependencies": {
"define-properties": "^1.1.2"
"define-properties": "^1.1.3",
"es-abstract": "^1.17.0-next.1"
},
"devDependencies": {
"@es-shims/api": "^1.3.0",
"@ljharb/eslint-config": "^12.2.1",
"covert": "^1.1.0",
"editorconfig-tools": "^0.1.1",
"eslint": "^4.9.0",
"has": "^1.0.1",
"jscs": "^3.0.7",
"nsp": "^2.8.1",
"tape": "^4.8.0"
"@es-shims/api": "^2.1.2",
"@ljharb/eslint-config": "^15.0.2",
"covert": "^1.1.1",
"eclint": "^2.8.1",
"eslint": "^6.7.2",
"has": "^1.0.3",
"tape": "^4.11.0"
},

@@ -54,0 +53,0 @@ "testling": {

@@ -6,11 +6,11 @@ 'use strict';

var supportsDescriptors = require('define-properties').supportsDescriptors;
var gOPD = Object.getOwnPropertyDescriptor;
var TypeErr = TypeError;
var $gOPD = Object.getOwnPropertyDescriptor;
var $TypeError = TypeError;
module.exports = function getPolyfill() {
if (!supportsDescriptors) {
throw new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');
throw new $TypeError('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');
}
if (/a/mig.flags === 'gim') {
var descriptor = gOPD(RegExp.prototype, 'flags');
if ((/a/mig).flags === 'gim') {
var descriptor = $gOPD(RegExp.prototype, 'flags');
if (descriptor && typeof descriptor.get === 'function' && typeof (/a/).dotAll === 'boolean') {

@@ -17,0 +17,0 @@ return descriptor.get;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc