MCPcopy Create free account
hub / github.com/TruthHun/BookStack / parsePath

Function parsePath

static/vuejs/vue.js:388–400  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

386 */
387var bailRE = /[^\w.$]/;
388function parsePath (path) {
389 if (bailRE.test(path)) {
390 return
391 }
392 var segments = path.split('.');
393 return function (obj) {
394 for (var i = 0; i < segments.length; i++) {
395 if (!obj) { return }
396 obj = obj[segments[i]];
397 }
398 return obj
399 }
400}
401
402/* */
403/* globals MutationObserver */

Callers 1

WatcherFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected