Gathering detailed insights and metrics for babel-plugin-mithril-add-data-attribute
Gathering detailed insights and metrics for babel-plugin-mithril-add-data-attribute
npm install babel-plugin-mithril-add-data-attribute
Typescript
Module System
Node Version
NPM Version
72.2
Supply Chain
97.4
Quality
75.7
Maintenance
100
Vulnerability
100
License
TypeScript (77.64%)
JavaScript (22.36%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
9,314
Last Day
3
Last Week
13
Last Month
38
Last Year
216
20 Commits
1 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.8
Package Id
babel-plugin-mithril-add-data-attribute@1.0.8
Unpacked Size
21.01 kB
Size
4.17 kB
File Count
5
NPM Version
6.14.10
Node Version
12.20.1
Cumulative downloads
Total Downloads
Last day
0%
3
Compared to previous day
Last week
18.2%
13
Compared to previous week
Last month
137.5%
38
Compared to previous month
Last year
-80.4%
216
Compared to previous year
20
This plugin adds a data-component
attribute to top-level DOM elements rendered by mithril component function m
. Intended for development - bloats HTML. Helps debug: find your components in a large repo from generated HTML. Adds component name or file name to component data attributes which will be visible in the generated HTML.
attrs
to be an object and getAttrs
to be a function returning an attrs
objectNeeds more tests and better support, feel free to add issues with failing test code or commit a PR. Written in TypeScript. Not tested or used in production.
In
1const Comp2 = () => m("div"); 2 3const MyComponent = () => { 4 return m("div", m(Comp2)); 5};
Out
1const Comp2 = () => 2 m("div", { 3 "data-component": "Comp2", 4 }); 5 6const MyComponent = () => { 7 return m( 8 "div", 9 { 10 "data-component": "MyComponent", 11 }, 12 m(Comp2) 13 ); 14};
For many more examples se test/index.test.js
1# yarn 2yarn add --dev babel-plugin-mithril-add-data-attribute 3 4# npm 5npm install --save-dev babel-plugin-mithril-add-data-attribute
.babelrc
.babelrc
1{ 2 "env": { 3 "development": { 4 "plugins": ["mithril-add-data-attribute"] 5 } 6 } 7}
(since it's not intended for production code)
1babel --plugins mithril-add-data-attribute script.js
1require("babel-core").transform("code", { 2 plugins: ["mithril-add-data-attribute"], 3});
Under development.
Please do. Add an issue or PR.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/20 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
23 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
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