Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
action: function (wid, env, error) {
wid = wid.replace(/^.*[^0-9A-Z]([QP][0-9]+)([^0-9].*)?$/i, '$1')
if (env.brief) {
env.instancecount = false
env.sitecount = false
}
try {
var id = normalizeId(wid)
} catch (err) {
error(1, 'invalid id: %s', wid)
}
const serializeOptions = {
chalk: env.chalk,
uris: env.uris,
instancecount: env.instancecount,
sitecount: env.sitecount
}
env.property = env.property || ''
var match = env.property.match(/^([pP]?([0-9]+))?([/,][pP]?([0-9]+))?/)
if (match) {
var qid = id.substr(0, 1) === 'Q'
env.property = [
wdt.normalizeId = (id) => {
try {
return wdk.normalizeId(id)
} catch (err) {
return
}
}