wikigeocode
Advanced tools
Comparing version 1.4.1 to 1.4.2
{ | ||
"name": "wikigeocode", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "Simple utility to geocode an administrative location using the wikimedia APIs.", | ||
@@ -9,2 +9,12 @@ "main": "index.js", | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/webdacjs/wikigeocode.git" | ||
}, | ||
"keywords": [ | ||
"geo", | ||
"geocode", | ||
"wikipedia", | ||
"geolocation" | ||
], | ||
"author": "Juan Convers", | ||
@@ -11,0 +21,0 @@ "license": "MIT", |
@@ -68,3 +68,3 @@ # wikigeocode | ||
Copyright © 2018, [Juan Convers](https://github.com/webdacjs). | ||
Copyright © 2019, [Juan Convers](https://juanconvers.com/). | ||
Released under the [MIT License](LICENSE). |
const {fetch} = require('simple-fetch-cache') | ||
const repand = str => str.replace(/&/gi, ' and ') | ||
const wikiprefix = 'https://en.wikipedia.org/w/api.php?action=query&format=json' | ||
module.exports = (suffix, value) => fetch(`${wikiprefix}${suffix}${value}`, 3600000) | ||
module.exports = (suffix, value) => fetch(`${wikiprefix}${suffix}${repand(value)}`, 3600000) | ||
.then(res => res.reply) |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
6414
61
0
6