Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-script2

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-script2 - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

4

CHANGELOG.md

@@ -0,1 +1,5 @@

### 2.0.3
- Fix inline-source containing HTML entities (via **[@andrispraulitis](https://github.com/andrispraulitis)**)
### 2.0.2

@@ -2,0 +6,0 @@

8

dist/vue-script2.js
/*!
* vue-script2 v2.0.2
* vue-script2 v2.0.3
* (c) 2016-2018 Greg Slepak

@@ -15,3 +15,3 @@ * @license MIT License

p: Promise.resolve(),
version: '2.0.2', // grunt will overwrite to match package.json
version: '2.0.3', // grunt will overwrite to match package.json
loaded: {}, // keys are the scripts that have been loaded

@@ -42,4 +42,6 @@ install: function install(Vue) {

var s = document.createElement('script');
var h = _this.$el.innerHTML;
h = h.replace(/&lt;/gi, '<').replace(/&gt;/gi, '>').replace(/&amp;/gi, '&');
s.type = 'text/javascript';
s.appendChild(document.createTextNode(_this.$el.innerHTML));
s.appendChild(document.createTextNode(h));
parent.appendChild(s);

@@ -46,0 +48,0 @@ });

/*!
* vue-script2 v2.0.2
* vue-script2 v2.0.3
* (c) 2016-2018 Greg Slepak
* @license MIT License
*/
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.VueScript2=n()}(this,function(){"use strict";var e={installed:!1,p:Promise.resolve(),version:"2.0.2",loaded:{},install:function(t){if(!e.installed){var i=["unload"].concat(["src","type","async","integrity","text","crossorigin"]);t.component("script2",{props:i,render:function(e){return e("div",{style:"display:none"},this.$slots.default)},mounted:function(){var t=this,r=this.$el.parentElement;if(this.src){var o=n.omitBy(n.pick(this,i),n.isUndefined);o.parent=r;var c=function(){return e.load(t.src,o)};n.isUndefined(this.async)?e.p=e.p.then(c):c()}else e.p=e.p.then(function(){var e=document.createElement("script");e.type="text/javascript",e.appendChild(document.createTextNode(t.$el.innerHTML)),r.appendChild(e)});this.$nextTick(function(){t.$el.parentElement.removeChild(t.$el)})},destroyed:function(){this.unload&&(new Function(this.unload)(),delete e.loaded[this.src])}}),e.installed=!0}},load:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{parent:document.head};return e.loaded[t]?Promise.resolve(t):new Promise(function(r,o){var c=document.createElement("script");n.defaults2(c,n.omit(i,["unload","parent"]),{type:"text/javascript"}),c.async=!1,c.src=t,i.crossorigin&&(c.crossOrigin=i.crossorigin),c.onload=function(){e.loaded[t]=1,r(t)},c.onerror=function(){return o(new Error(t))},i.parent.appendChild(c)})}},n={isUndefined:function(e){return void 0===e},pick:function(e,n){var t={};return n.forEach(function(n){t[n]=e[n]}),t},omit:function(e,n){var t={};return Object.keys(e).forEach(function(i){-1===n.indexOf(i)&&(t[i]=e[i])}),t},omitBy:function(e,n){var t={};return Object.keys(e).forEach(function(i){n(e[i])||(t[i]=e[i])}),t},defaults2:function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];i.forEach(function(t){Object.keys(t).forEach(function(i){(n.isUndefined(e[i])||""===e[i])&&(e[i]=t[i])})})}};return e});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.VueScript2=n()}(this,function(){"use strict";var e={installed:!1,p:Promise.resolve(),version:"2.0.3",loaded:{},install:function(t){if(!e.installed){var i=["unload"].concat(["src","type","async","integrity","text","crossorigin"]);t.component("script2",{props:i,render:function(e){return e("div",{style:"display:none"},this.$slots.default)},mounted:function(){var t=this,r=this.$el.parentElement;if(this.src){var o=n.omitBy(n.pick(this,i),n.isUndefined);o.parent=r;var c=function(){return e.load(t.src,o)};n.isUndefined(this.async)?e.p=e.p.then(c):c()}else e.p=e.p.then(function(){var e=document.createElement("script"),n=t.$el.innerHTML;n=n.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&amp;/gi,"&"),e.type="text/javascript",e.appendChild(document.createTextNode(n)),r.appendChild(e)});this.$nextTick(function(){t.$el.parentElement.removeChild(t.$el)})},destroyed:function(){this.unload&&(new Function(this.unload)(),delete e.loaded[this.src])}}),e.installed=!0}},load:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{parent:document.head};return e.loaded[t]?Promise.resolve(t):new Promise(function(r,o){var c=document.createElement("script");n.defaults2(c,n.omit(i,["unload","parent"]),{type:"text/javascript"}),c.async=!1,c.src=t,i.crossorigin&&(c.crossOrigin=i.crossorigin),c.onload=function(){e.loaded[t]=1,r(t)},c.onerror=function(){return o(new Error(t))},i.parent.appendChild(c)})}},n={isUndefined:function(e){return void 0===e},pick:function(e,n){var t={};return n.forEach(function(n){t[n]=e[n]}),t},omit:function(e,n){var t={};return Object.keys(e).forEach(function(i){-1===n.indexOf(i)&&(t[i]=e[i])}),t},omitBy:function(e,n){var t={};return Object.keys(e).forEach(function(i){n(e[i])||(t[i]=e[i])}),t},defaults2:function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];i.forEach(function(t){Object.keys(t).forEach(function(i){(n.isUndefined(e[i])||""===e[i])&&(e[i]=t[i])})})}};return e});
{
"name": "vue-script2",
"version": "2.0.2",
"version": "2.0.3",
"description": "Brings back <script> to your favorite Single Page App!",

@@ -5,0 +5,0 @@ "main": "dist/vue-script2.js",

var Script2 = {
installed: false,
p: Promise.resolve(),
version: '2.0.2', // grunt will overwrite to match package.json
version: '2.0.3', // grunt will overwrite to match package.json
loaded: {}, // keys are the scripts that have been loaded

@@ -25,4 +25,6 @@ install (Vue, options = {}) {

var s = document.createElement('script')
var h = this.$el.innerHTML
h = h.replace(/&lt;/gi, '<').replace(/&gt;/gi, '>').replace(/&amp;/gi, '&')
s.type = 'text/javascript'
s.appendChild(document.createTextNode(this.$el.innerHTML))
s.appendChild(document.createTextNode(h))
parent.appendChild(s)

@@ -29,0 +31,0 @@ })

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