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

pure-engine

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pure-engine - npm Package Compare versions

Comparing version 0.9.18 to 0.9.19

2

package.json
{
"name": "pure-engine",
"version": "0.9.18",
"version": "0.9.19",
"description": "Compile HTML templates into JS",

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

@@ -5,2 +5,3 @@ const { parse, walk, generate } = require('css-tree')

const { unique } = require('pure-utilities/array')
const { extractValues } = require('../string')

@@ -32,3 +33,3 @@ function addScopeToCssSelectors (node, scopes) {

const attribute = attributes.find(attribute => attribute.key === 'class')
const values = attribute.value.split(/\s+/g)
const values = extractValues(attribute)
const classes = values.reduce((strings, string) => {

@@ -35,0 +36,0 @@ strings.push(string)

@@ -48,2 +48,15 @@ const { string: { singlespace } } = require('pure-utilities')

function extractValues (attribute) {
return extract(attribute.value)
.reduce((values, { value }) => {
if (isCurlyTag(value)) {
values.push(value.trim())
} else {
const parts = value.split(/\s+/g)
parts.forEach(part => values.push(part))
}
return values
}, [])
}
function getName (name) {

@@ -56,2 +69,2 @@ if (name.endsWith('.bind')) {

module.exports = {extract, getName, isCurlyTag, getExpressionFromCurlyTag}
module.exports = {extract, extractValues, getName, isCurlyTag, getExpressionFromCurlyTag}
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