tiny-current-script
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

Dependents (2)

Package Sidebar

Install

npm i tiny-current-script

Weekly Downloads

449

Version

1.0.0

License

MIT

Unpacked Size

4.82 kB

Total Files

6

Last publish

Collaborators

  • egoist