How to use the wikibase-sdk.isSitelinkKey function in wikibase-sdk

To help you get started, we’ve selected a few wikibase-sdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github maxlath / wikibase-cli / lib / parse_props.js View on Github external
const getPropsAndSubKeys = propStr => {
  const [ prop, subkey ] = propStr.split('.')
  if (isPropertyId(prop)) return lazyProps.claims(prop)
  else if (prop.match(langPattern)) return lazyProps.terms(prop)
  else if (isSitelinkKey(prop)) return lazyProps.sitelinks(prop)
  else return [ { prop, subkey } ]
}