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

@contember/utilities

Package Overview
Dependencies
Maintainers
5
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contember/utilities - npm Package Compare versions

Comparing version 1.2.0-rc.16 to 1.2.0-rc.17

dist/development/functional/range.js

2

dist/development/css-utilities/px.js
function px(value) {
return typeof value === "number" && !isNaN(value) ? value + "px" : "";
return typeof value === "number" && !(isNaN(value) || value === Infinity || value === -Infinity) ? value + "px" : "";
}

@@ -4,0 +4,0 @@ export {

@@ -26,2 +26,3 @@ import { AssertionError } from "./assert-types/AssertionError.js";

import { pick } from "./functional/pick.js";
import { range } from "./functional/range.js";
import { setHasOneOf } from "./functional/setHasOneOf.js";

@@ -79,2 +80,3 @@ import { capitalize } from "./string-utilities/capitalize.js";

px,
range,
satisfiesOneOfFactory,

@@ -81,0 +83,0 @@ setHasOneOf,

function px(value) {
return typeof value === "number" && !isNaN(value) ? value + "px" : "";
return typeof value === "number" && !(isNaN(value) || value === Infinity || value === -Infinity) ? value + "px" : "";
}

@@ -4,0 +4,0 @@ export {

@@ -26,2 +26,3 @@ import { AssertionError } from "./assert-types/AssertionError.js";

import { pick } from "./functional/pick.js";
import { range } from "./functional/range.js";
import { setHasOneOf } from "./functional/setHasOneOf.js";

@@ -79,2 +80,3 @@ import { capitalize } from "./string-utilities/capitalize.js";

px,
range,
satisfiesOneOfFactory,

@@ -81,0 +83,0 @@ setHasOneOf,

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

import { PropsWithChildren } from 'react';
import { KebabCase } from 'type-fest';

@@ -7,6 +6,6 @@ export type NestedClassName = string | false | null | undefined | (string | false | null | undefined)[] | NestedClassName[];

};
export type ComponentClassNameProps = PropsWithChildren<{
export interface ComponentClassNameProps {
className?: NestedClassName;
componentClassName?: string | string[];
}>;
}
export type ColorSchemeClassName<T extends KebabCase<string> = KebabCase<string>> = `scheme-${T}`;

@@ -13,0 +12,0 @@ export type ThemeContentClassName<T extends KebabCase<string> = KebabCase<string>, S extends `:${KebabCase<string>}` | null | undefined = undefined> = S extends string ? `theme-${T}-content${S}` : `theme-${T}-content`;

export * from './extend';
export * from './omit';
export * from './pick';
export * from './range';
export * from './setHasOneOf';
//# sourceMappingURL=index.d.ts.map
{
"name": "@contember/utilities",
"license": "Apache-2.0",
"version": "1.2.0-rc.16",
"version": "1.2.0-rc.17",
"type": "module",

@@ -6,0 +6,0 @@ "sideEffects": false,

import { KebabCase } from 'type-fest'
import { colorSchemeClassName } from './colorSchemeClassName'
import { ThemeContentClassName, ThemeControlsClassName } from './types'

@@ -4,0 +3,0 @@

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

import { PropsWithChildren } from 'react'
import { KebabCase } from 'type-fest'

@@ -7,6 +6,6 @@

export type ComponentClassNameProps = PropsWithChildren<{
export interface ComponentClassNameProps {
className?: NestedClassName;
componentClassName?: string | string[];
}>
}

@@ -13,0 +12,0 @@ export type ColorSchemeClassName<T extends KebabCase<string> = KebabCase<string>> = `scheme-${T}`

@@ -15,3 +15,3 @@ export function px<V extends number>(value: V): `${V}px`;

export function px<V extends number | false | null | undefined>(value?: V): string {
return typeof value === 'number' && !isNaN(value) ? value + 'px' : ''
return typeof value === 'number' && !(isNaN(value) || value === Infinity || value === -Infinity) ? value + 'px' : ''
}
export * from './extend'
export * from './omit'
export * from './pick'
export * from './range'
export * from './setHasOneOf'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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