@estarlincito/utils
Version:
A collection of utility functions designed to simplify and speed up development tasks in JavaScript and TypeScript projects.
2 lines (1 loc) • 1.01 kB
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./handle-error.cjs"),a={company:{maxLength:30,minLength:2,placeholder:"Estarlincito Support's",title:"",type:"text"},email:{maxLength:30,minLength:5,placeholder:"name@domain.com",title:"",type:"email"},"first-name":{maxLength:30,minLength:1,placeholder:"Estarlin",title:"",type:"text"},"last-name":{maxLength:30,minLength:1,placeholder:"R",title:"",type:"text"},message:{maxLength:1e3,minLength:1,placeholder:"Enter your message here…",title:"",type:"text"},password:{maxLength:30,minLength:8,placeholder:"4ppl3-1Ph0ne",title:"",type:"password"},"phone-number":{maxLength:12,minLength:10,placeholder:"123-456-7890",title:"",type:"tel"},username:{maxLength:20,minLength:5,placeholder:"estarlincito",title:"",type:"text"}},i=e=>{const t=e[0],l=e.replace(t,t.toLocaleUpperCase()).replace("-"," "),n=a[e];if(!n){r.handleError(`${e} was not found in (fields) /lib/zed.ts`);return}return{...n,title:l}};exports.formZed=i;