Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rehype-minify-enumerated-attribute

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rehype-minify-enumerated-attribute

rehype plugin to minify enumerated attributes

  • 3.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

rehype-minify-enumerated-attribute

Build Coverage Downloads Size Sponsors Backers Chat

Minify enumerated attributes.

Sometimes attributes or their values can be dropped entirely, or a shorter value can be used.

Install

npm:

npm install rehype-minify-enumerated-attribute

Use

On the API:

 unified()
   .use(require('rehype-parse'))
+  .use(require('rehype-minify-enumerated-attribute'))
   .use(require('rehype-stringify'))
   .process('<span>some html</span>', function (err, file) {
     console.error(report(err || file))
     console.log(String(file))
   })

On the CLI:

rehype input.html --use minify-enumerated-attribute > output.html

Example

In
<meta charset="utf-8">
<video preload="auto">
  <track kind="subtitles" src="abc.xyz">
</video>
Out
<meta charset="utf8">
<video preload="">
  <track src="abc.xyz">
</video>

Contribute

See contributing.md in rehypejs/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 08 Dec 2020

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