@frontitude/cli
Version:
The Frontitude CLI enables product teams to integrate their code with Frontitude (frontitude.com), thus creating a single source of truth for their product copy, from design to development.
1 lines • 741 B
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0}),exports.replaceVariables=exports.generateRandomString=void 0;const generateRandomString=(t=64)=>(Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2)).substring(0,t);exports.generateRandomString=generateRandomString;const replaceVariables=(t,r)=>{for(let e of Object.keys(r))t=t.replace(`{{${e}}}`,r[e]);return t};exports.replaceVariables=replaceVariables;