dev-dict 0.0.4 → 0.1.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.
Files changed (39) hide show
  1. package/README.md +5 -10
  2. package/dist/common/index.d.ts +5 -0
  3. package/dist/common/index.d.ts.map +1 -0
  4. package/dist/dev-dict.min.js +2 -0
  5. package/dist/dev-dict.min.js.map +1 -0
  6. package/dist/index.d.ts +11 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +97 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/locales/index.d.ts +6 -0
  11. package/dist/locales/index.d.ts.map +1 -0
  12. package/dist/term-tags/backend.d.ts +9 -0
  13. package/dist/term-tags/backend.d.ts.map +1 -0
  14. package/dist/term-tags/frontend.d.ts +9 -0
  15. package/dist/term-tags/frontend.d.ts.map +1 -0
  16. package/dist/term-tags/index.d.ts +25 -0
  17. package/dist/term-tags/index.d.ts.map +1 -0
  18. package/dist/term-tags/opensource.d.ts +9 -0
  19. package/dist/term-tags/opensource.d.ts.map +1 -0
  20. package/dist/term-types/cms.d.ts +9 -0
  21. package/dist/term-types/cms.d.ts.map +1 -0
  22. package/dist/term-types/index.d.ts +18 -0
  23. package/dist/term-types/index.d.ts.map +1 -0
  24. package/dist/term-types/library.d.ts +9 -0
  25. package/dist/term-types/library.d.ts.map +1 -0
  26. package/dist/terms/index.d.ts +5 -0
  27. package/dist/terms/index.d.ts.map +1 -0
  28. package/dist/terms/react.d.ts +37 -0
  29. package/dist/terms/react.d.ts.map +1 -0
  30. package/dist/typings/index.d.ts +47 -0
  31. package/dist/typings/index.d.ts.map +1 -0
  32. package/dist/utils/index.d.ts +19 -0
  33. package/dist/utils/index.d.ts.map +1 -0
  34. package/package.json +40 -5
  35. package/CONTRIBUTING.md +0 -28
  36. package/index.js +0 -9
  37. package/schema.json +0 -15
  38. package/template.json +0 -19
  39. package/terms/typescript.json +0 -22
package/README.md CHANGED
@@ -1,23 +1,18 @@
1
1
  # dev-dict
2
2
 
3
- The Oxford dictionary of dev terms.
3
+ A collection of dev terms, with descriptions in multiple languages.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm i @_kyco/dev-dict
8
+ npm i dev-dict
9
9
  ```
10
10
 
11
11
  ## Usage
12
12
 
13
13
  ```typescript
14
- import devDict from '@_kyco/dev-dict`
14
+ import { getDict } from 'dev-dict`
15
15
 
16
- console.log(devDict.typescript.name)
17
-
18
- // OR
19
-
20
- import { dd_typescript } from '@_kyco/dev-dict`
21
-
22
- console.log(dd_typescript.name)
16
+ const dd = getDict()
17
+ console.log(dd.react.name)
23
18
  ```
@@ -0,0 +1,5 @@
1
+ export declare const MISC: {};
2
+ export declare const CONFIG: {
3
+ readonly DEFAULT_LOCALE: "en-GB";
4
+ };
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,IAAc,CAAA;AAE/B,eAAO,MAAM,MAAM;;CAET,CAAA"}
@@ -0,0 +1,2 @@
1
+ (function(o,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(o=typeof globalThis<"u"?globalThis:o||self,t(o.devdict={}))})(this,(function(o){"use strict";const t={EN_GB:"en-GB",DE_DE:"de-DE"},i={DEFAULT_LOCALE:t.EN_GB},d={id:"backend",name:{[t.EN_GB]:"Backend",[t.DE_DE]:"Backend"}},E={id:"frontend",name:{[t.EN_GB]:"Frontend",[t.DE_DE]:"Frontend"}},a={id:"opensource"},s={[d.id]:d,[E.id]:E,[a.id]:a},L={id:"cms"},T={id:"library",name:{[t.EN_GB]:"Library",[t.DE_DE]:"Bibliothek"}},l={id:"react",name:"React",type:[{[L.id]:L,[T.id]:T}.library],label:{[t.EN_GB]:"JavaScript Library",[t.DE_DE]:"JavaScript-Bibliothek"},description:{[t.EN_GB]:"A JavaScript library for building component-based user interfaces.",[t.DE_DE]:"Eine JavaScript-Bibliothek zum Erstellen komponentenbasierter Benutzeroberflächen."},tags:[s.frontend,s.backend],links:{website:"https://react.dev"}},D={[l.id]:l},m=({label:e,locale:n=i.DEFAULT_LOCALE})=>e[n]||e[i.DEFAULT_LOCALE],b=({description:e,locale:n=i.DEFAULT_LOCALE})=>e[n]||e[i.DEFAULT_LOCALE],p=({tag:e,locale:n=i.DEFAULT_LOCALE})=>({id:e.id,name:e.name[n]||e.name[i.DEFAULT_LOCALE]}),u=({term:e,locale:n=i.DEFAULT_LOCALE})=>({id:e.id,name:e.name[n]||e.name[i.DEFAULT_LOCALE]}),_=({id:e,locale:n=i.DEFAULT_LOCALE})=>{const r=D[e];return r?{...r,label:m({label:r.label,locale:n}),description:b({description:r.description,locale:n}),type:r.type.map(c=>u({term:c,locale:n})),tags:r.tags.map(c=>p({tag:c,locale:n}))}:null},f=({locale:e=i.DEFAULT_LOCALE}={locale:i.DEFAULT_LOCALE})=>{const n={};for(const[r,c]of Object.entries(D)){const A=_({id:c.id,locale:e});A&&(n[r]=A)}return n};o.getDict=f,o.getTerm=_,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})}));
2
+ //# sourceMappingURL=dev-dict.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-dict.min.js","sources":["../src/locales/index.ts","../src/common/index.ts","../src/term-tags/backend.ts","../src/term-tags/frontend.ts","../src/term-tags/opensource.ts","../src/term-tags/index.ts","../src/term-types/cms.ts","../src/term-types/library.ts","../src/terms/react.ts","../src/term-types/index.ts","../src/terms/index.ts","../src/utils/index.ts","../src/index.ts"],"sourcesContent":["export const LOCALE = {\n EN_GB: 'en-GB',\n DE_DE: 'de-DE',\n} as const\n\nexport type TLocale = (typeof LOCALE)[keyof typeof LOCALE]\n","import { LOCALE } from '../locales'\n\nexport const MISC = {} as const\n\nexport const CONFIG = {\n DEFAULT_LOCALE: LOCALE.EN_GB,\n} as const\n","import { LOCALE } from '../locales'\nimport type { TTermTag } from '../typings'\n\nexport default {\n id: 'backend',\n\n name: {\n [LOCALE.EN_GB]: `Backend`,\n [LOCALE.DE_DE]: `Backend`,\n },\n} as const satisfies TTermTag\n","import { LOCALE } from '../locales'\nimport type { TTermTag } from '../typings'\n\nexport default {\n id: 'frontend',\n\n name: {\n [LOCALE.EN_GB]: `Frontend`,\n [LOCALE.DE_DE]: `Frontend`,\n },\n} as const satisfies TTermTag\n","import { LOCALE } from '../locales'\nimport type { TTermTag } from '../typings'\n\nexport default {\n id: 'opensource',\n\n name: {\n [LOCALE.EN_GB]: `Open Source`,\n [LOCALE.DE_DE]: `Open Source`,\n },\n} as const satisfies TTermTag\n","import backend from './backend'\nimport frontend from './frontend'\nimport opensource from './opensource'\n\nexport const TERM_TAGS = {\n [backend.id]: backend,\n [frontend.id]: frontend,\n [opensource.id]: opensource,\n} as const\n\nexport type TTermTags = (typeof TERM_TAGS)[keyof typeof TERM_TAGS]\n","import { LOCALE } from '../locales'\nimport type { TTermType } from '../typings'\n\nexport default {\n id: 'cms',\n\n name: {\n [LOCALE.EN_GB]: `Content Management System`,\n [LOCALE.DE_DE]: `Content-Management-System`,\n },\n} as const satisfies TTermType\n","import { LOCALE } from '../locales'\nimport type { TTermType } from '../typings'\n\nexport default {\n id: 'library',\n\n name: {\n [LOCALE.EN_GB]: `Library`,\n [LOCALE.DE_DE]: `Bibliothek`,\n },\n} as const satisfies TTermType\n","import { LOCALE } from '../locales'\nimport { TERM_TAGS } from '../term-tags'\nimport { TERM_TYPES } from '../term-types'\nimport type { TTerm } from '../typings'\n\nexport default {\n id: 'react',\n\n name: 'React',\n\n type: [TERM_TYPES.library],\n\n label: {\n [LOCALE.EN_GB]: `JavaScript Library`,\n [LOCALE.DE_DE]: `JavaScript-Bibliothek`,\n },\n\n description: {\n [LOCALE.EN_GB]: `A JavaScript library for building component-based user interfaces.`,\n [LOCALE.DE_DE]: `Eine JavaScript-Bibliothek zum Erstellen komponentenbasierter Benutzeroberflächen.`,\n },\n\n tags: [TERM_TAGS.frontend, TERM_TAGS.backend],\n\n links: {\n website: 'https://react.dev',\n },\n} as const satisfies TTerm\n","import cms from './cms'\nimport library from './library'\n\nexport const TERM_TYPES = {\n [cms.id]: cms,\n [library.id]: library,\n} as const\n\nexport type TTermTypes = (typeof TERM_TYPES)[keyof typeof TERM_TYPES]\n","import type { TTerm } from '../typings'\nimport react from './react'\n\nexport const TERMS: Record<string, TTerm> = {\n [react.id]: react,\n} as const\n\nexport type TTerms = (typeof TERMS)[keyof typeof TERMS]\nexport type TTermId = keyof typeof TERMS\n","import { CONFIG } from '../common'\nimport type { TLocale } from '../locales'\nimport type {\n TTermDescription,\n TTermLabel,\n TTermTag,\n TTermTagLocalized,\n TTermType,\n TTermTypeLocalized,\n} from '../typings'\n\nexport const getLabelLocalized = ({\n label,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n label: TTermLabel\n locale?: TLocale\n}): string => {\n return label[locale] || label[CONFIG.DEFAULT_LOCALE]\n}\n\nexport const getDescriptionLocalized = ({\n description,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n description: TTermDescription\n locale?: TLocale\n}): string => {\n return description[locale] || description[CONFIG.DEFAULT_LOCALE]\n}\n\nexport const getTermTagLocalized = ({\n tag,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n tag: TTermTag\n locale?: TLocale\n}): TTermTagLocalized => {\n return {\n id: tag.id,\n name: tag.name[locale] || tag.name[CONFIG.DEFAULT_LOCALE],\n }\n}\n\nexport const getTermTypeLocalized = ({\n term,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n term: TTermType\n locale?: TLocale\n}): TTermTypeLocalized => {\n return {\n id: term.id,\n name: term.name[locale] || term.name[CONFIG.DEFAULT_LOCALE],\n }\n}\n","import { CONFIG } from './common'\nimport type { TLocale } from './locales'\nimport { TERMS } from './terms'\nimport type { TTermId } from './terms'\nimport type { TDevDict, TTermLocalized } from './typings'\nimport { getDescriptionLocalized, getLabelLocalized, getTermTagLocalized, getTermTypeLocalized } from './utils'\n\nexport const getTerm = ({\n id,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n id: TTermId\n locale?: TLocale\n}): TTermLocalized | null => {\n const term = TERMS[id]\n\n if (!term) {\n return null\n }\n\n return {\n ...term,\n label: getLabelLocalized({ label: term.label, locale }),\n description: getDescriptionLocalized({ description: term.description, locale }),\n type: term.type.map((value) => getTermTypeLocalized({ term: value, locale })),\n tags: term.tags.map((value) => getTermTagLocalized({ tag: value, locale })),\n }\n}\n\nexport const getDict = (\n {\n locale = CONFIG.DEFAULT_LOCALE,\n }: {\n locale?: TLocale\n } = { locale: CONFIG.DEFAULT_LOCALE },\n): TDevDict => {\n const dict: TDevDict = {}\n\n for (const [key, term] of Object.entries(TERMS)) {\n const localizedTerm = getTerm({ id: term.id, locale })\n if (localizedTerm) {\n dict[key as TTermId] = localizedTerm\n }\n }\n\n return dict\n}\n"],"names":["LOCALE","CONFIG","backend","frontend","opensource","TERM_TAGS","cms","library","react","TERMS","getLabelLocalized","label","locale","getDescriptionLocalized","description","getTermTagLocalized","tag","getTermTypeLocalized","term","getTerm","id","value","getDict","dict","key","localizedTerm"],"mappings":"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"}
@@ -0,0 +1,11 @@
1
+ import type { TLocale } from './locales';
2
+ import type { TTermId } from './terms';
3
+ import type { TDevDict, TTermLocalized } from './typings';
4
+ export declare const getTerm: ({ id, locale, }: {
5
+ id: TTermId;
6
+ locale?: TLocale;
7
+ }) => TTermLocalized | null;
8
+ export declare const getDict: ({ locale, }?: {
9
+ locale?: TLocale;
10
+ }) => TDevDict;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAGzD,eAAO,MAAM,OAAO,GAAI,iBAGrB;IACD,EAAE,EAAE,OAAO,CAAA;IACX,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAG,cAAc,GAAG,IAcpB,CAAA;AAED,eAAO,MAAM,OAAO,GAClB,cAEG;IACD,MAAM,CAAC,EAAE,OAAO,CAAA;CACmB,KACpC,QAWF,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,97 @@
1
+ const t = {
2
+ EN_GB: "en-GB",
3
+ DE_DE: "de-DE"
4
+ }, r = {
5
+ DEFAULT_LOCALE: t.EN_GB
6
+ }, o = {
7
+ id: "backend",
8
+ name: {
9
+ [t.EN_GB]: "Backend",
10
+ [t.DE_DE]: "Backend"
11
+ }
12
+ }, a = {
13
+ id: "frontend",
14
+ name: {
15
+ [t.EN_GB]: "Frontend",
16
+ [t.DE_DE]: "Frontend"
17
+ }
18
+ }, L = {
19
+ id: "opensource"
20
+ }, d = {
21
+ [o.id]: o,
22
+ [a.id]: a,
23
+ [L.id]: L
24
+ }, s = {
25
+ id: "cms"
26
+ }, A = {
27
+ id: "library",
28
+ name: {
29
+ [t.EN_GB]: "Library",
30
+ [t.DE_DE]: "Bibliothek"
31
+ }
32
+ }, l = {
33
+ [s.id]: s,
34
+ [A.id]: A
35
+ }, D = {
36
+ id: "react",
37
+ name: "React",
38
+ type: [l.library],
39
+ label: {
40
+ [t.EN_GB]: "JavaScript Library",
41
+ [t.DE_DE]: "JavaScript-Bibliothek"
42
+ },
43
+ description: {
44
+ [t.EN_GB]: "A JavaScript library for building component-based user interfaces.",
45
+ [t.DE_DE]: "Eine JavaScript-Bibliothek zum Erstellen komponentenbasierter Benutzeroberflächen."
46
+ },
47
+ tags: [d.frontend, d.backend],
48
+ links: {
49
+ website: "https://react.dev"
50
+ }
51
+ }, _ = {
52
+ [D.id]: D
53
+ }, T = ({
54
+ label: e,
55
+ locale: n = r.DEFAULT_LOCALE
56
+ }) => e[n] || e[r.DEFAULT_LOCALE], b = ({
57
+ description: e,
58
+ locale: n = r.DEFAULT_LOCALE
59
+ }) => e[n] || e[r.DEFAULT_LOCALE], m = ({
60
+ tag: e,
61
+ locale: n = r.DEFAULT_LOCALE
62
+ }) => ({
63
+ id: e.id,
64
+ name: e.name[n] || e.name[r.DEFAULT_LOCALE]
65
+ }), p = ({
66
+ term: e,
67
+ locale: n = r.DEFAULT_LOCALE
68
+ }) => ({
69
+ id: e.id,
70
+ name: e.name[n] || e.name[r.DEFAULT_LOCALE]
71
+ }), F = ({
72
+ id: e,
73
+ locale: n = r.DEFAULT_LOCALE
74
+ }) => {
75
+ const i = _[e];
76
+ return i ? {
77
+ ...i,
78
+ label: T({ label: i.label, locale: n }),
79
+ description: b({ description: i.description, locale: n }),
80
+ type: i.type.map((c) => p({ term: c, locale: n })),
81
+ tags: i.tags.map((c) => m({ tag: c, locale: n }))
82
+ } : null;
83
+ }, O = ({
84
+ locale: e = r.DEFAULT_LOCALE
85
+ } = { locale: r.DEFAULT_LOCALE }) => {
86
+ const n = {};
87
+ for (const [i, c] of Object.entries(_)) {
88
+ const E = F({ id: c.id, locale: e });
89
+ E && (n[i] = E);
90
+ }
91
+ return n;
92
+ };
93
+ export {
94
+ O as getDict,
95
+ F as getTerm
96
+ };
97
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/locales/index.ts","../src/common/index.ts","../src/term-tags/backend.ts","../src/term-tags/frontend.ts","../src/term-tags/opensource.ts","../src/term-tags/index.ts","../src/term-types/cms.ts","../src/term-types/library.ts","../src/term-types/index.ts","../src/terms/react.ts","../src/terms/index.ts","../src/utils/index.ts","../src/index.ts"],"sourcesContent":["export const LOCALE = {\n EN_GB: 'en-GB',\n DE_DE: 'de-DE',\n} as const\n\nexport type TLocale = (typeof LOCALE)[keyof typeof LOCALE]\n","import { LOCALE } from '../locales'\n\nexport const MISC = {} as const\n\nexport const CONFIG = {\n DEFAULT_LOCALE: LOCALE.EN_GB,\n} as const\n","import { LOCALE } from '../locales'\nimport type { TTermTag } from '../typings'\n\nexport default {\n id: 'backend',\n\n name: {\n [LOCALE.EN_GB]: `Backend`,\n [LOCALE.DE_DE]: `Backend`,\n },\n} as const satisfies TTermTag\n","import { LOCALE } from '../locales'\nimport type { TTermTag } from '../typings'\n\nexport default {\n id: 'frontend',\n\n name: {\n [LOCALE.EN_GB]: `Frontend`,\n [LOCALE.DE_DE]: `Frontend`,\n },\n} as const satisfies TTermTag\n","import { LOCALE } from '../locales'\nimport type { TTermTag } from '../typings'\n\nexport default {\n id: 'opensource',\n\n name: {\n [LOCALE.EN_GB]: `Open Source`,\n [LOCALE.DE_DE]: `Open Source`,\n },\n} as const satisfies TTermTag\n","import backend from './backend'\nimport frontend from './frontend'\nimport opensource from './opensource'\n\nexport const TERM_TAGS = {\n [backend.id]: backend,\n [frontend.id]: frontend,\n [opensource.id]: opensource,\n} as const\n\nexport type TTermTags = (typeof TERM_TAGS)[keyof typeof TERM_TAGS]\n","import { LOCALE } from '../locales'\nimport type { TTermType } from '../typings'\n\nexport default {\n id: 'cms',\n\n name: {\n [LOCALE.EN_GB]: `Content Management System`,\n [LOCALE.DE_DE]: `Content-Management-System`,\n },\n} as const satisfies TTermType\n","import { LOCALE } from '../locales'\nimport type { TTermType } from '../typings'\n\nexport default {\n id: 'library',\n\n name: {\n [LOCALE.EN_GB]: `Library`,\n [LOCALE.DE_DE]: `Bibliothek`,\n },\n} as const satisfies TTermType\n","import cms from './cms'\nimport library from './library'\n\nexport const TERM_TYPES = {\n [cms.id]: cms,\n [library.id]: library,\n} as const\n\nexport type TTermTypes = (typeof TERM_TYPES)[keyof typeof TERM_TYPES]\n","import { LOCALE } from '../locales'\nimport { TERM_TAGS } from '../term-tags'\nimport { TERM_TYPES } from '../term-types'\nimport type { TTerm } from '../typings'\n\nexport default {\n id: 'react',\n\n name: 'React',\n\n type: [TERM_TYPES.library],\n\n label: {\n [LOCALE.EN_GB]: `JavaScript Library`,\n [LOCALE.DE_DE]: `JavaScript-Bibliothek`,\n },\n\n description: {\n [LOCALE.EN_GB]: `A JavaScript library for building component-based user interfaces.`,\n [LOCALE.DE_DE]: `Eine JavaScript-Bibliothek zum Erstellen komponentenbasierter Benutzeroberflächen.`,\n },\n\n tags: [TERM_TAGS.frontend, TERM_TAGS.backend],\n\n links: {\n website: 'https://react.dev',\n },\n} as const satisfies TTerm\n","import type { TTerm } from '../typings'\nimport react from './react'\n\nexport const TERMS: Record<string, TTerm> = {\n [react.id]: react,\n} as const\n\nexport type TTerms = (typeof TERMS)[keyof typeof TERMS]\nexport type TTermId = keyof typeof TERMS\n","import { CONFIG } from '../common'\nimport type { TLocale } from '../locales'\nimport type {\n TTermDescription,\n TTermLabel,\n TTermTag,\n TTermTagLocalized,\n TTermType,\n TTermTypeLocalized,\n} from '../typings'\n\nexport const getLabelLocalized = ({\n label,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n label: TTermLabel\n locale?: TLocale\n}): string => {\n return label[locale] || label[CONFIG.DEFAULT_LOCALE]\n}\n\nexport const getDescriptionLocalized = ({\n description,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n description: TTermDescription\n locale?: TLocale\n}): string => {\n return description[locale] || description[CONFIG.DEFAULT_LOCALE]\n}\n\nexport const getTermTagLocalized = ({\n tag,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n tag: TTermTag\n locale?: TLocale\n}): TTermTagLocalized => {\n return {\n id: tag.id,\n name: tag.name[locale] || tag.name[CONFIG.DEFAULT_LOCALE],\n }\n}\n\nexport const getTermTypeLocalized = ({\n term,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n term: TTermType\n locale?: TLocale\n}): TTermTypeLocalized => {\n return {\n id: term.id,\n name: term.name[locale] || term.name[CONFIG.DEFAULT_LOCALE],\n }\n}\n","import { CONFIG } from './common'\nimport type { TLocale } from './locales'\nimport { TERMS } from './terms'\nimport type { TTermId } from './terms'\nimport type { TDevDict, TTermLocalized } from './typings'\nimport { getDescriptionLocalized, getLabelLocalized, getTermTagLocalized, getTermTypeLocalized } from './utils'\n\nexport const getTerm = ({\n id,\n locale = CONFIG.DEFAULT_LOCALE,\n}: {\n id: TTermId\n locale?: TLocale\n}): TTermLocalized | null => {\n const term = TERMS[id]\n\n if (!term) {\n return null\n }\n\n return {\n ...term,\n label: getLabelLocalized({ label: term.label, locale }),\n description: getDescriptionLocalized({ description: term.description, locale }),\n type: term.type.map((value) => getTermTypeLocalized({ term: value, locale })),\n tags: term.tags.map((value) => getTermTagLocalized({ tag: value, locale })),\n }\n}\n\nexport const getDict = (\n {\n locale = CONFIG.DEFAULT_LOCALE,\n }: {\n locale?: TLocale\n } = { locale: CONFIG.DEFAULT_LOCALE },\n): TDevDict => {\n const dict: TDevDict = {}\n\n for (const [key, term] of Object.entries(TERMS)) {\n const localizedTerm = getTerm({ id: term.id, locale })\n if (localizedTerm) {\n dict[key as TTermId] = localizedTerm\n }\n }\n\n return dict\n}\n"],"names":["LOCALE","CONFIG","backend","frontend","opensource","TERM_TAGS","cms","library","TERM_TYPES","react","TERMS","getLabelLocalized","label","locale","getDescriptionLocalized","description","getTermTagLocalized","tag","getTermTypeLocalized","term","getTerm","id","value","getDict","dict","key","localizedTerm"],"mappings":"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"}
@@ -0,0 +1,6 @@
1
+ export declare const LOCALE: {
2
+ readonly EN_GB: "en-GB";
3
+ readonly DE_DE: "de-DE";
4
+ };
5
+ export type TLocale = (typeof LOCALE)[keyof typeof LOCALE];
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/locales/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;CAGT,CAAA;AAEV,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,CAAA"}
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ readonly id: "backend";
3
+ readonly name: {
4
+ readonly "en-GB": "Backend";
5
+ readonly "de-DE": "Backend";
6
+ };
7
+ };
8
+ export default _default;
9
+ //# sourceMappingURL=backend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../src/term-tags/backend.ts"],"names":[],"mappings":";;;;;;;AAGA,wBAO6B"}
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ readonly id: "frontend";
3
+ readonly name: {
4
+ readonly "en-GB": "Frontend";
5
+ readonly "de-DE": "Frontend";
6
+ };
7
+ };
8
+ export default _default;
9
+ //# sourceMappingURL=frontend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontend.d.ts","sourceRoot":"","sources":["../../src/term-tags/frontend.ts"],"names":[],"mappings":";;;;;;;AAGA,wBAO6B"}
@@ -0,0 +1,25 @@
1
+ export declare const TERM_TAGS: {
2
+ readonly backend: {
3
+ readonly id: "backend";
4
+ readonly name: {
5
+ readonly "en-GB": "Backend";
6
+ readonly "de-DE": "Backend";
7
+ };
8
+ };
9
+ readonly frontend: {
10
+ readonly id: "frontend";
11
+ readonly name: {
12
+ readonly "en-GB": "Frontend";
13
+ readonly "de-DE": "Frontend";
14
+ };
15
+ };
16
+ readonly opensource: {
17
+ readonly id: "opensource";
18
+ readonly name: {
19
+ readonly "en-GB": "Open Source";
20
+ readonly "de-DE": "Open Source";
21
+ };
22
+ };
23
+ };
24
+ export type TTermTags = (typeof TERM_TAGS)[keyof typeof TERM_TAGS];
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/term-tags/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;CAIZ,CAAA;AAEV,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAA"}
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ readonly id: "opensource";
3
+ readonly name: {
4
+ readonly "en-GB": "Open Source";
5
+ readonly "de-DE": "Open Source";
6
+ };
7
+ };
8
+ export default _default;
9
+ //# sourceMappingURL=opensource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opensource.d.ts","sourceRoot":"","sources":["../../src/term-tags/opensource.ts"],"names":[],"mappings":";;;;;;;AAGA,wBAO6B"}
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ readonly id: "cms";
3
+ readonly name: {
4
+ readonly "en-GB": "Content Management System";
5
+ readonly "de-DE": "Content-Management-System";
6
+ };
7
+ };
8
+ export default _default;
9
+ //# sourceMappingURL=cms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cms.d.ts","sourceRoot":"","sources":["../../src/term-types/cms.ts"],"names":[],"mappings":";;;;;;;AAGA,wBAO8B"}
@@ -0,0 +1,18 @@
1
+ export declare const TERM_TYPES: {
2
+ readonly cms: {
3
+ readonly id: "cms";
4
+ readonly name: {
5
+ readonly "en-GB": "Content Management System";
6
+ readonly "de-DE": "Content-Management-System";
7
+ };
8
+ };
9
+ readonly library: {
10
+ readonly id: "library";
11
+ readonly name: {
12
+ readonly "en-GB": "Library";
13
+ readonly "de-DE": "Bibliothek";
14
+ };
15
+ };
16
+ };
17
+ export type TTermTypes = (typeof TERM_TYPES)[keyof typeof TERM_TYPES];
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/term-types/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;CAGb,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAA"}
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ readonly id: "library";
3
+ readonly name: {
4
+ readonly "en-GB": "Library";
5
+ readonly "de-DE": "Bibliothek";
6
+ };
7
+ };
8
+ export default _default;
9
+ //# sourceMappingURL=library.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../src/term-types/library.ts"],"names":[],"mappings":";;;;;;;AAGA,wBAO8B"}
@@ -0,0 +1,5 @@
1
+ import type { TTerm } from '../typings';
2
+ export declare const TERMS: Record<string, TTerm>;
3
+ export type TTerms = (typeof TERMS)[keyof typeof TERMS];
4
+ export type TTermId = keyof typeof TERMS;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/terms/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAGvC,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAE9B,CAAA;AAEV,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,OAAO,KAAK,CAAC,CAAA;AACvD,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,KAAK,CAAA"}
@@ -0,0 +1,37 @@
1
+ declare const _default: {
2
+ readonly id: "react";
3
+ readonly name: "React";
4
+ readonly type: [{
5
+ readonly id: "library";
6
+ readonly name: {
7
+ readonly "en-GB": "Library";
8
+ readonly "de-DE": "Bibliothek";
9
+ };
10
+ }];
11
+ readonly label: {
12
+ readonly "en-GB": "JavaScript Library";
13
+ readonly "de-DE": "JavaScript-Bibliothek";
14
+ };
15
+ readonly description: {
16
+ readonly "en-GB": "A JavaScript library for building component-based user interfaces.";
17
+ readonly "de-DE": "Eine JavaScript-Bibliothek zum Erstellen komponentenbasierter Benutzeroberflächen.";
18
+ };
19
+ readonly tags: [{
20
+ readonly id: "frontend";
21
+ readonly name: {
22
+ readonly "en-GB": "Frontend";
23
+ readonly "de-DE": "Frontend";
24
+ };
25
+ }, {
26
+ readonly id: "backend";
27
+ readonly name: {
28
+ readonly "en-GB": "Backend";
29
+ readonly "de-DE": "Backend";
30
+ };
31
+ }];
32
+ readonly links: {
33
+ readonly website: "https://react.dev";
34
+ };
35
+ };
36
+ export default _default;
37
+ //# sourceMappingURL=react.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/terms/react.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBAsB0B"}
@@ -0,0 +1,47 @@
1
+ import { CONFIG } from '../common';
2
+ import type { TLocale } from '../locales';
3
+ import type { TTermTags } from '../term-tags';
4
+ import type { TTermTypes } from '../term-types';
5
+ import type { TTermId } from '../terms';
6
+ export type LocaleRecord = {
7
+ [CONFIG.DEFAULT_LOCALE]: string;
8
+ } & Partial<Record<Exclude<TLocale, typeof CONFIG.DEFAULT_LOCALE>, string>>;
9
+ export type TLinkType = 'website' | 'github' | 'npm';
10
+ export type LinksRecord = {
11
+ website: string;
12
+ } & Partial<Record<Exclude<TLinkType, 'website'>, string>>;
13
+ export type TTermLabel = Record<TLocale, string>;
14
+ export type TTermDescription = Record<TLocale, string>;
15
+ export type TTermType = {
16
+ id: string;
17
+ name: LocaleRecord;
18
+ };
19
+ export type TTermTypeLocalized = {
20
+ id: string;
21
+ name: string;
22
+ };
23
+ export type TTermTag = {
24
+ id: string;
25
+ name: LocaleRecord;
26
+ };
27
+ export type TTermTagLocalized = {
28
+ id: string;
29
+ name: string;
30
+ };
31
+ export type TTerm = {
32
+ id: string;
33
+ name: string;
34
+ type: TTermTypes[];
35
+ label: TTermLabel;
36
+ description: TTermDescription;
37
+ tags: TTermTags[];
38
+ links?: LinksRecord;
39
+ };
40
+ export type TTermLocalized = Omit<TTerm, 'label' | 'description' | 'type' | 'tags'> & {
41
+ label: string;
42
+ description: string;
43
+ type: TTermTypeLocalized[];
44
+ tags: TTermTagLocalized[];
45
+ };
46
+ export type TDevDict = Record<TTermId, TTermLocalized>;
47
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/typings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAEvC,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAChC,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,MAAM,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;AAE3E,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,KAAK,CAAA;AAEpD,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAA;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;AAE1D,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;AAEhD,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;AAEtD,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,YAAY,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,YAAY,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,UAAU,EAAE,CAAA;IAClB,KAAK,EAAE,UAAU,CAAA;IACjB,WAAW,EAAE,gBAAgB,CAAA;IAC7B,IAAI,EAAE,SAAS,EAAE,CAAA;IACjB,KAAK,CAAC,EAAE,WAAW,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC,GAAG;IACpF,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,kBAAkB,EAAE,CAAA;IAC1B,IAAI,EAAE,iBAAiB,EAAE,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC,CAAA"}
@@ -0,0 +1,19 @@
1
+ import type { TLocale } from '../locales';
2
+ import type { TTermDescription, TTermLabel, TTermTag, TTermTagLocalized, TTermType, TTermTypeLocalized } from '../typings';
3
+ export declare const getLabelLocalized: ({ label, locale, }: {
4
+ label: TTermLabel;
5
+ locale?: TLocale;
6
+ }) => string;
7
+ export declare const getDescriptionLocalized: ({ description, locale, }: {
8
+ description: TTermDescription;
9
+ locale?: TLocale;
10
+ }) => string;
11
+ export declare const getTermTagLocalized: ({ tag, locale, }: {
12
+ tag: TTermTag;
13
+ locale?: TLocale;
14
+ }) => TTermTagLocalized;
15
+ export declare const getTermTypeLocalized: ({ term, locale, }: {
16
+ term: TTermType;
17
+ locale?: TLocale;
18
+ }) => TTermTypeLocalized;
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EACnB,MAAM,YAAY,CAAA;AAEnB,eAAO,MAAM,iBAAiB,GAAI,oBAG/B;IACD,KAAK,EAAE,UAAU,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAG,MAEH,CAAA;AAED,eAAO,MAAM,uBAAuB,GAAI,0BAGrC;IACD,WAAW,EAAE,gBAAgB,CAAA;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAG,MAEH,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,kBAGjC;IACD,GAAG,EAAE,QAAQ,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAG,iBAKH,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,mBAGlC;IACD,IAAI,EAAE,SAAS,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAG,kBAKH,CAAA"}
package/package.json CHANGED
@@ -1,19 +1,54 @@
1
1
  {
2
2
  "name": "dev-dict",
3
- "version": "0.0.4",
4
- "description": "The Oxford dictionary of dev terms",
5
- "main": "index.js",
3
+ "version": "0.1.0",
4
+ "description": "A collection of dev terms, with descriptions in multiple languages.",
6
5
  "scripts": {
6
+ "build": "vite build && tsc --emitDeclarationOnly --outDir dist",
7
+ "prepublishOnly": "npm run build",
7
8
  "test": "echo \"This project does not have any tests which can be run yet...\""
8
9
  },
9
10
  "repository": {
10
11
  "type": "git",
11
12
  "url": "git+https://github.com/kyco/dev-dict.git"
12
13
  },
14
+ "publishConfig": {
15
+ "provenance": true
16
+ },
13
17
  "author": "Cornelius Weidmann <cornelius@kyco.io> (https://kyco.io)",
14
18
  "license": "MIT",
15
19
  "bugs": {
16
20
  "url": "https://github.com/kyco/dev-dict/issues"
17
21
  },
18
- "homepage": "https://github.com/kyco/dev-dict#readme"
19
- }
22
+ "homepage": "https://github.com/kyco/dev-dict#readme",
23
+ "type": "module",
24
+ "main": "./dist/index.js",
25
+ "unpkg": "./dist/dev-dict.min.js",
26
+ "module": "./dist/index.js",
27
+ "types": "./dist/index.d.ts",
28
+ "exports": {
29
+ ".": {
30
+ "import": "./dist/index.js"
31
+ }
32
+ },
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "devDependencies": {
37
+ "@eslint/js": "^9.39.1",
38
+ "@eslint/json": "^0.14.0",
39
+ "@ianvs/prettier-plugin-sort-imports": "^4.7.0",
40
+ "@semantic-release/changelog": "^6.0.3",
41
+ "@semantic-release/git": "^10.0.1",
42
+ "@semantic-release/github": "^12.0.2",
43
+ "@semantic-release/npm": "^13.1.1",
44
+ "@types/node": "^24.10.0",
45
+ "conventional-changelog-conventionalcommits": "^9.1.0",
46
+ "eslint": "^9.39.1",
47
+ "globals": "^16.5.0",
48
+ "prettier": "^3.6.2",
49
+ "semantic-release": "^25.0.2",
50
+ "typescript": "^5.9.3",
51
+ "typescript-eslint": "^8.46.3",
52
+ "vite": "^7.2.2"
53
+ }
54
+ }
package/CONTRIBUTING.md DELETED
@@ -1,28 +0,0 @@
1
- # Contributing to dev-dict
2
-
3
- Thank you for contributing! This project is an open developer dictionary. Each term is a separate JSON file under `terms/`.
4
-
5
- ## Adding a New Term
6
-
7
- 1. Copy `template.json` to a new file in `terms/`, e.g.:
8
-
9
- ```bash
10
- cp template.json terms/myterm.json
11
- ```
12
-
13
- 2. Fill in the fields:
14
-
15
- - id → unique identifier (e.g., REACT)
16
- - name → display name
17
- - type → library, runtime, concept, methodology, etc.
18
- - label → short human-readable description
19
- - description → one-sentence definition
20
- - Optional fields: tags, aka, examples, related, links, logo, color
21
-
22
- 3. Save and submit a Pull Request.
23
-
24
- ## Schema Versioning
25
-
26
- Each term JSON includes a schemaVersion field. Do not change it unless updating the schema intentionally.
27
-
28
- Current schema version: 1.0.0
package/index.js DELETED
@@ -1,9 +0,0 @@
1
- import typescript from './terms/typescript.json' assert { type: 'json' }
2
-
3
- export const dd__typescript = typescript
4
-
5
- const devDict = {
6
- typescript
7
- }
8
-
9
- export default devDict
package/schema.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "version": "0.0.1",
3
- "description": "Default schema for dev-dict terms",
4
- "fields": {
5
- "schemaVersion": "Specifies which schema version this file conforms to",
6
- "id": "Unique identifier (e.g., typescript, react, i18n)",
7
- "name": "Display name of the term",
8
- "type": "Category of the term (e.g., language, library, framework, runtime, concept, methodology)",
9
- "label": "Short descriptor for the term",
10
- "description": "One or two sentence definition, usually from the official source",
11
- "tags": "Array of related keywords",
12
- "links": "Object with references (website, docs, GitHub, Wikipedia, etc.)",
13
- "logo": "Object of logo URL and accent color hex"
14
- }
15
- }
package/template.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "schemaVersion": "0.0.1",
3
- "id": "",
4
- "name": "",
5
- "type": "",
6
- "label": "",
7
- "description": "",
8
- "tags": [],
9
- "links": {
10
- "website": "",
11
- "github": "",
12
- "npm": "",
13
- "wikipedia": ""
14
- },
15
- "logo": {
16
- "url": "",
17
- "hex": ""
18
- }
19
- }
@@ -1,22 +0,0 @@
1
- {
2
- "schemaVersion": "0.0.1",
3
- "id": "typescript",
4
- "name": "TypeScript",
5
- "type": "language",
6
- "label": "High-Level Programming Language",
7
- "description": "TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.",
8
- "tags": [
9
- "frontend",
10
- "backend"
11
- ],
12
- "links": {
13
- "website": "https://www.typescriptlang.org",
14
- "github": "https://github.com/microsoft/TypeScript",
15
- "npm": "https://www.npmjs.com/package/typescript",
16
- "wikipedia": "https://en.wikipedia.org/wiki/TypeScript"
17
- },
18
- "logo": {
19
- "url": "https://cdn.simpleicons.org/typescript?viewbox=auto",
20
- "hex": "#3178C6"
21
- }
22
- }