Socket
Socket
Sign inDemoInstall

weex-styler

Package Overview
Dependencies
1
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.1.3

9

index.js

@@ -9,5 +9,10 @@ 'use strict'

function extend(dest, src) {
var ret = {}
for (var i in dest) {
ret[i] = dest[i]
}
for (var i in src) {
dest[i] = src[i]
ret[i] = src[i]
}
return ret
}

@@ -96,3 +101,3 @@

else {
extend(jsonStyle[className], ruleResult)
jsonStyle[className] = extend(jsonStyle[className], ruleResult)
}

@@ -99,0 +104,0 @@ }

{
"name": "weex-styler",
"version": "0.1.2",
"version": "0.1.3",
"description": "Weex <style> transformer",

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

@@ -49,2 +49,15 @@ var chai = require('chai')

it('handle complex class definition', function (done) {
var code = '.foo, .bar {font-size: 20;}\n\n .foo {color: #ff5000;}\n\n .bar {color: #000000;}'
styler.parse(code, function (err, data) {
expect(err).is.undefined
expect(data).is.an.object
expect(data.jsonStyle).eql({
foo: {fontSize: 20, color: '#ff5000'},
bar: {fontSize: 20, color: '#000000'}
})
done()
})
})
it('handle more complex class definition', function (done) {
var code = '.foo, .bar {font-size: 20; color: #000000}\n\n .foo, .bar, .baz {color: #ff5000; height: 30;}'

@@ -51,0 +64,0 @@ styler.parse(code, function (err, data) {

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