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

@suid/css

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@suid/css - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

createStyleObject.d.ts

1

assert.d.ts
export declare function isVar(value: string): boolean;
export declare function isPrivateVar(value: string): boolean;
export declare function isSelector(value: string): boolean;

@@ -3,0 +4,0 @@ export declare function isGlobalSelector(value: string): boolean;

export function isVar(value) {
return value.startsWith("--");
}
export function isPrivateVar(value) {
return value.startsWith("__");
}
export function isSelector(value) {

@@ -5,0 +8,0 @@ return /[^a-z-]/i.test(value) && !isVar(value);

2

package.json
{
"name": "@suid/css",
"version": "0.1.3",
"version": "0.1.4",
"description": "CSS render in JS.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -1,2 +0,2 @@

import { isGlobalSelector, isKeyframes, isMediaQuery, isSelector, isVar, } from "./assert";
import { isGlobalSelector, isKeyframes, isMediaQuery, isSelector, isVar, isPrivateVar, } from "./assert";
import snakeCase from "@suid/utils/snakeCase";

@@ -17,3 +17,6 @@ function renderSelector(propKey, propValue, selectors = [], options = {}) {

const propValue = css[propKey];
if (isGlobalSelector(propKey)) {
if (isPrivateVar(propKey)) {
continue;
}
else if (isGlobalSelector(propKey)) {
for (const selector in propValue) {

@@ -20,0 +23,0 @@ rules.push(...renderSelector(selector, propValue[selector], [], options));

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