main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
400 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var GetIntrinsic = require('get-intrinsic');
|
---|
4 |
|
---|
5 | var $String = GetIntrinsic('%String%');
|
---|
6 |
|
---|
7 | var ToPrimitive = require('./ToPrimitive');
|
---|
8 | var ToString = require('./ToString');
|
---|
9 |
|
---|
10 | // https://262.ecma-international.org/6.0/#sec-topropertykey
|
---|
11 |
|
---|
12 | module.exports = function ToPropertyKey(argument) {
|
---|
13 | var key = ToPrimitive(argument, $String);
|
---|
14 | return typeof key === 'symbol' ? key : ToString(key);
|
---|
15 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.