New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

notion-utils

Package Overview
Dependencies
Maintainers
1
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notion-utils - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

27

build/eval-formula.js

@@ -40,4 +40,13 @@ "use strict";

return formula.name === 'true';
case 'constant':
return formula.value;
case 'constant': {
const value = formula.value;
switch (formula.result_type) {
case 'text':
return value;
case 'number':
return parseFloat(value);
default:
return value;
}
}
case 'property':

@@ -128,4 +137,14 @@ const value = ctx.properties[formula.id];

case 'add':
return (evalFormula(args[0], ctx) +
evalFormula(args[1], ctx));
const v0 = evalFormula(args[0], ctx);
const v1 = evalFormula(args[1], ctx);
if (typeof v0 === 'number') {
return v0 + +v1;
}
else if (typeof v0 === 'string') {
return v0 + `${v1}`;
}
else {
// TODO
return v0;
}
case 'cbrt':

@@ -132,0 +151,0 @@ return Math.cbrt(evalFormula(args[0], ctx));

6

package.json
{
"name": "notion-utils",
"version": "1.3.1",
"version": "1.3.2",
"description": "Useful utilities for working with Notion data. Isomorphic.",

@@ -18,3 +18,3 @@ "repository": "saasify-sh/notion-kit",

"date-fns": "^2.15.0",
"notion-types": "^1.3.1"
"notion-types": "^1.3.2"
},

@@ -25,3 +25,3 @@ "devDependencies": {

},
"gitHead": "e5532c42ec118797bb5c0e38e61b61dc2a32f567"
"gitHead": "cb2f95c77ce41647604e57bdbc8913c9868f8388"
}

@@ -50,4 +50,13 @@ import * as types from 'notion-types'

case 'constant':
return formula.value
case 'constant': {
const value = formula.value
switch (formula.result_type) {
case 'text':
return value
case 'number':
return parseFloat(value)
default:
return value
}
}

@@ -164,7 +173,14 @@ case 'property':

case 'add':
return (
(evalFormula(args[0], ctx) as number) +
(evalFormula(args[1], ctx) as number)
)
const v0 = evalFormula(args[0], ctx)
const v1 = evalFormula(args[1], ctx)
if (typeof v0 === 'number') {
return v0 + +v1
} else if (typeof v0 === 'string') {
return v0 + `${v1}`
} else {
// TODO
return v0
}
case 'cbrt':

@@ -171,0 +187,0 @@ return Math.cbrt(evalFormula(args[0], ctx) as number)

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