Socket
Socket
Sign inDemoInstall

to-style

Package Overview
Dependencies
4
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.1.0

hasOwn.js

1

index.js

@@ -5,4 +5,5 @@ 'use strict'

prefixProperties: require('./src/prefixProperties') ,
cssUnitless: require('./src/cssUnitless') ,
object: require('./src/toStyleObject'),
string: require('./src/toStyleString')
}

2

package.json
{
"name": "to-style",
"version": "1.0.2",
"version": "1.1.0",
"description": "Convert style objects to style strings",

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

@@ -9,2 +9,3 @@ 'use strict'

var HYPHENATE = ustring.hyphenate
var CAMELIZE = ustring.camelize
var HAS_OWN = require('./hasOwn')

@@ -36,2 +37,6 @@ var IS_OBJECT = require('./isObject')

var CONFIG = {
cssUnitless: require('./cssUnitless')
}
/**

@@ -58,3 +63,6 @@ * @ignore

config = config || {}
config = config || CONFIG
config.cssUnitless = config.cssUnitless || CONFIG.cssUnitless
result = result || {}

@@ -79,5 +87,9 @@

normalizeFn = config.normalizeName || HYPHENATE,
normalizeFn = config.camelize? CAMELIZE: HYPHENATE
processed,
Object.keys(cssUnitless).forEach(function(key){
cssUnitless[normalizeFn(key)] = 1
})
var processed,
styleName,

@@ -84,0 +96,0 @@

@@ -63,2 +63,12 @@

})
it('should work fine with zIndex', function(){
toStyle({
'zIndex': 4
}, { camelize: true})
.should
.eql({
'zIndex': 4
})
})
})
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc