1.0.0 • Published 2 years ago
park-calc v1.0.0
park-calc
park-calc is a simple JavaScript module for evaluating arithmetic expressions with support for parentheses and basic arithmetic operations.
Installation
To use park-calc in your project, include it as a dependency:
npm install park-calcUsage
To use the pCalc function in your project, import it from the park-calc module:
const pCalc = require('park-calc');
const result = pCalc('YOUR_EXPRESSION');
console.log(result);Replace YOUR_EXPRESSION with the arithmetic expression you want to evaluate. The expression can include numbers, parentheses (), and operators +, -, *, /.
Example
const result = pCalc('(2 + 3) * (5 - 2)');
console.log(result); // Outputs: 15park-calc (한국어)
park-calc는 괄호와 기본 산술 연산을 지원하는 간단한 JavaScript 모듈로, 산술 표현식을 계산하기 위해 사용됩니다.
설치 방법
프로젝트에서 park-calc를 사용하기 위해, 의존성으로 포함시키세요:
npm install park-calc사용 방법
프로젝트에서 pCalc 함수를 사용하려면, park-calc 모듈에서 이를 가져옵니다:
const pCalc = require('park-calc');
const result = pCalc('계산할_표현식');
console.log(result);계산할_표현식 자리에 평가하고자 하는 산술 표현식을 넣으세요. 이 표현식은 숫자, 괄호 (), 연산자 +, -, *, /를 포함할 수 있습니다.
예시
const result = pCalc('(2 + 3) * (5 - 2)');
console.log(result); // 출력: 151.0.0
2 years ago