Socket
Book a DemoInstallSign in
Socket

find-html-dependencies

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-html-dependencies

Finds all dependencies within an HTML string or codesen parser AST

0.6.0
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

find-html-dependencies

Finds all dependencies within an HTML string or codsen-parser AST. A dependency in this case is a resource referenced from the HTML including images, CSS files, and JavaScript files.

Install

$ npm install find-html-dependencies

Usage

const findHTMLDependencies = require("find-html-dependencies");

const dependencies = findHTMLDependencies(`
  <img src="my-image.png" />
`);
// => [ { path: 'my-image.png', range: [ 13, 25 ] } ]

API

findHTMLDependencies(html)

Accepts a string or AST generated by codsen-parser.

Returns an array of objects for each dependency found found.

FAQs

Package last updated on 07 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.