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

pelo

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pelo - npm Package Compare versions

Comparing version 0.0.5 to 0.1.0

3

app.js

@@ -52,2 +52,5 @@ 'use strict'

`}
<p>
attributes: <input type=text value=${''} disabled onclick="${() => alert('hello')}" ${{ title: '<Special " characters>' }} />
</p>
</div>

@@ -54,0 +57,0 @@ `

20

index.js

@@ -26,2 +26,6 @@ 'use strict'

function escape (value) {
return value.toString().replace(replaceMapRE, replaceMapper)
}
function handleValue (value) {

@@ -42,3 +46,3 @@ if (value === null || value === undefined || value === false) {

if (valueType === 'function') {
return '""'
return ''
}

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

return value.toString().replace(replaceMapRE, replaceMapper)
return escape(value)
}

@@ -62,3 +66,9 @@

for (var i = 0; i < pieces.length - 1; i++) {
output += pieces[i] + handleValue(arguments[i + 1])
var piece = pieces[i]
var value = handleValue(arguments[i + 1])
if (piece[piece.length - 1] === '=') {
output += piece + '"' + value + '"'
} else {
output += piece + value
}
}

@@ -82,5 +92,5 @@ output += pieces[i]

for (var i = 0; i < keys.length - 1; i++) {
values += keys[i] + '="' + (obj[keys[i]] || '') + '" '
values += keys[i] + '="' + escape(obj[keys[i]] || '') + '" '
}
return values + keys[i] + '="' + (obj[keys[i]] || '') + '"'
return values + keys[i] + '="' + escape(obj[keys[i]] || '') + '"'
}

@@ -87,0 +97,0 @@

{
"name": "pelo",
"version": "0.0.5",
"version": "0.1.0",
"description": "Lightning fast server-side rendering with tagged template literals",

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

@@ -52,2 +52,5 @@ 'use strict'

})
server.on('listening', () => {
console.log('Listening on', server.address());
});
server.listen(8080)
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