Nighttime Peanut Migrations

getting-to-philosophy

2.1.1 • Public • Published

npm version npm license npm download count

Getting to philosophy

As you may know, if you go to any page on Wikipedia and keep clicking on the first link of the page (ignoring meta links, links between parenthesis and the ones in italic), you will eventually reach the Philosophy article.

This (quite useless) node.js library allows you to query a Wikipedia page and get the list of the different pages that will get you to "Philosophy".

You're welcome.

Install

npm install --save getting-to-philosophy

Usage

start(page, callbackEach, callback)

  • page : the starting wikipedia page name
  • callbackEach : function called after each new page is reached
    • the page name is passed as a parameter to the function
  • callback : function called after start function ends
    • an array containing all the pages name is passed as a parameter to the callback function
var gettingToPhilosophy = require('getting-to-philosophy');

gettingToPhilosophy.start('Paris', function (pageName) {
    console.log(pageName)
}, function (path) {
    console.log(path);
});

install

npm i getting-to-philosophy

Downloadsweekly downloads

3

version

2.1.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability