New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@citation-js/plugin-wikidata

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@citation-js/plugin-wikidata - npm Package Compare versions

Comparing version 0.5.0-alpha.5 to 0.5.0-alpha.6

4

lib-mjs/entity.js

@@ -45,3 +45,3 @@ import { logger } from '@citation-js/core';

for (let prop in props) {
for (const prop in props) {
const input = prepareValue(props[prop], entity, unkown);

@@ -58,3 +58,3 @@

for (let prop of unkown) {
for (const prop of unkown) {
if (prop in ignoredProps) {

@@ -61,0 +61,0 @@ continue;

@@ -66,8 +66,8 @@ import { simplify } from 'wikidata-sdk';

if (!old) {
let allIds = [];
const allIds = [];
for (let id in entities) {
for (const id in entities) {
const ids = collectAdditionalIds(entities[id], FETCH_ADDITIONAL);
for (let id of ids) {
for (const id of ids) {
if (!allIds.includes(id)) {

@@ -93,3 +93,3 @@ allIds.push(id);

if (prop in entity._needed) {
for (let claim of entity.claims[prop]) {
for (const claim of entity.claims[prop]) {
if (claim.value && claim.value.id) {

@@ -167,3 +167,3 @@ continue;

const urls = filterIdsAndGetUrls(state.needed, cache);
await Promise.all(urls.map(async url => addItemsToCache((await fetchAsync(url)), cache)));
await Promise.all(urls.map(async url => addItemsToCache(await fetchAsync(url), cache)));
state = updateLoopState(state, cache);

@@ -170,0 +170,0 @@ }

@@ -20,3 +20,3 @@ "use strict";

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

@@ -62,3 +62,3 @@ function resolveProp(prop_, entity, unkown) {

for (let prop in _props.props) {
for (const prop in _props.props) {
const input = prepareValue(_props.props[prop], entity, unkown);

@@ -75,3 +75,3 @@

for (let prop of unkown) {
for (const prop of unkown) {
if (prop in _props.ignoredProps) {

@@ -78,0 +78,0 @@ continue;

@@ -26,3 +26,3 @@ "use strict";

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

@@ -29,0 +29,0 @@ const ref = '@wikidata';

@@ -79,8 +79,8 @@ "use strict";

if (!old) {
let allIds = [];
const allIds = [];
for (let id in entities) {
for (const id in entities) {
const ids = collectAdditionalIds(entities[id], FETCH_ADDITIONAL);
for (let id of ids) {
for (const id of ids) {
if (!allIds.includes(id)) {

@@ -106,3 +106,3 @@ allIds.push(id);

if (prop in entity._needed) {
for (let claim of entity.claims[prop]) {
for (const claim of entity.claims[prop]) {
if (claim.value && claim.value.id) {

@@ -182,3 +182,3 @@ continue;

const urls = filterIdsAndGetUrls(state.needed, cache);
await Promise.all(urls.map(async url => addItemsToCache((await (0, _api.parseAsync)(url)), cache)));
await Promise.all(urls.map(async url => addItemsToCache(await (0, _api.parseAsync)(url), cache)));
state = updateLoopState(state, cache);

@@ -185,0 +185,0 @@ }

{
"name": "@citation-js/plugin-wikidata",
"version": "0.5.0-alpha.5",
"version": "0.5.0-alpha.6",
"description": "Plugin for Wikidata for Citation.js",

@@ -39,3 +39,3 @@ "keywords": [

"devDependencies": {
"@citation-js/core": "^0.5.0-alpha.5"
"@citation-js/core": "^0.5.0-alpha.6"
},

@@ -45,3 +45,3 @@ "peerDependencies": {

},
"gitHead": "0b7bcc58aca9b9c0938769b7bf5313fade4f1d66"
"gitHead": "7c8ac5c7d4bfd1a6661fdad7ed74a8390d7ab099"
}
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