![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@algorithm.ts/calculate
Advanced tools
A tiny calculator for number arithmetics such as '+-*/()'
A tiny calculator for number arithmetics such as +-*/()
.
npm
npm install --save @algorithm.ts/calculate
yarn
yarn add @algorithm.ts/calculate
deno
import calculate from 'https://raw.githubusercontent.com/guanghechen/algorithm.ts/main/packages/calculate/src/index.ts'
// Perform integer arithmetics.
import calculate from 'algorithm.ts/calculate'
// or
import { calculate } from 'algorithm.ts/calculate'
// Perform decimal arithmetics.
import { decimalCalculate } from 'algorithm.ts/calculate'
// Perform bigint arithmetics.
import { bigintCalculate } from 'algorithm.ts/calculate'
integer arithmetics
import calculate from '@algorithm.ts/calculate'
calculate('3/2') // => 1
calculate('-2+1') // => -1
calculate('-2*3 + 2*5*3/6') // => -1
calculate('(1+(4+5+2)-3)+(6+8)') // => 23
decimal arithmetics
import { decimalCalculate as calculate } from '@algorithm.ts/calculate'
calculate('3/2') // => 1.5
calculate('-2+1') // => -1
calculate('-2*3 + 2*5*3/6') // => -1
calculate('(1+(4+5+2)-3)+(6+8)') // => 23
bigint arithmetics
import { bigintCalculate as calculate } from '@algorithm.ts/calculate'
calculate('22222222222222222222222222222 * 3333333333333333333323232')
// => 74074074074074074073849599999259259259259259259261504n
Illegal inputs
import calculate from '@algorithm.ts/calculate'
calculate('-2++1') // => SyntaxError
calculate('-2*/23') // => SyntaxError
calculate('1+(4+5+2))') // => SyntaxError
calculate('1+(4+5+2') // => SyntaxError
A solution of https://leetcode.com/problems/basic-calculator/
export { calculate } from '@algorithm.ts/calculate'
A solution of https://leetcode.com/problems/basic-calculator-ii/
export { calculate } from '@algorithm.ts/calculate'
FAQs
A tiny calculator for number arithmetics such as '+-*/()'
The npm package @algorithm.ts/calculate receives a total of 1 weekly downloads. As such, @algorithm.ts/calculate popularity was classified as not popular.
We found that @algorithm.ts/calculate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.