![Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack](https://cdn.sanity.io/images/cgdhsj6q/production/6af25114feaaac7179b18127c83327568ff592d1-1024x1024.webp?w=800&fit=max&auto=format)
Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
@bradymholt/ampify
Advanced tools
Readme
Convert plain HTML to Google AMP (Accelerated Mobile Pages)
npm install @bradymholt/ampify
const ampify = require("ampify");
const html = "<YOUR_HTML_CONTENT>";
const amp = await ampify(html, { cwd: "amp" });
console.log(amp); // Content of AMP HTML
When <link rel=stylesheet>
and <img/>
tags with a local file reference are encountered, they will read and processed. This option specifies where the files are located (i.e. fs.existsSync(`${options.cwd}/${imagSrc}`))
.
String
''
String
true
<html>
<head>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<img src="image.png" />
</body>
</html>
<html amp>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style>
<noscript>
<style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style>
</noscript>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<amp-img src="image.png" width="600" height="400"></amp-img>
</body>
</html>
FAQs
Convert plain HTML to Google Accelerated Mobile Pages (AMP)
The npm package @bradymholt/ampify receives a total of 1 weekly downloads. As such, @bradymholt/ampify popularity was classified as not popular.
We found that @bradymholt/ampify 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
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.