@halospv3/hce.shared-config
Version:
Automate commit message quality, changelogs, and CI/CD releases. Its `main` entry point is a Semantic Release config. Functions and classes are exposed for customization. An ESLint config, a Commitlint config, and addl. resources for .NET projects are als
1 lines • 1.39 kB
Source Map (JSON)
{"version":3,"file":"CaseInsensitiveMap.mjs","names":[],"sources":["../src/CaseInsensitiveMap.ts"],"sourcesContent":["/**\n * https://stackoverflow.com/a/50022230/14894786\n * licensed under CC BY-SA 4.0\n * changes: add overrides, remove \"as any\", remove empty lines\n */\nexport class CaseInsensitiveMap<T, U> extends Map<T, U> {\n override delete(key: T): boolean {\n if (typeof key === 'string') {\n key = key.toLowerCase() as T;\n }\n return super.delete(key);\n }\n\n override get(key: T): U | undefined {\n if (typeof key === 'string') {\n key = key.toLowerCase() as T;\n }\n return super.get(key);\n }\n\n override has(key: T): boolean {\n if (typeof key === 'string') {\n key = key.toLowerCase() as T;\n }\n return super.has(key);\n }\n\n override set(key: T, value: U): this {\n if (typeof key === 'string') {\n key = key.toLowerCase() as T;\n }\n return super.set(key, value);\n }\n}\n"],"mappings":";;;;;;AAKA,IAAa,qBAAb,cAA8C,IAAU;CACtD,OAAgB,KAAiB;EAC/B,IAAI,OAAO,QAAQ,UACjB,MAAM,IAAI,YAAY;EAExB,OAAO,MAAM,OAAO,GAAG;CACzB;CAEA,IAAa,KAAuB;EAClC,IAAI,OAAO,QAAQ,UACjB,MAAM,IAAI,YAAY;EAExB,OAAO,MAAM,IAAI,GAAG;CACtB;CAEA,IAAa,KAAiB;EAC5B,IAAI,OAAO,QAAQ,UACjB,MAAM,IAAI,YAAY;EAExB,OAAO,MAAM,IAAI,GAAG;CACtB;CAEA,IAAa,KAAQ,OAAgB;EACnC,IAAI,OAAO,QAAQ,UACjB,MAAM,IAAI,YAAY;EAExB,OAAO,MAAM,IAAI,KAAK,KAAK;CAC7B;AACF"}