Skip to content

Commit 994dd4f

Browse files
committed
Merge branch 'master' of https://github.com/dominhhai/calculator
2 parents 43f10cf + 2dfddad commit 994dd4f

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,19 @@ Local scope:
6565
# Usage
6666
## Command Line
6767
Wrap your expression with double quotes or single quotes
68+
6869
`scalc "your_expression"`
6970

71+
`scalc 'your_expression'`
72+
7073
or without any quotes
74+
7175
`scalc your_expression`
7276

73-
E.x: `scalc "1 + 5*(PI - 10 * 2^5)"` or `scalc 1 + 5*(PI - 10 * 2^5)`
77+
E.x: `scalc "1 + 5*(PI - 10 * 2^5)"` or `scalc 1 + 5*[PI - 10 * 2^5]`
78+
79+
The result will be copied to the system clipboard, so you can easily paste to anywhere.
80+
7481
## API
7582
```
7683
var scalc = require('scalc')

cli.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ if (process.argv.length < 3) {
66
console.error(' $ scalc "your_expression"\n\n or\n')
77
console.error(' $ scalc \'your_expression\'\n\n or\n')
88
console.error(' $ scalc your_expression\n')
9-
console.error(' E.x: $ scalc "1 + 5*(PI - 10 * 2^5)" or $ scalc 1 + 5*[PI - 10 * 2^5]')
9+
console.error(' E.x: $ scalc "1 + 5*(PI - 10 * 2^5)" or $ scalc 1 + 5*[PI - 10 * 2^5]')
1010
console.error('\n\n2. API\n')
11-
console.error(' var scalc = require(\'scalc\')\n var result = scalc(your_expression)\n')
11+
console.error(' var scalc = require(\'scalc\')\n var result = scalc(your_expression)\n')
1212
console.error(' E.x: var result = require(\'scalc\')(\'10 - E * |-10| - 0.5*(2^3)\')')
1313
} else {
1414
var rst = require('./app')(process.argv.slice(2).join(' ').trim())
1515
console.log(rst)
1616
// copy to clipboard
17-
require("copy-paste").copy(rst, function () {
17+
require('copy-paste').copy(rst, function () {
1818
console.log('\nCopied the result to the clipboard!')
1919
})
2020
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scalc",
3-
"version": "1.0.2",
3+
"version": "1.1.0",
44
"description": "Smart Calculator for Nodejs supports all type of Polish notations.",
55
"main": "app.js",
66
"bin": {

0 commit comments

Comments
 (0)