global-var
Get the correct 'global' variable for the current runtime environment (`window` in browser, `global` in node, etc)
Last updated 4 years ago by andreaspizsa .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install global-var 
SYNC missed versions from official npm registry.

global-var Travis Coverage Status Downloads

Get the correct 'global' variable for the current runtime environment (window in browser, global in node, etc)

Install

Install with npm

$ npm i global-var --save

Usage

var globals = require('global-var');

globals.setTimeout(
  function(){
    console.log('Hello, world!');
  }, 1000);
// --> "Hello, world!" after 1000ms

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Andreas Pizsa

License

Copyright © 2016 Andreas Pizsa Released under the MIT license.


This file was generated by verb-cli on February 16, 2016.

Current Tags

  • 0.1.0                                ...           latest (4 years ago)

1 Versions

  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 1
This Week 19
This Month 42
Last Day 18
Last Week 123
Last Month 1,386
Dependencies (0)
None
Dev Dependencies (5)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |