Socket
Socket
Sign inDemoInstall

@vue/server-renderer

Package Overview
Dependencies
11
Maintainers
1
Versions
206
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

114

dist/server-renderer.cjs.js

@@ -56,43 +56,2 @@ 'use strict';

function normalizeStyle(value) {
if (isArray(value)) {
const res = {};
for (let i = 0; i < value.length; i++) {
const normalized = normalizeStyle(value[i]);
if (normalized) {
for (const key in normalized) {
res[key] = normalized[key];
}
}
}
return res;
}
else if (isObject(value)) {
return value;
}
}
function normalizeClass(value) {
let res = '';
if (isString(value)) {
res = value;
}
else if (isArray(value)) {
for (let i = 0; i < value.length; i++) {
res += normalizeClass(value[i]) + ' ';
}
}
else if (isObject(value)) {
for (const name in value) {
if (value[name]) {
res += name + ' ';
}
}
}
return res.trim();
}
// These tag configs are shared between compiler-dom and runtime-dom, so they
const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';
const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);
// On the client we only need to offer special cases for boolean attributes that

@@ -142,2 +101,59 @@ // have different names from their corresponding dom properties:

function normalizeStyle(value) {
if (isArray(value)) {
const res = {};
for (let i = 0; i < value.length; i++) {
const normalized = normalizeStyle(value[i]);
if (normalized) {
for (const key in normalized) {
res[key] = normalized[key];
}
}
}
return res;
}
else if (isObject(value)) {
return value;
}
}
function stringifyStyle(styles) {
let ret = '';
if (!styles) {
return ret;
}
for (const key in styles) {
const value = styles[key];
const normalizedKey = key.indexOf(`--`) === 0 ? key : hyphenate(key);
if (isString(value) ||
(typeof value === 'number' && isNoUnitNumericStyleProp(normalizedKey))) {
// only render valid values
ret += `${normalizedKey}:${value};`;
}
}
return ret;
}
function normalizeClass(value) {
let res = '';
if (isString(value)) {
res = value;
}
else if (isArray(value)) {
for (let i = 0; i < value.length; i++) {
res += normalizeClass(value[i]) + ' ';
}
}
else if (isObject(value)) {
for (const name in value) {
if (value[name]) {
res += name + ' ';
}
}
}
return res.trim();
}
// These tag configs are shared between compiler-dom and runtime-dom, so they
const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';
const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);
const escapeRE = /["'&<>]/;

@@ -297,3 +313,5 @@ function escapeHtml(string) {

else if (isSSRSafeAttrName(attrKey)) {
return ` ${attrKey}="${escapeHtml(value)}"`;
return value === ''
? ` ${attrKey}`
: ` ${attrKey}="${escapeHtml(value)}"`;
}

@@ -331,13 +349,3 @@ else {

const styles = normalizeStyle(raw);
let ret = '';
for (const key in styles) {
const value = styles[key];
const normalizedKey = key.indexOf(`--`) === 0 ? key : hyphenate(key);
if (isString(value) ||
(typeof value === 'number' && isNoUnitNumericStyleProp(normalizedKey))) {
// only render valid values
ret += `${normalizedKey}:${value};`;
}
}
return escapeHtml(ret);
return escapeHtml(stringifyStyle(styles));
}

@@ -344,0 +352,0 @@

@@ -22,43 +22,2 @@ 'use strict';

function normalizeStyle(value) {
if (isArray(value)) {
const res = {};
for (let i = 0; i < value.length; i++) {
const normalized = normalizeStyle(value[i]);
if (normalized) {
for (const key in normalized) {
res[key] = normalized[key];
}
}
}
return res;
}
else if (isObject(value)) {
return value;
}
}
function normalizeClass(value) {
let res = '';
if (isString(value)) {
res = value;
}
else if (isArray(value)) {
for (let i = 0; i < value.length; i++) {
res += normalizeClass(value[i]) + ' ';
}
}
else if (isObject(value)) {
for (const name in value) {
if (value[name]) {
res += name + ' ';
}
}
}
return res.trim();
}
// These tag configs are shared between compiler-dom and runtime-dom, so they
const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';
const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);
// On the client we only need to offer special cases for boolean attributes that

@@ -108,2 +67,59 @@ // have different names from their corresponding dom properties:

function normalizeStyle(value) {
if (isArray(value)) {
const res = {};
for (let i = 0; i < value.length; i++) {
const normalized = normalizeStyle(value[i]);
if (normalized) {
for (const key in normalized) {
res[key] = normalized[key];
}
}
}
return res;
}
else if (isObject(value)) {
return value;
}
}
function stringifyStyle(styles) {
let ret = '';
if (!styles) {
return ret;
}
for (const key in styles) {
const value = styles[key];
const normalizedKey = key.indexOf(`--`) === 0 ? key : hyphenate(key);
if (isString(value) ||
(typeof value === 'number' && isNoUnitNumericStyleProp(normalizedKey))) {
// only render valid values
ret += `${normalizedKey}:${value};`;
}
}
return ret;
}
function normalizeClass(value) {
let res = '';
if (isString(value)) {
res = value;
}
else if (isArray(value)) {
for (let i = 0; i < value.length; i++) {
res += normalizeClass(value[i]) + ' ';
}
}
else if (isObject(value)) {
for (const name in value) {
if (value[name]) {
res += name + ' ';
}
}
}
return res.trim();
}
// These tag configs are shared between compiler-dom and runtime-dom, so they
const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';
const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);
const escapeRE = /["'&<>]/;

@@ -261,3 +277,5 @@ function escapeHtml(string) {

else if (isSSRSafeAttrName(attrKey)) {
return ` ${attrKey}="${escapeHtml(value)}"`;
return value === ''
? ` ${attrKey}`
: ` ${attrKey}="${escapeHtml(value)}"`;
}

@@ -295,13 +313,3 @@ else {

const styles = normalizeStyle(raw);
let ret = '';
for (const key in styles) {
const value = styles[key];
const normalizedKey = key.indexOf(`--`) === 0 ? key : hyphenate(key);
if (isString(value) ||
(typeof value === 'number' && isNoUnitNumericStyleProp(normalizedKey))) {
// only render valid values
ret += `${normalizedKey}:${value};`;
}
}
return escapeHtml(ret);
return escapeHtml(stringifyStyle(styles));
}

@@ -308,0 +316,0 @@

{
"name": "@vue/server-renderer",
"version": "3.0.0-alpha.5",
"version": "3.0.0-alpha.6",
"description": "@vue/server-renderer",

@@ -30,7 +30,7 @@ "main": "index.js",

"peerDependencies": {
"vue": "3.0.0-alpha.5"
"vue": "3.0.0-alpha.6"
},
"dependencies": {
"@vue/compiler-ssr": "3.0.0-alpha.5"
"@vue/compiler-ssr": "3.0.0-alpha.6"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc