You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
407 B
15 lines
407 B
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = toComputedKey;
|
|
|
|
var _generated = require("../validators/generated");
|
|
|
|
var _generated2 = require("../builders/generated");
|
|
|
|
function toComputedKey(node, key = node.key || node.property) {
|
|
if (!node.computed && (0, _generated.isIdentifier)(key)) key = (0, _generated2.stringLiteral)(key.name);
|
|
return key;
|
|
} |