UNPKG

e-lado

Version:

[![CircleCI](https://circleci.com/gh/sharetribe/sharetribe/tree/master.svg?style=svg)](https://circleci.com/gh/sharetribe/sharetribe/tree/master) [![Dependency Status](https://gemnasium.com/sharetribe/sharetribe.png)](https://gemnasium.com/sharetribe/shar

16 lines 524 B
var setDesc = require('./$').setDesc , createDesc = require('./$.property-desc') , has = require('./$.has') , FProto = Function.prototype , nameRE = /^\s*function ([^ (]*)/ , NAME = 'name'; // 19.2.4.2 name NAME in FProto || require('./$.descriptors') && setDesc(FProto, NAME, { configurable: true, get: function(){ var match = ('' + this).match(nameRE) , name = match ? match[1] : ''; has(this, NAME) || setDesc(this, NAME, createDesc(5, name)); return name; } });