Skip to content

Commit

Permalink
Mainly typo updated
Browse files Browse the repository at this point in the history
  • Loading branch information
RoderickQiu committed Feb 21, 2020
1 parent 24bf2cf commit 4179766
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ It's a lib which let you to transfer human time to computer-readable time and al
- Arabic number in different unixs *(h/min/s/ms)* -> time in Arabic number as seconds
- *To be developed...*

### Time stamp translate
## Future of this project

- *To be developed...*
For the future of node-shi, go to the [todo-list](https://github.com/RoderickQiu/node-shi/projects/1).

## Packages Using

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-shi",
"version": "0.2.0",
"version": "0.2.2",
"main": "index.js",
"scripts": {
"test": "node test.js"
Expand All @@ -10,7 +10,7 @@
"english2number": "^1.0.8",
"js-pinyin": "^0.1.9"
},
"description": "It's a lib which let you to transfer human time to computer-readable time and also to transfer computer-generated time to human time, available for English and Chinese.",
"description": "It's a lib which let you to transfer human time to computer-readable time and also to transfer computer-generated time to human time, available for English and Chinese words.",
"author": {
"name": "Roderick Qiu",
"email": "scrisqiu@hotmail.com",
Expand Down
4 changes: 2 additions & 2 deletions src/shi.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ function unitConverter(str, treatNumberAs) {
}

/**
* human time parsed to Arabic number in seconds.
* human time (中文/English) parsed to Arabic number in seconds.
* @param {*} str The string or the time in different unixes.
* @param {String} treatNumberAs (optional) h, min, s, ms
* @param {String} treatNumberAs (optional, only used when the input is an integer) available values: h, min, s, ms
* @returns {Number} The converted number
*/
function humanTimeParser(str, treatNumberAs) {
Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var shi = require('./index.js');

// human time -> time in Arabic number
// human time -> time in Arabic number as seconds
console.log(shi.humanTimeParser("five hundreds and twenty one seconds"));//521
console.log(shi.humanTimeParser("a day and 一 hour, 52 min 16sec"));//93136
console.log(shi.humanTimeParser("三十三分钟"));//1980
Expand Down

0 comments on commit 4179766

Please sign in to comment.