MCPcopy Index your code
hub / github.com/apache/echarts / encodeJSObjectKey

Function encodeJSObjectKey

test/lib/testHelper.js:2432–2438  ·  view source on GitHub ↗
(source, quotationMark)

Source from the content-addressed store, hash-verified

2430 };
2431
2432 var encodeJSObjectKey = function (source, quotationMark) {
2433 source = '' + source;
2434 if (!/^[a-zA-Z$_][a-zA-Z0-9$_]*$/.test(source)) {
2435 source = convertStringToJSLiteral(source, quotationMark);
2436 }
2437 return source;
2438 };
2439
2440 var convertStringToJSLiteral = function (str, quotationMark) {
2441 // assert(getType(str) === 'string');

Callers 1

doPrintFunction · 0.85

Calls 1

convertStringToJSLiteralFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…