source: imaps-frontend/node_modules/es-abstract/2024/ToPropertyKey.js

main
Last change on this file 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
3var GetIntrinsic = require('get-intrinsic');
4
5var $String = GetIntrinsic('%String%');
6
7var ToPrimitive = require('./ToPrimitive');
8var ToString = require('./ToString');
9
10// https://262.ecma-international.org/6.0/#sec-topropertykey
11
12module.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.