Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Dec 3, 2024
1 parent 07ac571 commit f2b7b33
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Source/Function/Type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type Interface from "../Interface/Type.js";
import type Package from "../Type/Package.js";

/**
* @module Type
*
*/
export default (async (...[Filter = false]) => {
const Result = new Map<string, Package>();

Result.set("*.csproj", "Nuget");
Result.set("Cargo.toml", "Cargo");
Result.set("composer.json", "Composer");
Result.set("Gemfile", "Bundler");
Result.set("package.json", "NPM");
Result.set("packages.config", "Nuget");
Result.set("requirements.txt", "PIP");
Result.set("wrangler.toml", "Cloudflare");

if (Filter) {
Result.forEach((Value, Key) =>
Value !== Filter ? Result.delete(Key) : null,
);
}

return Result;
}) satisfies Interface as Interface;

0 comments on commit f2b7b33

Please sign in to comment.