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

@mattsjones/css-utils

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mattsjones/css-utils - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

8

CHANGELOG.md
# @mattsjones/css-utils
## 0.0.3
### Patch Changes
- 551f10f: Change calc `value` to `toString()`
- af4a319: Fix calc type declaration
## 0.0.2
### Patch Changes
- 22ee0d6: Add 'calc' util

15

dist/declarations/src/index.d.ts

@@ -7,10 +7,11 @@ declare type Operand = string | number;

export declare const negate: (x: Operand) => string;
export declare const calc: (x: Operand) => {
add: (...operands: Array<Operand>) => any;
subtract: (...operands: Array<Operand>) => any;
multiply: (...operands: Array<Operand>) => any;
divide: (...operands: Array<Operand>) => any;
negate: () => any;
value: Operand;
declare type CalcChain = {
add: (...operands: Array<Operand>) => CalcChain;
subtract: (...operands: Array<Operand>) => CalcChain;
multiply: (...operands: Array<Operand>) => CalcChain;
divide: (...operands: Array<Operand>) => CalcChain;
negate: () => CalcChain;
toString: () => string;
};
export declare const calc: (x: Operand) => CalcChain;
export {};

@@ -13,3 +13,3 @@ 'use strict';

const calc = x => {
const chain = {
return {
add: (...operands) => calc(add(x, ...operands)),

@@ -20,9 +20,4 @@ subtract: (...operands) => calc(subtract(x, ...operands)),

negate: () => calc(negate(x)),
value: x
toString: () => x.toString()
};
Object.defineProperty(chain, 'toString', {
value: () => x,
writable: false
});
return chain;
};

@@ -29,0 +24,0 @@

@@ -13,3 +13,3 @@ 'use strict';

const calc = x => {
const chain = {
return {
add: (...operands) => calc(add(x, ...operands)),

@@ -20,9 +20,4 @@ subtract: (...operands) => calc(subtract(x, ...operands)),

negate: () => calc(negate(x)),
value: x
toString: () => x.toString()
};
Object.defineProperty(chain, 'toString', {
value: () => x,
writable: false
});
return chain;
};

@@ -29,0 +24,0 @@

@@ -9,3 +9,3 @@ const toExpression = (operator, ...operands) => operands.join(` ${operator} `).replace(/calc/g, '');

const calc = x => {
const chain = {
return {
add: (...operands) => calc(add(x, ...operands)),

@@ -16,11 +16,6 @@ subtract: (...operands) => calc(subtract(x, ...operands)),

negate: () => calc(negate(x)),
value: x
toString: () => x.toString()
};
Object.defineProperty(chain, 'toString', {
value: () => x,
writable: false
});
return chain;
};
export { add, calc, divide, multiply, negate, subtract };
{
"name": "@mattsjones/css-utils",
"version": "0.0.2",
"version": "0.0.3",
"main": "dist/mattsjones-css-utils.cjs.js",

@@ -5,0 +5,0 @@ "module": "dist/mattsjones-css-utils.esm.js",

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