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

nuxt-jsonld

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-jsonld - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

example/.editorconfig

2

package.json
{
"name": "nuxt-jsonld",
"version": "0.0.3",
"version": "0.0.4",
"description": "manage jsonld in Vue component.",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

const JsonldMixin = require('./mixin');
const mergeStrategy = (toVal, fromVal) => {
if (!toVal) return fromVal;
if (!fromVal) return toVal;
if (typeof fromVal === 'function' && typeof toVal === 'function') {
return function head() {
const res1 = fromVal.call(this);
const res2 = toVal.call(this);
if (res2.script) {
const hasScript = (res1.script || []).some(s => s.hid === res2.script[0].hid);
if (!hasScript) {
res1.script = res1.script ? res1.script.concat(res2.script) : res2.script;
}
}
if (res2.__dangerouslyDisableSanitizersByTagID) {
res1.__dangerouslyDisableSanitizersByTagID = {
...(res1.__dangerouslyDisableSanitizersByTagID || {}),
...res2.__dangerouslyDisableSanitizersByTagID,
};
}
return res1;
};
}
};
module.exports = {
install(Vue) {
Vue.config.optionMergeStrategies.head = mergeStrategy;
Vue.mixin(JsonldMixin);
},
};
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