пока что это есть только в черновиках ES6
Сообщение от Understanding ECMAScript 6
|
ECMAScript 6 adds computed property names to object literal syntax by using the same square bracket notation that has been used to reference computed property names in object instances
|
https://github.com/getify/understand...property-names
var funcName = "sin";
math.import({
*!*[funcName]*/!*: function (x) { //Интересует эта строчка
return func(GetRadAngle(x));
}
}, { override: true });
поэтому придется делать так:
var funcName = "sin", obj = {};
obj[funcName] = function (x) {
return func(GetRadAngle(x));
};
math.import(obj, { override: true });