cs-wiki
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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.

/cs-wiki/

    Package Sidebar

    Install

    npm i cs-wiki

    Weekly Downloads

    1

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    125 kB

    Total Files

    8

    Last publish

    Collaborators

    • buckldav