New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.6.1 to 7.6.2

1

lib/helpers/sitelinks.js

@@ -46,2 +46,3 @@ const { fixedEncodeURIComponent, replaceSpaceByUnderscores, isPlainObject } = require('../utils/utils')

let [ lang, project, title ] = matchData.slice(1)
title = decodeURIComponent(title)
let key

@@ -48,0 +49,0 @@ // Known case: wikidata, mediawiki

2

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

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

@@ -32,3 +32,4 @@ # wikibase-sdk

- [Install](#install)
- [Import](#import)
- [as a module](#as-a-module)
- [download pre-bundled files](#download-pre-bundled-files)
- [Features](#features)

@@ -55,9 +56,11 @@ - [Wikibase API](#wikibase-api)

## Install
### as a module
Install via npm to be able to use the module with `require` (CommonJS) or `import` (ES6 Modules)
```sh
npm install wikibase-sdk
```
## Import
Then in your javascript:
```js
const wbk = require('wikibase-sdk')({
const WBK = require('wikibase-sdk')
const wbk = WBK({
instance: 'https://my-wikibase-instan.se',

@@ -69,3 +72,4 @@ sparqlEndpoint: 'https://query.my-wikibase-instan.se/sparql'

```js
const wdk = require('wikibase-sdk')({
const WBK = require('wikibase-sdk')
const wdk = WBK({
instance: 'https://www.wikidata.org',

@@ -85,2 +89,19 @@ sparqlEndpoint: 'https://query.wikidata.org/sparql'

### download pre-bundled files
If you just want to import the lib from an HTML file and don't have a setup that can import with CommonJS or ES6 Modules, you can simply download those pre-bundled files:
```sh
wget https://raw.githubusercontent.com/maxlath/wikibase-sdk/dist/dist/wikibase-sdk.js
wget https://raw.githubusercontent.com/maxlath/wikibase-sdk/dist/dist/wikidata-sdk.js
wget https://raw.githubusercontent.com/maxlath/wikibase-sdk/dist/dist/wikibase-sdk.min.js
wget https://raw.githubusercontent.com/maxlath/wikibase-sdk/dist/dist/wikidata-sdk.min.js
```
then you can import it in your html:
```html
<script src="/path/to/wikibase-sdk.js"></script>
<script>console.log('can access WBK', WBK)</script>
<script src="/path/to/wikidata-sdk.js"></script>
<script>console.log('can access wdk, the wikidata.org bound product of WBK', wdk)</script>
```
## Features

@@ -87,0 +108,0 @@ ### Wikibase API

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