Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wikibase-sdk

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wikibase-sdk - npm Package Compare versions

Comparing version 7.11.0 to 7.11.1

17

lib/utils/build_url.js
const isBrowser = typeof location !== 'undefined' && typeof document !== 'undefined'
const qs = isBrowser ? require('./querystring_lite') : require('querystring')
let stringifyQuery
if (isBrowser) {
stringifyQuery = queryObj => new URLSearchParams(queryObj).toString()
} else {
// TODO: use URLSearchParams in NodeJS too, but that would mean dropping support for NodeJS < v10
stringifyQuery = require('querystring').stringify
}
module.exports = instanceApiEndpoint => queryObj => {

@@ -8,3 +15,9 @@ // Request CORS headers if the request is made from a browser

if (isBrowser) queryObj.origin = '*'
return instanceApiEndpoint + '?' + qs.stringify(queryObj)
// Remove null or undefined parameters
Object.keys(queryObj).forEach(key => {
if (queryObj[key] == null) delete queryObj[key]
})
return instanceApiEndpoint + '?' + stringifyQuery(queryObj)
}

2

package.json
{
"name": "wikibase-sdk",
"version": "7.11.0",
"version": "7.11.1",
"description": "utils functions to query a Wikibase instance and simplify its results",

@@ -5,0 +5,0 @@ "main": "lib/wikibase-sdk.js",

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