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

@styled-system/core

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@styled-system/core - npm Package Compare versions

Comparing version 5.1.0 to 5.1.1

4

dist/index.esm.js

@@ -153,5 +153,5 @@ import assign from 'object-assign';

var sx = function sx(value, scale) {
var sx = function sx(value, scale, _props) {
var result = {};
var n = transform(value, scale);
var n = transform(value, scale, _props);
if (n === null) return;

@@ -158,0 +158,0 @@ properties.forEach(function (prop) {

@@ -169,5 +169,5 @@ "use strict";

var sx = function sx(value, scale) {
var sx = function sx(value, scale, _props) {
var result = {};
var n = transform(value, scale);
var n = transform(value, scale, _props);
if (n === null) return;

@@ -174,0 +174,0 @@ properties.forEach(function (prop) {

{
"name": "@styled-system/core",
"version": "5.1.0",
"version": "5.1.1",
"main": "dist/index.js",

@@ -8,3 +8,3 @@ "module": "dist/index.esm.js",

"license": "MIT",
"gitHead": "6477ac28b98015cea35c7b8c873b92cae453d910",
"gitHead": "c8abec2db8296389c0eaa730ca514667dddff02b",
"dependencies": {

@@ -11,0 +11,0 @@ "object-assign": "^4.1.1"

@@ -141,5 +141,5 @@ import assign from 'object-assign'

properties = properties || [property]
const sx = (value, scale) => {
const sx = (value, scale, _props) => {
const result = {}
const n = transform(value, scale)
const n = transform(value, scale, _props)
if (n === null) return

@@ -146,0 +146,0 @@ properties.forEach(prop => {

@@ -273,1 +273,17 @@ import { system } from '../src'

})
test('transforms values', () => {
const parser = system({
margin: {
property: 'margin',
transform: (n, scale, props) => {
const m = props.multiply || 1
return m * n
}
}
})
const a = parser({ margin: 8 })
const b = parser({ margin: 12, multiply: 2 })
expect(a).toEqual({ margin: 8 })
expect(b).toEqual({ margin: 24 })
})
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