New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

script-tags

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

script-tags - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

test/example.json

2

bower.json
{
"name": "script-tags",
"version": "0.0.2",
"version": "0.0.3",
"main": [

@@ -5,0 +5,0 @@ "index.js"

@@ -14,35 +14,9 @@ # {%= name %} [![NPM version](https://badge.fury.io/js/{%= name %}.png)](http://badge.fury.io/js/{%= name %})

```js
var {%= name %} = require("{%= name %}");
console.log(script-tags);
var scripts = require("script-tags");
console.log(scripts('<script>var foo = "bar";</script>'));
```
Returns an object like the following for each anchor tag:
Returns an object with info for each script tag. See [an example](./test/example.json).
```json
{
"class": "link",
"title": "Assemble Docs",
"name": "",
"alt": "",
"rel": "",
"href": {
"protocol": "https:",
"slashes": true,
"auth": null,
"host": "github.com",
"port": null,
"hostname": "github.com",
"hash": null,
"search": null,
"query": null,
"pathname": "/assemble/assemble-docs/blob/master/LICENSE-MIT",
"path": "/assemble/assemble-docs/blob/master/LICENSE-MIT",
"href": "https://github.com/assemble/assemble-docs/blob/master/LICENSE-MIT"
}
}
```
## Author
{%= contrib("jon") %}

@@ -49,0 +23,0 @@

{
"name": "script-tags",
"version": "0.0.2",
"description": "Utils for HTML script tags.",
"version": "0.0.3",
"description": "Utils for HTML script tags. Extracts script tags from HTML and parse them into objects with useful information.",
"homepage": "https://github.com/jonschlinkert/script-tags",

@@ -6,0 +6,0 @@ "author": {

# script-tags [![NPM version](https://badge.fury.io/js/script-tags.png)](http://badge.fury.io/js/script-tags)
> Extract anchor tags from HTML and parse them into objects with useful information.
> Extract script tags from HTML and parse them into objects with useful information.

@@ -18,2 +18,3 @@ ## Install with [npm](npmjs.org):

Returns an object with info for each script tag. See [an example](./test/example.json).

@@ -20,0 +21,0 @@ ## Author

@@ -20,3 +20,4 @@ /**

console.log(JSON.stringify(scripts, null, 2));
file.writeFileSync('test/example.json', JSON.stringify(scripts, null, 2));
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc