MCPcopy Create free account
hub / github.com/chartjs/Chart.js / _splitKey

Function _splitKey

src/helpers/helpers.core.ts:347–361  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

345 * @private
346 */
347export function _splitKey(key: string) {
348 const parts = key.split('.');
349 const keys: string[] = [];
350 let tmp = '';
351 for (const part of parts) {
352 tmp += part;
353 if (tmp.endsWith('\\')) {
354 tmp = tmp.slice(0, -1) + '.';
355 } else {
356 keys.push(tmp);
357 tmp = '';
358 }
359 }
360 return keys;
361}
362
363function _getKeyResolver(key: string) {
364 const keys = _splitKey(key);

Callers 1

_getKeyResolverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected