wikipediajs
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "wikipediajs", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Wikipedia js api wrapper", | ||
"main": "src/index.js", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
@@ -10,3 +10,5 @@ "test": "mocha src/wiki.spec.js", | ||
"travis-deploy-once": "travis-deploy-once", | ||
"commit": "git-cz" | ||
"commit": "git-cz", | ||
"prebuild": "rimraf dist", | ||
"build": "babel --out-dir dist --ignore *.spec.js src" | ||
}, | ||
@@ -22,2 +24,6 @@ "repository": { | ||
], | ||
"files": [ | ||
"dist", | ||
"README.md" | ||
], | ||
"author": "Máximo De León <maximodleon@gmail.com>", | ||
@@ -34,6 +40,19 @@ "license": "MIT", | ||
"devDependencies": { | ||
"babel-cli": "6.26.0", | ||
"babel-plugin-transform-object-rest-spread": "6.26.0", | ||
"babel-preset-es2015": "6.24.1", | ||
"babel-preset-stage-2": "6.24.1", | ||
"chai": "4.1.2", | ||
"commitizen": "2.9.6", | ||
"cz-conventional-changelog": "2.1.0", | ||
"eslint": "4.16.0", | ||
"eslint-config-standard": "11.0.0-beta.0", | ||
"eslint-plugin-import": "2.8.0", | ||
"eslint-plugin-node": "5.2.1", | ||
"eslint-plugin-prettier": "2.5.0", | ||
"eslint-plugin-promise": "3.6.0", | ||
"eslint-plugin-standard": "3.0.1", | ||
"mocha": "4.1.0", | ||
"prettier": "1.10.2", | ||
"rimraf": "2.6.2", | ||
"semantic-release": "^12.2.2", | ||
@@ -40,0 +59,0 @@ "travis-deploy-once": "^4.3.2" |
@@ -5,3 +5,48 @@ # wikipediajs | ||
[![npm](https://img.shields.io/npm/v/wikipediajs.svg?style=flat-square)]() | ||
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) | ||
Promise-based wikipedia API wrapper | ||
# Table of contents | ||
* [Installation](#installation) | ||
* [Features](#features) | ||
* [Usage](#usage) | ||
# Installation | ||
Install via [npm](https://www.npmjs.com/package/wikipediajs) | ||
``` | ||
$ npm install wikipediajs | ||
``` | ||
# Features | ||
* Search wikipedia articles in any language | ||
* Get a random article | ||
* Get feed for Picture of the day, featured article or 'on this day' articles | ||
# Usage | ||
* import module | ||
```js | ||
import wiki from 'wikipediajs' | ||
``` | ||
* Search for article | ||
```js | ||
wiki.search('savanna hawk') | ||
.then((res) => console.log(res)) | ||
.catch((error) => console.log(error)) | ||
``` | ||
* search for an article in different language | ||
```js | ||
wiki.search('Veulta a san juan', 'es') | ||
.then((res) => console.log(res)) | ||
.catch((error) => console.log(error)) | ||
``` |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
6493
106
51
19
6
1