cs-wiki
v1.0.2
Published
A JSON form of Wikipedia's Glossary of Computer Science. Definition lookup and word of the day.
Downloads
5
Maintainers
Readme
CS Wiki
A JSON representation of terms and definitions from Wikipedia's Glossary of Computer Science, which information is available with a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Usage
Here are the objects and types available for import from this module.
// Entries scraped from Wikipedia's CS glossary
export type WikiEntry = {
term: string;
definitions: string[];
};
// An array of all the entries that have terms and definitions
export const csWiki: Array<WikiEntry>;
// Returns an entry from the csWiki based on a pseudo-random algorithm with today's date as the seed
export function getCSWordOfDay(): WikiEntry;
// Returns an entry if found (case insenstive), else returns undefined
export function getWikiEntryByTerm(term: string): WikiEntry | undefined;
Development
# Executes main.js which scrapes Wikipedia and stores the glossary in cs-wiki.json
npm run build
# Test functions in ./lib/* and index.ts
npm test
Both of the above commands get executed precommit with husky.