https://github.com/webcyou/countup-timer-js
Countup Timer JavaScript Library
https://github.com/webcyou/countup-timer-js
counter countup javascript timer
Last synced: 8 months ago
JSON representation
Countup Timer JavaScript Library
- Host: GitHub
- URL: https://github.com/webcyou/countup-timer-js
- Owner: webcyou
- License: mit
- Created: 2016-07-22T22:02:30.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-27T11:44:12.000Z (over 8 years ago)
- Last Synced: 2025-04-10T00:18:30.504Z (8 months ago)
- Topics: counter, countup, javascript, timer
- Language: JavaScript
- Size: 41 KB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CountUpTimerJS
CountUpTimerJS - RealTime CountUp Timer JavaScript Library
### これは何?
カウントアップタイマー、JavaScriptライブラリです。
### demo
[デモページ](https://webcyou.github.io/countup_timer/)
### Quick start
**Clone the repo:**
```
git clone git@github.com:webcyou/countup-timer-js.git
```
**Install with [Bower](http://bower.io):**
```
bower install countup-timer.js
```
**Install with [npm](https://www.npmjs.com):**
```
npm install countup-timer-js
```
### Basic Usage
```
```
### Basic Format
```
"hh:mm:ss"
```
### Start DataSet
```
new CountUpTimer("hh:mm:ss", callBack);
```
**example**
```
new CountUpTimer("12:11:2", function(times, parameters) {
console.log(times);
});
```
**subscribe**
```
var timer = new CountUpTimer("hh:mm:ss");
timer.subscribe(function(times, parameters) {
...
});
```
### CallBack
```
new CountUpTimer(Times, function(times, parameters) {
...
});
```
**time**
times: string
```
"hh:mm:ss"
```
prams: Time
### CallBack Parameters Reference
| ParametersName | value | Detail |
| --------------- |:---------------:| -------------------- |
| id | number | created date Id |
| splitTimes | string[] | [hours, minute, second] |
| H | number | hours |
| M | number | minute |
| S | number | minute |
| times | string | "hh:mm:ss" |
| isNextDay | boolean | To become true is the one time of 24:00 . |
| createdAt | string | Time that was created |
### Start develop
```
npm install
gulp
```
```
Server started http://localhost:8088
LiveReload started on port 35729
```
### Start Test
**mocha**
```
gulp mocha
```
**mocha watch**
```
gulp mocha.watch
```
### Author
Daisuke Takayama
[Web帳](http://www.webcyou.com/)
### License
Copyright (c) 2016 Daisuke Takayama
Released under the [MIT license](http://opensource.org/licenses/mit-license.php)