Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
322 bytes
|
Line | |
---|
1 | var toPrimitive = require('../internals/to-primitive');
|
---|
2 | var isSymbol = require('../internals/is-symbol');
|
---|
3 |
|
---|
4 | // `ToPropertyKey` abstract operation
|
---|
5 | // https://tc39.es/ecma262/#sec-topropertykey
|
---|
6 | module.exports = function (argument) {
|
---|
7 | var key = toPrimitive(argument, 'string');
|
---|
8 | return isSymbol(key) ? key : String(key);
|
---|
9 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.