From 363723fc84f7b8477592e0105aeb331ec9a017af Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Aug 2017 05:01:11 +0200 Subject: node_modules --- node_modules/core-js/modules/es6.function.name.js | 25 ++++++++--------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'node_modules/core-js/modules/es6.function.name.js') diff --git a/node_modules/core-js/modules/es6.function.name.js b/node_modules/core-js/modules/es6.function.name.js index f824d86d2..05dd333f8 100644 --- a/node_modules/core-js/modules/es6.function.name.js +++ b/node_modules/core-js/modules/es6.function.name.js @@ -1,25 +1,16 @@ -var dP = require('./_object-dp').f - , createDesc = require('./_property-desc') - , has = require('./_has') - , FProto = Function.prototype - , nameRE = /^\s*function ([^ (]*)/ - , NAME = 'name'; - -var isExtensible = Object.isExtensible || function(){ - return true; -}; +var dP = require('./_object-dp').f; +var FProto = Function.prototype; +var nameRE = /^\s*function ([^ (]*)/; +var NAME = 'name'; // 19.2.4.2 name NAME in FProto || require('./_descriptors') && dP(FProto, NAME, { configurable: true, - get: function(){ + get: function () { try { - var that = this - , name = ('' + that).match(nameRE)[1]; - has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name)); - return name; - } catch(e){ + return ('' + this).match(nameRE)[1]; + } catch (e) { return ''; } } -}); \ No newline at end of file +}); -- cgit v1.2.3