getroot
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Build Status Build status codecov npm node

getroot

getroot is simple utility wraps access to global object.

Install

npm install getroot

Usage

import { root } from 'getroot';
 
//root is either `window` or `global` based on running environment.

Building / Testing

Few npm scripts are supported for build / test code.

  • build: Transpiles code to ES5 commonjs to dist.
  • test: Run unit test
  • lint: Run lint over all codebases
  • lint:staged: Run lint only for staged changes. This'll be executed automatically with precommit hook.
  • commit: Commit wizard to write commit message

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i getroot

Weekly Downloads

8,800

Version

1.0.0

License

MIT

Last publish

Collaborators

  • kwonoj