This repository has been archived by the owner on Jan 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hb432
committed
Jun 14, 2020
1 parent
f0daf1e
commit 591a8b8
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Framework Module | ||
|
||
#### About | ||
The framework module provides many useful utility functions not implemented by the standard grakkit environment. | ||
|
||
You will need grakkit installed on your server to use this. [Click here](https://github.com/grakkit/grakkit/wiki) for an installation guide. | ||
|
||
#### Installation | ||
Use `/module add grakkit/framework` to install the module, and `/module update grakkit/framework` to update it if necessary. | ||
|
||
#### Usage | ||
Once installed, this code will import this module to the `framework` variable. | ||
```javascript | ||
const framework = core.import('grakkit/framework'); | ||
``` | ||
|
||
# Documentation | ||
#### `framework` | ||
|
||
|
||
```javascript | ||
framework.extend(global, { | ||
clearImmediate: (task) => { | ||
task.cancel(); | ||
}, | ||
clearInterval: (task) => { | ||
task.cancel(); | ||
}, | ||
clearTimeout: (task) => { | ||
task.cancel(); | ||
}, | ||
setImmediate: (script) => { | ||
return framework.timeout(script, 0); | ||
}, | ||
setInterval: (script, period) => { | ||
return framework.interval(script, period); | ||
}, | ||
setTimeout: (script, period) => { | ||
return framework.timeout(script, period); | ||
} | ||
}); | ||
``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.