JSFiddle - React, Tailwind, and code Playground

by Rodwyn Moreno

TypeScript

const x= ["ProposedDate", "ProposedItem", "ProposedQty"].map((name: string) => {
      const title = name.replace(/([A-Z])/g, ' $1').trim();
      return { name, title };
    });
    
    console.log(x);