MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / getFormatterFor

Method getFormatterFor

src/lib/acode.js:858–867  ·  view source on GitHub ↗

* * @param {string[]} extensions * @returns {Array<[id: String, name: String]>} options

(extensions)

Source from the content-addressed store, hash-verified

856 * @returns {Array<[id: String, name: String]>} options
857 */
858 getFormatterFor(extensions) {
859 const options = [[null, strings.none]];
860 for (const { id, name, exts } of this.formatters) {
861 const supports = exts.some((ext) => extensions.includes(ext));
862 if (supports || exts.includes("*")) {
863 options.push([id, name]);
864 }
865 }
866 return options;
867 }
868
869 alert(title, message, onhide) {
870 alert(title, message, onhide);

Callers 1

formatterSettingsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected