random-word-wikipedia

1.1.0 • Public • Published

random-word-wikipedia Node.js CI

Get random word from wikipedia random page

Install

$ npm install random-word-wikipedia

Usage

const randomWordWikipedia = require("random-word-wikipedia");

randomWordWikipedia().then(console.log);
//=> [ 'Saxifraga spathularis' ]

randomWordWikipedia("ja", 2).then(console.log);
//=> [ 'ジョン・イサーク・ブリケ', '月は闇夜に隠るが如く' ]

API

randomWordWikipedia([lang, n])

options

lang

Type: string
Default: en

wikipedia lang string.

n

Type: number 1 - 10
Default: 1

number of word.

CLI

$ npm install --global random-word-wikipedia
$ random-word-wikipedia --help

	Usage
	  $ random-word-wikipedia [lang]

	Options
	  -n 10 or less [Default: 1]

	Examples
	  $ random-word-wikipedia
		YuruYuri

	  $ random-word-wikipedia ja -n 4
		バダインジャラン砂漠
		ゆるゆり
		内野 (印西市)
		PAC-MAN 256

License

MIT © elzup

Package Sidebar

Install

npm i random-word-wikipedia

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

4.47 kB

Total Files

6

Last publish

Collaborators

  • elzup