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

css-urls

Package Overview
Dependencies
Maintainers
0
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-urls

Get all URLs inside stylesheets

  • 2.0.45
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
0
Weekly downloads
 
Created
Source

css-urls

Last version Coverage Status NPM Status

Get all URLs inside stylesheets

Install

$ npm install css-urls --save

Usage

const got = require('got')
const cssUrls = require('css-urls')

;(async () => {
  const url = process.argv[2]
  if (!url) throw new TypeError('Need to provide an url as first argument.')
  const text = await got(url, { resolveBodyOnly: true })
  const links = cssUrls({ text, url })
  links.forEach(({ url, normalizedUrl }) => console.log(normalizedUrl))
})()

API

cssUrls({url, text})

url

Required
Type: string

The target URL(s) for extracting URLs referenced.

text

Required
Type: string

The

The target URL(s) for extracting URLs referenced.

  • html-urls – Get all urls from a HTML markup.
  • xml-urls – Get all urls from a Feed/Atom/RSS/Sitemap xml markup.

License

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

kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats

Keywords

FAQs

Package last updated on 13 Jan 2025

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

  • 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