@intlayer/core
Version:
Includes core Intlayer functions like translation, dictionary, and utility functions shared across multiple packages.
1 lines • 787 B
Source Map (JSON)
{"version":3,"sources":["../../../../src/transpiler/insertion/getInsertionValues.ts"],"sourcesContent":["export const getInsertionValues = (content: string): string[] => {\n // Regular expression to match {{field}} patterns\n const regex = /{{\\s*(\\w+)\\s*}}/g;\n const matches = [...content.matchAll(regex)];\n\n // If no matches are found, return undefined\n if (matches.length === 0) return [];\n\n // Extract field names from matches and return as an object with the field names\n return matches.map((match) => match[1]);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,qBAAqB,CAAC,YAA8B;AAE/D,QAAM,QAAQ;AACd,QAAM,UAAU,CAAC,GAAG,QAAQ,SAAS,KAAK,CAAC;AAG3C,MAAI,QAAQ,WAAW,EAAG,QAAO,CAAC;AAGlC,SAAO,QAAQ,IAAI,CAAC,UAAU,MAAM,CAAC,CAAC;AACxC;","names":[]}