collaborative-ui
Version:
React component library for building real-time collaborative editing applications.
17 lines (16 loc) • 458 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.select = void 0;
const find_1 = require("@jsonjoy.com/json-pointer/lib/find");
const util_1 = require("@jsonjoy.com/json-pointer/lib/util");
const select = (value, path) => {
if (!path)
return value;
try {
return (0, find_1.find)(value, (0, util_1.toPath)(path)).val ?? null;
}
catch {
return null;
}
};
exports.select = select;
;