UNPKG

@forbespro/lead-agent

Version:
2 lines (1 loc) 701 B
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index141.js"),f=require("./index142.js"),d=require("./index143.js"),l=/[A-Z]/g,c=/-[a-z]/g,p=/^data[-\w.:]+$/i;function u(t,e){const n=d.normalize(e);let i=e,a=f.Info;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&p.test(e)){if(e.charAt(4)==="-"){const r=e.slice(5).replace(c,h);i="data"+r.charAt(0).toUpperCase()+r.slice(1)}else{const r=e.slice(4);if(!c.test(r)){let o=r.replace(l,g);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}a=s.DefinedInfo}return new a(i,e)}function g(t){return"-"+t.toLowerCase()}function h(t){return t.charAt(1).toUpperCase()}exports.find=u;