readme updated

This commit is contained in:
Vladimir Enchev
2014-05-10 15:51:32 +03:00
parent e493711328
commit c3abc01b65

View File

@ -1,5 +1,16 @@
Globals module for defining functions part of the global context - you need only to call *require* for this module and all globals will be registered. For example setTimeout:
```js
require("globals");
setTimeout(function(){ log("Test"); }, 2000);
var id = setTimeout(function(){ log("Test"); }, 2000);
...
clearTimeout(id);
setInterval(function(){ log("Test"); }, 2000);
var intervalId = setInterval(function(){ log("Test"); }, 2000);
...
clearInterval(intervalId)
```