-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathindex.js
34 lines (33 loc) · 930 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
* rehype plugin to remove `type` and `language` attributes on
* JavaScript scripts.
*
* ## What is this?
*
* This package is a plugin that removes `type` and/or `language` attributes
* on JavaScript scripts, as they are unneeded.
* This plugin does not touch other `<script>` elements (such as JavaScript
* modules or non-JavaScript scripts).
*
* ## When should I use this?
*
* You can use this plugin when you want to improve the transfer size of HTML
* documents.
*
* ## API
*
* ### `unified().use(rehypeRemoveScriptTypeJavaScript)`
*
* Remove `type` and `language` attributes on JavaScript scripts.
*
* ###### Returns
*
* Transform ([`Transformer`](https://github.com/unifiedjs/unified#transformer)).
*
* @example
* {}
* <script type="text/javascript"></script>
* <script language="javascript1.5"></script>
* <script type="module"></script>
*/
export {default} from './lib/index.js'