UNPKG

@wordpress/editor

Version:
8 lines (7 loc) 769 B
{ "version": 3, "sources": ["../../../../src/components/collab-sidebar/rich-text-control/utils.ts"], "sourcesContent": ["const EMPTY_ARRAY: string[] = [];\n\nexport function getAllowedFormats( {\n\tallowedFormats,\n\tdisableFormats,\n}: {\n\tallowedFormats?: string[];\n\tdisableFormats?: boolean;\n} ): string[] | undefined {\n\tif ( disableFormats ) {\n\t\t// Stable reference so consumers relying on referential equality\n\t\t// (dependency arrays, memoization) don't re-run on every call.\n\t\treturn EMPTY_ARRAY;\n\t}\n\n\treturn allowedFormats;\n}\n"], "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAM,cAAwB,CAAC;AAExB,SAAS,kBAAmB;AAAA,EAClC;AAAA,EACA;AACD,GAG0B;AACzB,MAAK,gBAAiB;AAGrB,WAAO;AAAA,EACR;AAEA,SAAO;AACR;", "names": [] }