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

styled-system

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

styled-system - npm Package Compare versions

Comparing version 1.0.0-14 to 1.0.0-15

11

dist/space.js

@@ -46,3 +46,12 @@ 'use strict';

return function (n) {
return num(n) ? px((scale[Math.abs(n)] || Math.abs(n)) * (neg(n) ? -1 : 1)) : n;
if (!num(n)) {
return n;
}
var value = scale[Math.abs(n)] || Math.abs(n);
if (!num(value)) {
return value;
}
return px(value * (neg(n) ? -1 : 1));
};

@@ -49,0 +58,0 @@ };

2

package.json
{
"name": "styled-system",
"version": "1.0.0-14",
"version": "1.0.0-15",
"description": "Design system utilities for styled-components, glamorous, and other css-in-js libraries",

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

@@ -41,6 +41,15 @@ const {

const mx = scale => n => num(n)
? px((scale[Math.abs(n)] || Math.abs(n)) * (neg(n) ? -1 : 1))
: n
const mx = scale => n => {
if (!num(n)) {
return n
}
const value = scale[Math.abs(n)] || Math.abs(n)
if (!num(value)) {
return value
}
return px(value * (neg(n) ? -1 : 1));
}
const getProperties = key => {

@@ -66,2 +75,1 @@ const [ a, b ] = key.split('')

}

@@ -325,2 +325,7 @@ import test from 'ava'

test('space can accept string values', t => {
const a = space({ theme: { space: ['1em', '2em'] }, m: -1 })
t.deepEqual(a, {margin: '2em'})
})
// width

@@ -327,0 +332,0 @@ test('width returns percentage widths', t => {

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