Axel Nyffenegger bd98041321 Fix function name computation for literal values (#7435)
* Fix name computation for literal values

* Add more computed literal test cases

* Always return a string in getNameFromLiteralId

- Also concatenate quasis id for regex literal

* Add a test clarifying function name for template literals

* Remove useless else ifs
2018-04-09 21:00:55 -04:00

9 lines
208 B
JavaScript

const x = {
[null]: function _null() {},
[/regex/gi]: function _regex_gi() {},
[`y`]: function y() {},
[`abc${y}def`]: function abcdef() {},
[0]: function _() {},
[false]: function _false() {}
};