code-languages 1.39.0 → 1.40.1
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.
- package/README.md +69 -5
- package/dist/{api-EZK9DmOV.d.ts → api-BlQoDQtF.d.ts} +51 -1
- package/dist/{api-C-SCQpIV.d.cts → api-Cvg4BdaR.d.cts} +51 -1
- package/dist/api.cjs +483 -32
- package/dist/api.d.cts +1 -1
- package/dist/api.d.ts +1 -1
- package/dist/api.js +483 -32
- package/dist/detect.cjs +5 -5
- package/dist/detect.js +5 -5
- package/dist/index.cjs +491 -32
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +490 -33
- package/dist/languages/cuda.cjs +1 -1
- package/dist/languages/cuda.js +1 -1
- package/dist/languages/cue.cjs +1 -1
- package/dist/languages/cue.js +1 -1
- package/dist/languages/cython.cjs +1 -1
- package/dist/languages/cython.js +1 -1
- package/dist/languages/git.cjs +1 -1
- package/dist/languages/git.js +1 -1
- package/dist/languages/rego.cjs +1 -1
- package/dist/languages/rego.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -238,6 +238,70 @@ no extra data is needed in individual language files.
|
|
|
238
238
|
`frontend`, `backend`, and `fullstack` are mutually exclusive; the remaining categories
|
|
239
239
|
can overlap (Python appears in both `backend` and `data-science`).
|
|
240
240
|
|
|
241
|
+
Use `api.paradigm(value)` to filter languages by programming paradigm:
|
|
242
|
+
|
|
243
|
+
```ts
|
|
244
|
+
import { api, getParadigms } from "code-languages";
|
|
245
|
+
|
|
246
|
+
// Get paradigm metadata
|
|
247
|
+
const info = api.paradigm('functional').info();
|
|
248
|
+
// {
|
|
249
|
+
// slug: 'functional',
|
|
250
|
+
// name: 'Functional',
|
|
251
|
+
// description: 'Computation through function evaluation, immutability, and avoiding side effects.',
|
|
252
|
+
// aliases: ['functional', 'fp', 'pure-functional'],
|
|
253
|
+
// }
|
|
254
|
+
|
|
255
|
+
// Get languages that belong to this paradigm
|
|
256
|
+
const langs = api.paradigm('functional').langs().get();
|
|
257
|
+
const langsEs = api.paradigm('oop').langs().locale('es').get();
|
|
258
|
+
await api.paradigm('object-oriented').langs().load();
|
|
259
|
+
|
|
260
|
+
// Returns undefined / [] for unknown values
|
|
261
|
+
api.paradigm('unknown-xyz').info(); // undefined
|
|
262
|
+
api.paradigm('unknown-xyz').langs().get(); // []
|
|
263
|
+
|
|
264
|
+
// List all available paradigms
|
|
265
|
+
getParadigms();
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Supported paradigm aliases include: `functional` / `fp`, `object-oriented` / `oop`,
|
|
269
|
+
`imperative` / `procedural`, `declarative`, `logic`, `concurrent`, `reactive`, `scripting` / `shell`,
|
|
270
|
+
`query`, `markup`, `templating`, `array`, `systems` / `low-level`, `stack-based` / `concatenative`,
|
|
271
|
+
`shader` / `gpu`, and more. Searches `paradigms` on each language.
|
|
272
|
+
|
|
273
|
+
Use `api.ecosystem(value)` to filter languages by technology ecosystem:
|
|
274
|
+
|
|
275
|
+
```ts
|
|
276
|
+
import { api, getEcosystems } from "code-languages";
|
|
277
|
+
|
|
278
|
+
// Get ecosystem metadata
|
|
279
|
+
const info = api.ecosystem('jvm').info();
|
|
280
|
+
// {
|
|
281
|
+
// slug: 'jvm',
|
|
282
|
+
// name: 'JVM',
|
|
283
|
+
// description: 'Languages that run on the Java Virtual Machine.',
|
|
284
|
+
// aliases: ['jvm', 'java'],
|
|
285
|
+
// }
|
|
286
|
+
|
|
287
|
+
// Get languages that belong to this ecosystem
|
|
288
|
+
const langs = api.ecosystem('jvm').langs().get();
|
|
289
|
+
const langsEs = api.ecosystem('data-science').langs().locale('es').get();
|
|
290
|
+
await api.ecosystem('web').langs().load();
|
|
291
|
+
|
|
292
|
+
// Returns undefined / [] for unknown values
|
|
293
|
+
api.ecosystem('unknown-xyz').info(); // undefined
|
|
294
|
+
api.ecosystem('unknown-xyz').langs().get(); // []
|
|
295
|
+
|
|
296
|
+
// List all available ecosystems
|
|
297
|
+
getEcosystems();
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Supported ecosystem aliases include: `web` / `frontend`, `node` / `nodejs`, `jvm` / `java`,
|
|
301
|
+
`dotnet` / `.net`, `data-science` / `ml`, `embedded` / `iot`, `game-dev` / `games`,
|
|
302
|
+
`blockchain` / `web3`, `mobile`, `wasm`, `cloud`, `kubernetes` / `k8s`, `systems`,
|
|
303
|
+
`formal-methods` / `verification`, `gpu` / `graphics`, and more. Searches `tooling.ecosystems` on each language.
|
|
304
|
+
|
|
241
305
|
Use `localizeLanguage` to read localized display content with English fallback:
|
|
242
306
|
|
|
243
307
|
```ts
|
|
@@ -355,11 +419,11 @@ from its package subpath.
|
|
|
355
419
|
| <img src="https://cdn.simpleicons.org/apachecassandra/1287B1" alt="CQL logo" width="24" height="24"> | CQL | `cql` | `.cql` | `CQL 3` | `code-languages/cql` |
|
|
356
420
|
| <img src="https://upload.wikimedia.org/wikipedia/commons/b/bd/Logo_C_sharp.svg" alt="C# logo" width="24" height="24"> | C# | `csharp` | `.cs`, `.csx` | `14` | `code-languages/csharp` |
|
|
357
421
|
| <img src="https://upload.wikimedia.org/wikipedia/commons/a/ab/Official_CSS_Logo.svg" alt="CSS logo" width="24" height="24"> | CSS | `css` | `.css` | `Living Standard` | `code-languages/css` |
|
|
358
|
-
| <img src="https://cdn.simpleicons.org/nvidia/76B900" alt="CUDA logo" width="24" height="24"> | CUDA | `cuda` | `.cu`, `.cuh` | `13.3.
|
|
359
|
-
| <img src="https://avatars.githubusercontent.com/u/43867057?s=200&v=4" alt="CUE logo" width="24" height="24"> | CUE | `cue` | `.cue` | `0.
|
|
422
|
+
| <img src="https://cdn.simpleicons.org/nvidia/76B900" alt="CUDA logo" width="24" height="24"> | CUDA | `cuda` | `.cu`, `.cuh` | `13.3.1` | `code-languages/cuda` |
|
|
423
|
+
| <img src="https://avatars.githubusercontent.com/u/43867057?s=200&v=4" alt="CUE logo" width="24" height="24"> | CUE | `cue` | `.cue` | `0.17.0` | `code-languages/cue` |
|
|
360
424
|
| <img src="https://www.curry-language.org/assets/img/curry-32x32.png" alt="Curry logo" width="24" height="24"> | Curry | `curry` | `.curry`, `.lcurry` | `Curry 0.9.0` | `code-languages/curry` |
|
|
361
425
|
| <img src="https://dist.neo4j.com/wp-content/uploads/20210423072428/neo4j-logo-2020-1.svg" alt="Cypher logo" width="24" height="24"> | Cypher | `cypher` | `.cypher`, `.cyp` | `25` | `code-languages/cypher` |
|
|
362
|
-
| <img src="https://raw.githubusercontent.com/vscode-icons/vscode-icons/master/icons/file_type_cython.svg" alt="Cython logo" width="24" height="24"> | Cython | `cython` | `.pyx`, `.pxd`, `.pxi` | `3.2.
|
|
426
|
+
| <img src="https://raw.githubusercontent.com/vscode-icons/vscode-icons/master/icons/file_type_cython.svg" alt="Cython logo" width="24" height="24"> | Cython | `cython` | `.pyx`, `.pxd`, `.pxi` | `3.2.8` | `code-languages/cython` |
|
|
363
427
|
| <img src="https://cdn.simpleicons.org/d/BA595E" alt="D logo" width="24" height="24"> | D | `d` | `.d`, `.di` | `2.112.0` | `code-languages/d` |
|
|
364
428
|
| <img src="https://dafny.org/images/dafny-favicon.svg" alt="Dafny logo" width="24" height="24"> | Dafny | `dafny` | `.dfy` | `4.11.0` | `code-languages/dafny` |
|
|
365
429
|
| <img src="https://commons.wikimedia.org/wiki/Special:FilePath/Dart_programming_language_logo.svg" alt="Dart logo" width="24" height="24"> | Dart | `dart` | `.dart` | `3.12.2` | `code-languages/dart` |
|
|
@@ -391,7 +455,7 @@ from its package subpath.
|
|
|
391
455
|
| <img src="https://dummyimage.com/32x32/DC2626/ffffff.png&text=G" alt="G-code logo" width="24" height="24"> | G-code | `gcode` | `.gcode`, `.gco`, `.nc`, `.cnc`, `.tap` | `RS-274` | `code-languages/gcode` |
|
|
392
456
|
| <img src="https://cdn.simpleicons.org/godotengine/478CBF" alt="GDScript logo" width="24" height="24"> | GDScript | `gdscript` | `.gd` | `4.7` | `code-languages/gdscript` |
|
|
393
457
|
| <img src="https://dummyimage.com/32x32/7C3AED/ffffff.png&text=PO" alt="Gettext logo" width="24" height="24"> | Gettext | `gettext` | `.po`, `.pot` | `stable` | `code-languages/gettext` |
|
|
394
|
-
| <img src="https://cdn.simpleicons.org/git/F05032" alt="Git logo" width="24" height="24"> | Git | `git` | `.git`, `.gitignore`, `.gitattributes`, `.gitmodules`, `.gitkeep` | `2.
|
|
458
|
+
| <img src="https://cdn.simpleicons.org/git/F05032" alt="Git logo" width="24" height="24"> | Git | `git` | `.git`, `.gitignore`, `.gitattributes`, `.gitmodules`, `.gitkeep` | `2.55.0` | `code-languages/git` |
|
|
395
459
|
| <img src="https://dummyimage.com/32x32/2D5FA0/ffffff.png&text=AS" alt="AngelScript logo" width="24" height="24"> | AngelScript | `angelscript` | `.as`, `.angelscript` | `2.36.1` | `code-languages/angelscript` |
|
|
396
460
|
| <img src="https://cdn.simpleicons.org/gleam/FFAFF3" alt="Gleam logo" width="24" height="24"> | Gleam | `gleam` | `.gleam` | `1.17.0` | `code-languages/gleam` |
|
|
397
461
|
| <img src="https://cdn.simpleicons.org/gamemaker/000000" alt="GML logo" width="24" height="24"> | GML | `gml` | `.gml` | `2024.13.0` | `code-languages/gml` |
|
|
@@ -516,7 +580,7 @@ from its package subpath.
|
|
|
516
580
|
| <img src="https://www.rebol.com/graphics/reb-logo.gif" alt="Rebol logo" width="24" height="24"> | Rebol | `rebol` | `.r`, `.reb`, `.rebol` | `Rebol 3` | `code-languages/rebol` |
|
|
517
581
|
| <img src="https://static.red-lang.org/red-logo.svg" alt="Red logo" width="24" height="24"> | Red | `red` | `.red`, `.reds` | `0.6.6` | `code-languages/red` |
|
|
518
582
|
| <img src="https://cdn.simpleicons.org/reason/DD4B39" alt="ReasonML logo" width="24" height="24"> | ReasonML | `reasonml` | `.re`, `.rei` | `3.13.0` | `code-languages/reasonml` |
|
|
519
|
-
| <img src="https://raw.githubusercontent.com/open-policy-agent/opa/main/logo/logo.svg" alt="Rego logo" width="24" height="24"> | Rego | `rego` | `.rego` | `OPA 1.18.
|
|
583
|
+
| <img src="https://raw.githubusercontent.com/open-policy-agent/opa/main/logo/logo.svg" alt="Rego logo" width="24" height="24"> | Rego | `rego` | `.rego` | `OPA 1.18.1` | `code-languages/rego` |
|
|
520
584
|
| <img src="https://cdn.simpleicons.org/rescript/E6484A" alt="ReScript logo" width="24" height="24"> | ReScript | `rescript` | `.res`, `.resi` | `12.0.0` | `code-languages/rescript` |
|
|
521
585
|
| <img src="https://cdn.simpleicons.org/readthedocs/8CA1AF" alt="reStructuredText logo" width="24" height="24"> | reStructuredText | `restructuredtext` | `.rst`, `.rest` | `Docutils 0.22.2` | `code-languages/restructuredtext` |
|
|
522
586
|
| <img src="https://avatars.githubusercontent.com/u/96867701?v=4" alt="Roc logo" width="24" height="24"> | Roc | `roc` | `.roc` | `development snapshot` | `code-languages/roc` |
|
|
@@ -4,6 +4,14 @@ import { d as Locale, e as LocalizedLanguage } from './types-B0_wjl_Q.js';
|
|
|
4
4
|
type LanguageCategory = 'frontend' | 'backend' | 'fullstack' | 'systems' | 'data-science' | 'scripting' | 'other';
|
|
5
5
|
declare function getCategories(): LanguageCategory[];
|
|
6
6
|
|
|
7
|
+
interface EcosystemInfo {
|
|
8
|
+
slug: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
aliases: string[];
|
|
12
|
+
}
|
|
13
|
+
declare function getEcosystems(): EcosystemInfo[];
|
|
14
|
+
|
|
7
15
|
interface PackageManagerInfo {
|
|
8
16
|
slug: string;
|
|
9
17
|
name: string;
|
|
@@ -14,6 +22,14 @@ interface PackageManagerInfo {
|
|
|
14
22
|
}
|
|
15
23
|
declare function getPackageManagers(): PackageManagerInfo[];
|
|
16
24
|
|
|
25
|
+
interface ParadigmInfo {
|
|
26
|
+
slug: string;
|
|
27
|
+
name: string;
|
|
28
|
+
description: string;
|
|
29
|
+
aliases: string[];
|
|
30
|
+
}
|
|
31
|
+
declare function getParadigms(): ParadigmInfo[];
|
|
32
|
+
|
|
17
33
|
interface RuntimeInfo {
|
|
18
34
|
slug: string;
|
|
19
35
|
name: string;
|
|
@@ -64,6 +80,18 @@ interface CategoryRequest {
|
|
|
64
80
|
/** Languages that belong to this category. */
|
|
65
81
|
langs(): LanguageCollectionRequest;
|
|
66
82
|
}
|
|
83
|
+
interface ParadigmRequest {
|
|
84
|
+
/** Metadata about the matched paradigm. Returns undefined for unknown values. */
|
|
85
|
+
info(): ParadigmInfo | undefined;
|
|
86
|
+
/** Languages that use this programming paradigm. */
|
|
87
|
+
langs(): LanguageCollectionRequest;
|
|
88
|
+
}
|
|
89
|
+
interface EcosystemRequest {
|
|
90
|
+
/** Metadata about the matched ecosystem. Returns undefined for unknown values. */
|
|
91
|
+
info(): EcosystemInfo | undefined;
|
|
92
|
+
/** Languages that belong to this ecosystem. */
|
|
93
|
+
langs(): LanguageCollectionRequest;
|
|
94
|
+
}
|
|
67
95
|
interface LanguageCollectionRequest {
|
|
68
96
|
/**
|
|
69
97
|
* Sets the requested locale for every language returned by this collection lookup.
|
|
@@ -149,6 +177,28 @@ declare const api: {
|
|
|
149
177
|
* await api.category('data-science').langs().load();
|
|
150
178
|
*/
|
|
151
179
|
category(value: LanguageCategory): CategoryRequest;
|
|
180
|
+
/**
|
|
181
|
+
* Selects every language that uses the given programming paradigm.
|
|
182
|
+
*
|
|
183
|
+
* Accepts common aliases: 'functional', 'fp', 'object-oriented', 'oop', 'declarative', etc.
|
|
184
|
+
* Searches `language.paradigms`.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* api.paradigm('functional').langs().locale('es').get();
|
|
188
|
+
* api.paradigm('oop').info();
|
|
189
|
+
*/
|
|
190
|
+
paradigm(value: string): ParadigmRequest;
|
|
191
|
+
/**
|
|
192
|
+
* Selects every language that belongs to the given ecosystem.
|
|
193
|
+
*
|
|
194
|
+
* Accepts common aliases: 'web', 'jvm', 'dotnet', 'devops', 'data-science', 'embedded', etc.
|
|
195
|
+
* Searches `tooling.ecosystems`.
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* api.ecosystem('jvm').langs().locale('es').get();
|
|
199
|
+
* api.ecosystem('blockchain').info();
|
|
200
|
+
*/
|
|
201
|
+
ecosystem(value: string): EcosystemRequest;
|
|
152
202
|
/**
|
|
153
203
|
* Detects every matching language for a filename or path.
|
|
154
204
|
*
|
|
@@ -157,4 +207,4 @@ declare const api: {
|
|
|
157
207
|
detectAll(filename: string): LanguageCollectionRequest;
|
|
158
208
|
};
|
|
159
209
|
|
|
160
|
-
export { type CategoryRequest as C, type LanguageCategory as L, type PackageManagerInfo as P, type RuntimeInfo as R,
|
|
210
|
+
export { type CategoryRequest as C, type EcosystemInfo as E, type LanguageCategory as L, type PackageManagerInfo as P, type RuntimeInfo as R, type EcosystemRequest as a, type ParadigmInfo as b, type ParadigmRequest as c, api as d, getEcosystems as e, getPackageManagers as f, getCategories as g, getParadigms as h, getRuntimes as i, type LanguageCollectionRequest as j, type LanguageRequest as k, type PackageManagerRequest as l, type RuntimeRequest as m };
|
|
@@ -4,6 +4,14 @@ import { d as Locale, e as LocalizedLanguage } from './types-B0_wjl_Q.cjs';
|
|
|
4
4
|
type LanguageCategory = 'frontend' | 'backend' | 'fullstack' | 'systems' | 'data-science' | 'scripting' | 'other';
|
|
5
5
|
declare function getCategories(): LanguageCategory[];
|
|
6
6
|
|
|
7
|
+
interface EcosystemInfo {
|
|
8
|
+
slug: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
aliases: string[];
|
|
12
|
+
}
|
|
13
|
+
declare function getEcosystems(): EcosystemInfo[];
|
|
14
|
+
|
|
7
15
|
interface PackageManagerInfo {
|
|
8
16
|
slug: string;
|
|
9
17
|
name: string;
|
|
@@ -14,6 +22,14 @@ interface PackageManagerInfo {
|
|
|
14
22
|
}
|
|
15
23
|
declare function getPackageManagers(): PackageManagerInfo[];
|
|
16
24
|
|
|
25
|
+
interface ParadigmInfo {
|
|
26
|
+
slug: string;
|
|
27
|
+
name: string;
|
|
28
|
+
description: string;
|
|
29
|
+
aliases: string[];
|
|
30
|
+
}
|
|
31
|
+
declare function getParadigms(): ParadigmInfo[];
|
|
32
|
+
|
|
17
33
|
interface RuntimeInfo {
|
|
18
34
|
slug: string;
|
|
19
35
|
name: string;
|
|
@@ -64,6 +80,18 @@ interface CategoryRequest {
|
|
|
64
80
|
/** Languages that belong to this category. */
|
|
65
81
|
langs(): LanguageCollectionRequest;
|
|
66
82
|
}
|
|
83
|
+
interface ParadigmRequest {
|
|
84
|
+
/** Metadata about the matched paradigm. Returns undefined for unknown values. */
|
|
85
|
+
info(): ParadigmInfo | undefined;
|
|
86
|
+
/** Languages that use this programming paradigm. */
|
|
87
|
+
langs(): LanguageCollectionRequest;
|
|
88
|
+
}
|
|
89
|
+
interface EcosystemRequest {
|
|
90
|
+
/** Metadata about the matched ecosystem. Returns undefined for unknown values. */
|
|
91
|
+
info(): EcosystemInfo | undefined;
|
|
92
|
+
/** Languages that belong to this ecosystem. */
|
|
93
|
+
langs(): LanguageCollectionRequest;
|
|
94
|
+
}
|
|
67
95
|
interface LanguageCollectionRequest {
|
|
68
96
|
/**
|
|
69
97
|
* Sets the requested locale for every language returned by this collection lookup.
|
|
@@ -149,6 +177,28 @@ declare const api: {
|
|
|
149
177
|
* await api.category('data-science').langs().load();
|
|
150
178
|
*/
|
|
151
179
|
category(value: LanguageCategory): CategoryRequest;
|
|
180
|
+
/**
|
|
181
|
+
* Selects every language that uses the given programming paradigm.
|
|
182
|
+
*
|
|
183
|
+
* Accepts common aliases: 'functional', 'fp', 'object-oriented', 'oop', 'declarative', etc.
|
|
184
|
+
* Searches `language.paradigms`.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* api.paradigm('functional').langs().locale('es').get();
|
|
188
|
+
* api.paradigm('oop').info();
|
|
189
|
+
*/
|
|
190
|
+
paradigm(value: string): ParadigmRequest;
|
|
191
|
+
/**
|
|
192
|
+
* Selects every language that belongs to the given ecosystem.
|
|
193
|
+
*
|
|
194
|
+
* Accepts common aliases: 'web', 'jvm', 'dotnet', 'devops', 'data-science', 'embedded', etc.
|
|
195
|
+
* Searches `tooling.ecosystems`.
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* api.ecosystem('jvm').langs().locale('es').get();
|
|
199
|
+
* api.ecosystem('blockchain').info();
|
|
200
|
+
*/
|
|
201
|
+
ecosystem(value: string): EcosystemRequest;
|
|
152
202
|
/**
|
|
153
203
|
* Detects every matching language for a filename or path.
|
|
154
204
|
*
|
|
@@ -157,4 +207,4 @@ declare const api: {
|
|
|
157
207
|
detectAll(filename: string): LanguageCollectionRequest;
|
|
158
208
|
};
|
|
159
209
|
|
|
160
|
-
export { type CategoryRequest as C, type LanguageCategory as L, type PackageManagerInfo as P, type RuntimeInfo as R,
|
|
210
|
+
export { type CategoryRequest as C, type EcosystemInfo as E, type LanguageCategory as L, type PackageManagerInfo as P, type RuntimeInfo as R, type EcosystemRequest as a, type ParadigmInfo as b, type ParadigmRequest as c, api as d, getEcosystems as e, getPackageManagers as f, getCategories as g, getParadigms as h, getRuntimes as i, type LanguageCollectionRequest as j, type LanguageRequest as k, type PackageManagerRequest as l, type RuntimeRequest as m };
|