Installations
npm install posthtml-urls
Releases
Unable to fetch releases
Developer
posthtml
Developer Guide
Module System
CommonJS
Min. Node Version
>= 4
Typescript Support
No
Node Version
8.1.4
NPM Version
5.6.0
Statistics
6 Stars
2 Commits
3 Watching
1 Branches
11 Contributors
Updated on 02 Mar 2024
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
4,340,371
Last day
-9.9%
5,536
Compared to previous day
Last week
-0.1%
35,365
Compared to previous week
Last month
6.2%
148,424
Compared to previous month
Last year
35%
1,922,889
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
posthtml-urls
PostHTML plugin for transforming URLs.
Installation
Node.js >= 6
is required. To install, type this at the command line:
1npm install posthtml-urls
Usage
1const posthtml = require('posthtml'); 2const urls = require('posthtml-urls'); 3 4const options = { 5 eachURL: (url, attr, element) => `http://domain.com/${url}` 6}; 7 8posthtml() 9 .use( urls(options) ) 10 .process('<a href="link.html">link</a>') 11 .then(result => console.log(result.html)); 12//-> <a href="http://domain.com/link.html">link</a>
Options
eachURL
Type: Function
Default value: undefined
A callback function ran for each URL value found. You can return either a synchronous value or a Promise
.
filter
Type: Object
Default value: {…}
The elements and attributes for which to search. An attribute value can optionally be a function, for deeper filtering.
FAQ
- How can I filter
<style>
elements andstyle
attributes?
Use posthtml-postcss and postcss-url.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 0/2 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More