1.0.0 • Published 5 months ago

park-calc v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

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-calc

Usage

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: 15

park-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); // 출력: 15
1.0.0

5 months ago