This commit is contained in:
David Kale
2020-09-08 13:25:36 -04:00
parent e4246d2b5b
commit 91fcbb0108
4227 changed files with 416837 additions and 457884 deletions

View File

@@ -3,6 +3,7 @@
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.getPath = getPath;
exports.default = void 0;
function _prettyFormat() {
@@ -92,9 +93,10 @@ const replaceKeyPathWithValue = template => (title, match) => {
})
);
};
/* eslint import/export: 0*/
const getPath = (template, [head, ...tail]) => {
function getPath(template, [head, ...tail]) {
if (!head || !template.hasOwnProperty || !template.hasOwnProperty(head))
return template;
return getPath(template[head], tail);
};
}