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.0.8 to 7.0.9

1

CHANGELOG.md

@@ -18,2 +18,3 @@ # CHANGELOG

* `getWikidataIdsFromWikipediaTitles` (use `getEntitiesFromSitelinks`)
* `getWikidataIdsFromSitelinks` (use `getEntitiesFromSitelinks`)

@@ -20,0 +21,0 @@ ## 6.7.0 - 2019-05-26

@@ -14,17 +14,31 @@ const { isPlainObject } = require('./utils/utils')

const { instance, sparqlEndpoint } = config
validateEndpoint('instance', instance)
validateEndpoint('sparqlEndpoint', sparqlEndpoint)
const buildUrl = require('./utils/build_url')(instance)
return Object.assign({}, common, {
const wikibaseApiFunctions = {
searchEntities: require('./queries/search_entities')(buildUrl),
getEntities: require('./queries/get_entities')(buildUrl),
getManyEntities: require('./queries/get_many_entities')(buildUrl),
sparqlQuery: require('./queries/sparql_query')(sparqlEndpoint),
getReverseClaims: require('./queries/get_reverse_claims')(sparqlEndpoint),
getRevisions: require('./queries/get_revisions')(buildUrl),
getEntityRevision: require('./queries/get_entity_revision')(instance),
getEntitiesFromSitelinks: require('./queries/get_entities_from_sitelinks')(buildUrl)
})
}
var wikibaseQueryServiceFunctions
if (sparqlEndpoint) {
validateEndpoint('sparqlEndpoint', sparqlEndpoint)
wikibaseQueryServiceFunctions = {
sparqlQuery: require('./queries/sparql_query')(sparqlEndpoint),
getReverseClaims: require('./queries/get_reverse_claims')(sparqlEndpoint)
}
} else {
wikibaseQueryServiceFunctions = {
sparqlQuery: missingSparqlEndpoint('sparqlQuery'),
getReverseClaims: missingSparqlEndpoint('getReverseClaims')
}
}
return Object.assign({}, common, wikibaseApiFunctions, wikibaseQueryServiceFunctions)
}

@@ -42,2 +56,6 @@

const missingSparqlEndpoint = name => () => {
throw new Error(`${name} requires a sparqlEndpoint to be set in configuration object`)
}
module.exports = WBK

2

package.json
{
"name": "wikibase-sdk",
"version": "7.0.8",
"version": "7.0.9",
"description": "A javascript tool-suite to query wikibase 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