New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

wikigeocode

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wikigeocode - npm Package Compare versions

Comparing version 1.4.2 to 1.5.0

6

package.json
{
"name": "wikigeocode",
"version": "1.4.2",
"version": "1.5.0",
"description": "Simple utility to geocode an administrative location using the wikimedia APIs.",

@@ -22,7 +22,7 @@ "main": "index.js",

"dependencies": {
"simple-fetch-cache": "^1.3.0"
"axios": "^1.2.1"
},
"devDependencies": {
"jest": "^23.6.0"
"jest": "latest"
}
}

@@ -1,6 +0,8 @@

const {fetch} = require('simple-fetch-cache')
const axios = require('axios')
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}${repand(value)}`, 3600000)
.then(res => res.reply)
module.exports = async function (suffix, value) {
const res = await axios.get(`${wikiprefix}${suffix}${repand(value)}`)
return res.data
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc