2.0.44 • Published 2 months ago

css-urls v2.0.44

Weekly downloads
143
License
MIT
Repository
github
Last release
2 months ago

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.

Related

  • 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

2.0.44

2 months ago

2.0.43

3 months ago

2.0.42

4 months ago

2.0.41

5 months ago

2.0.40

5 months ago

2.0.37

6 months ago

2.0.38

6 months ago

2.0.35

8 months ago

2.0.36

8 months ago

2.0.33

9 months ago

2.0.34

9 months ago

2.0.39

5 months ago

2.0.32

1 year ago

2.0.31

1 year ago

2.0.30

1 year ago

2.0.29

2 years ago

2.0.28

2 years ago

2.0.27

2 years ago

2.0.26

2 years ago

2.0.24

2 years ago

2.0.25

2 years ago

2.0.22

2 years ago

2.0.23

2 years ago

2.0.19

2 years ago

2.0.20

2 years ago

2.0.21

2 years ago

2.0.18

3 years ago

2.0.17

3 years ago

2.0.16

3 years ago

2.0.15

3 years ago

2.0.14

3 years ago

2.0.13

3 years ago

2.0.12

3 years ago

2.0.11

3 years ago

2.0.10

3 years ago

2.0.7

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

4 years ago

2.0.3

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.0

6 years ago