_to_property_key.js 537 B

12345678910111213141516
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = _toPropertyKey;
  6. var _typeOfMjs = _interopRequireDefault(require("./_type_of.js"));
  7. var _toPrimitiveMjs = _interopRequireDefault(require("./_to_primitive.js"));
  8. function _toPropertyKey(arg) {
  9. var key = (0, _toPrimitiveMjs).default(arg, "string");
  10. return (0, _typeOfMjs).default(key) === "symbol" ? key : String(key);
  11. }
  12. function _interopRequireDefault(obj) {
  13. return obj && obj.__esModule ? obj : {
  14. default: obj
  15. };
  16. }