1.0.9 • Published 6 months ago

html-scripts v1.0.9

Weekly downloads
107
License
MIT
Repository
github
Last release
6 months ago

html-scripts

Last version Coverage Status NPM Status

It parses HTML markup and returns you all the scripts.

Install

$ npm install html-scripts --save

Usage

const getScripts = require('html-scripts')

const scripts = getScripts('<blockquote class="twitter-tweet"><p lang="en" dir="ltr">our new shiny website has landed <a href="https://t.co/KIrhYYcTRx">https://t.co/KIrhYYcTRx</a> <a href="https://t.co/cM0se2UoIg">pic.twitter.com/cM0se2UoIg</a></p>&mdash; microlink.io (@microlinkhq) <a href="https://twitter.com/microlinkhq/status/1032664633960800257?ref_src=twsrc%5Etfw">August 23, 2018</a></blockquote>\n<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>\n')

console.log(scripts)
// [
//   {
//     async: null,
//     charset: 'utf-8',
//     src: 'https://platform.twitter.com/widgets.js',
//   },
// ]

License

html-scripts © Kiko Beats, released under the MIT License. Authored and maintained by Kiko Beats with help from contributors.

kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats

1.0.9

6 months ago

1.0.8

8 months ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago