Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


A polyfill for the basic functionality of accessor property in its pre-ES6 form.


Named function declarations

function hello() {
  /* ... */
console.log(;  // "hello"

Named function expressions

var fn = function foo() {
  /* ... */
console.log(;  // "foo"

Browser Compatibility

Most modern browsers have already supported this basic functionality for quite some time but this polyfill will apply to at least the following:

  • IE >=9 <12
  • Chrome <33

For IE <9, you can still use fn._name() instead.


Pre-ES6 Form

  • In short, this means that this polyfilled name accessor property can provide you with the name of a named function definition (either a named function declaration or a named function expression).
  • Unlike other browsers with a similar support level for the pre-ES6 form, this poyfilled name accessor property is also intentionally marked as configurable.

Chrome <5

Other Documentation