Gathering detailed insights and metrics for dynamic-app-templater
Gathering detailed insights and metrics for dynamic-app-templater
npm install dynamic-app-templater
Typescript
Module System
Node Version
NPM Version
63.8
Supply Chain
95.8
Quality
75
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
463
Last Day
2
Last Week
2
Last Month
6
Last Year
60
2 Commits
2 Watching
1 Branches
1 Contributors
Latest Version
1.0.0
Package Id
dynamic-app-templater@1.0.0
Unpacked Size
4.05 kB
Size
1.96 kB
File Count
4
NPM Version
6.4.1
Node Version
10.9.0
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
100%
2
Compared to previous week
Last month
200%
6
Compared to previous month
Last year
-32.6%
60
Compared to previous year
No dependencies detected.
Template strings es6 helper (onEvent, map, find).
Templater(el, component, props);
1import Templater from 'dynamic-app-templater'; 2 3function myComponent({ map, onEvent, find }, props) { 4 5 onEvent('h1', 'click', function() { 6 find('.find-my').innerHTML = 'find you!!!'; 7 }) 8 9 return ` 10 <h1>Simpale Template</h1> 11 <div class="find-my">find my</div> 12 <ul> 13 ${map(props, (item, key) =>` 14 <li>${key} - ${item}</li> 15 `)} 16 </ul> 17 `; 18} 19 20const props = { 1: 'one', 2: 'two', 3: 'three' }; 21 22Templater(document.body, myComponent, props);
Templater:
1// map(object || array, renderFunction) 2map(items, (item, key) => 3 `<div>${ item }</div>` 4)
without Templater:
1// Object.keys().map().join() 2Object.keys(items).map((itemId, index) => 3 `<div>${ items[itemId] }</div>` 4).join('')
Templater:
1// onEvent(cssSelector, eventType, eventFunction) 2// - using reletive selector path 3// - can add event before element is connected to the DOM 4// - without jQuery 5onEvent('h1', 'click', () => {})
without Templater:
1// native-js: 2document.querySelector('#my_component h1').addEventListener('click', () => {}) 3 4// jQuery: 5$('#my_component h1').on('click', () => {})
Templater:
1// find(cssSelector) 2// - using reletive selector path 3// - can use only in onEvent function 4// - without jQuery 5find('h1').innerHTML;
without Templater:
1// native-js:
2document.querySelector('#my_component h1').innerHTML;
3
4// jQuery:
5$('#my_component h1').html()
Templater:
1function myComponent({ map, onEvent, find }, props) {
2 const items = {};
3
4 return `
5 <h1>My template</h1>
6 `;
7}
8
9Templater(el, myComponent, props);
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/2 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
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