JSPM

getroot

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 38190
  • Score
    100M100P100Q137223F
  • License MIT

Get isomorphic global object on node.js and browser

Package Exports

  • getroot

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (getroot) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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