1.0.0 • Published 4 years ago

tiny-current-script v1.0.0

Weekly downloads
13
License
MIT
Repository
github
Last release
4 years ago

tiny-current-script

NPM version NPM downloads CircleCI donate chat

A tiny ponyfill (266 bytes) for document.currentScript which adds support for IE 11.

Install

yarn add tiny-current-script

Usage

import { getCurrentScript } from 'tiny-current-script'

const currentScript = getCurrentScript()
// null or current script element

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

tiny-current-script © EGOIST, Released under the MIT License. Authored and maintained by EGOIST with help from contributors (list).

github.com/egoist · GitHub @EGOIST · Twitter @_egoistlily