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

onno

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onno - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

9

cjs/index.js

@@ -112,6 +112,7 @@ "use strict"

const { propsKeys, styleKeys } = renderer.options
const transform = (styleObject, theme) => {
const renderedStyle = renderer(Object.assign({ theme }, styleObject))
const transform = (style, theme) => {
if (!isPlainObject(style)) return null
const renderedStyle = renderer(Object.assign({ theme }, style))
const mergedStyle = renderedStyle && merge(renderedStyle)
return Object.keys(styleObject).reduce((result, key) => {
return Object.keys(style).reduce((result, key) => {
const value = result[key]

@@ -126,3 +127,3 @@ if (isPlainObject(value)) {

return result
}, Object.assign({}, styleObject, mergedStyle))
}, Object.assign({}, style, mergedStyle))
}

@@ -129,0 +130,0 @@ Object.defineProperty(transform, "name", { value: name })

@@ -108,6 +108,7 @@ const PX_SCALE = [0, 2, 4, 8, 16, 32, 64, 128, 256, 512]

const { propsKeys, styleKeys } = renderer.options
const transform = (styleObject, theme) => {
const renderedStyle = renderer(Object.assign({ theme }, styleObject))
const transform = (style, theme) => {
if (!isPlainObject(style)) return null
const renderedStyle = renderer(Object.assign({ theme }, style))
const mergedStyle = renderedStyle && merge(renderedStyle)
return Object.keys(styleObject).reduce((result, key) => {
return Object.keys(style).reduce((result, key) => {
const value = result[key]

@@ -122,3 +123,3 @@ if (isPlainObject(value)) {

return result
}, Object.assign({}, styleObject, mergedStyle))
}, Object.assign({}, style, mergedStyle))
}

@@ -125,0 +126,0 @@ Object.defineProperty(transform, "name", { value: name })

{
"name": "onno",
"license": "MIT",
"version": "0.2.2",
"version": "0.2.3",
"description": "Responsive style props for building themed design systems",

@@ -33,3 +33,3 @@ "homepage": "https://github.com/wagerfield/onno/tree/master/packages/onno#readme",

},
"gitHead": "911b932b1c77fab544d8f2dc4ae097956742043a"
"gitHead": "3c92f182255e7f5a620870201db0f5d47d1c78c9"
}

@@ -107,3 +107,3 @@ export declare type Length = number

export interface StyleTransformFunction<P extends ThemeProps, S extends Style> {
(style: StyleObject<S>, theme?: Theme): StyleObject<S>
(style?: StyleObject<S>, theme?: Theme): StyleObject<S> | null
renderer: ComposedRenderFunction<P, S>

@@ -110,0 +110,0 @@ options: InterpolateOptions

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