Current section

Files

Jump to
spellweaver priv bun node_modules cspell-config-lib dist serializers cspellYaml.js
Raw

priv/bun/node_modules/cspell-config-lib/dist/serializers/cspellYaml.js

import { CSpellConfigFileYaml, parseCSpellConfigFileYaml } from '../CSpellConfigFile/CSpellConfigFileYaml.js';
function deserializer(params, next) {
if (!isYamlFile(params.url.pathname))
return next(params);
return parseCSpellConfigFileYaml(params);
}
function isYamlFile(pathname) {
pathname = pathname.toLowerCase();
return pathname.endsWith('.yml') || pathname.endsWith('.yaml');
}
function serializer(settings, next) {
if (!(settings instanceof CSpellConfigFileYaml))
return next(settings);
return settings.serialize();
}
export const serializerCSpellYaml = { deserialize: deserializer, serialize: serializer };
//# sourceMappingURL=cspellYaml.js.map