Need private packages and team management tools?Check out npm Teams »

@citation-js/plugin-wikidata

0.5.0-alpha.5 • Public • Published

@citation-js/plugin-wikidata

Plugin for Wikidata for Citation.js.

NPM version NPM total downloads License Dependency status

Install

npm install @citation-js/plugin-wikidata

Usage

Register by importing the package:

require('@citation-js/plugin-wikidata')

Formats

Formats and other features added by this plugin.

Input

This plugin accepts Wikidata IDs in the following formats:

  • @wikidata/id: single ID
  • @wikidata/list+text: whitespace- or comma-delimited list of IDs
  • @wikidata/api: API URL
  • @wikidata/url: entity URL
  • @wikidata/list+object: array of IDs

API responses (@wikidata/object) are also supported. Additionally, this plugin exposes input parsing methods concerning individual properties and types, under the types @wikidata/prop and @wikidata/type.

Configuration

Input languages can be specified:

const {plugins} = require('@citation-js/core')
 
const config = plugins.config.get('@wikidata')
 
config.langs // ['en']
config.langs = ['fr', 'de', 'en'] // searches for French, then German then English labels

Install

npm i @citation-js/plugin-wikidata

DownloadsWeekly Downloads

687

Version

0.5.0-alpha.5

License

MIT

Unpacked Size

144 kB

Total Files

23

Last publish

Collaborators

  • avatar