@forbespro/lead-agent
Version:
Lead Chat Agent React Component
24 lines (23 loc) • 548 B
JavaScript
const f = e("end"), s = e("start");
function e(o) {
return i;
function i(t) {
const n = t && t.position && t.position[o] || {};
if (typeof n.line == "number" && n.line > 0 && typeof n.column == "number" && n.column > 0)
return {
line: n.line,
column: n.column,
offset: typeof n.offset == "number" && n.offset > -1 ? n.offset : void 0
};
}
}
function u(o) {
const i = s(o), t = f(o);
if (i && t)
return { start: i, end: t };
}
export {
f as pointEnd,
s as pointStart,
u as position
};