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

Function _splitKey

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

Source from the content-addressed store, hash-verified

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

Callers 1

_getKeyResolverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected