@tomrm/leetcode-utils 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ import type { Problem } from './types.js';
2
+ export declare function getProblems(): Problem[];
3
+ export declare function getRandomProblem(): Problem | undefined;
4
+ //# sourceMappingURL=problem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"problem.d.ts","sourceRoot":"","sources":["../src/problem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAIzC,wBAAgB,WAAW,IAAI,OAAO,EAAE,CAEvC;AAED,wBAAgB,gBAAgB,IAAI,OAAO,GAAG,SAAS,CAUtD"}
@@ -0,0 +1,9 @@
1
+ export type Difficulty = "EASY" | "MEDIUM" | "HARD";
2
+ export type Problem = {
3
+ id: string;
4
+ title: string;
5
+ titleSlug: string;
6
+ difficulty: Difficulty;
7
+ topics: string[];
8
+ };
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAA;AAEnD,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare function getRandomElement<T>(array: T[]): T | undefined;
2
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,GAAG,SAAS,CAO7D"}
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@tomrm/leetcode-utils",
3
+ "version": "1.0.0",
4
+ "description": "utility library for fetching leetcode problems.",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.js",
7
+ "files": ["dist"],
8
+ "types": "./dist/index.d.ts",
9
+ "repository": "git@github.com:Tomrm18/leetcode-utils.git",
10
+ "author": "Tom Maguire <Tomrmx18@gmail.com>",
11
+ "license": "MIT",
12
+ "type": "module",
13
+ "devDependencies": {
14
+ "@types/node": "^26.0.1",
15
+ "tsup": "^8.5.1",
16
+ "tsx": "^4.22.4",
17
+ "typescript": "^6.0.3",
18
+ "vitest": "^4.1.9"
19
+ },
20
+ "scripts": {
21
+ "fetch": "tsx scripts/fetchProblems.ts",
22
+ "build": "tsup && tsc --emitDeclarationOnly"
23
+ }
24
+ }