Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
style-retriever
Advanced tools
Readme
Requests a site by url, parses html into AST then retrieves link and style tags, optionally retrieving remote css resources.
const StyleRetriever = require('style-retriever');
const retriever = new StyleRetriever('https://mysite.com');
retriever
.init()
.then(parsed => retriever.getRemoteResources())
.then(resources => console.log(resources))
// => [ {url: 'https://cdn.com/bootstrap.css', body: 'html{color: blue;}'}, etc... ]
You can specify some options in the configuration hash to the constructor:
{string} href
- url of the site to scrape. If you pass a string to the constructor, this.href
is set to that string.{array} reducers
- array of reducer functions to apply to the html AST after it has been retrieved. Defaults to two basic reducers that look for <link />
and <style>
tags.{object} accumulator
- custom accumulator, only use this if you plan on adding custom reducers. Defaults to { linkTags: [], styleTags: [] }
and isn't something you'd have to worry about in usage.FAQs
gets external css resources from a requested site
We found that style-retriever demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).