Gathering detailed insights and metrics for pupa-tag
Gathering detailed insights and metrics for pupa-tag
Gathering detailed insights and metrics for pupa-tag
Gathering detailed insights and metrics for pupa-tag
npm install pupa-tag
69.2
Supply Chain
85.7
Quality
75.1
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
194 Commits
1 Watching
10 Branches
2 Contributors
Updated on 28 Jan 2023
Minified
Minified + Gzipped
TypeScript (79.99%)
JavaScript (20.01%)
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
50%
3
Compared to previous week
Last month
0%
10
Compared to previous month
Last year
0%
197
Compared to previous year
1
1/**repare of using this 2 * ```sh 3 * yarn add pupa-tag 4 * ``` 5 */ 6import appropriateName from 'pupa-tag'; 7// e.g.) import sql from 'pupa-tag';
or
1<script src="https://unpkg.com/pupa-tag/pupa-tag.js"></script> 2<script> 3 // Can use the `pupaTag` here. 4</script>
In the below, definition the selectById
which is expected passing into arguments {id: number}
.
1const selectById = sql<{id: number}>`select * from foo where id = {id}`; 2console.log(selectById({id: 123})); 3// 'select * from foo where id = 123'
You could divide into serveral contents. For example in the below, sentence after the where
is allocated as the whereBy
variable.
1const whereBy = pupaTag<{id: number}>`where id = {id}`; 2const selectById = pupaTag<{id: number}>`select * from foo ${whereBy}`; 3console.log(selectById({id: 123})); 4// 'select * from foo where id = 123'
And also the whereBy
is function thus you can use its result as string
. (({id: number}) => string
).
1const whereBy = pupaTag<{id: number}>`where id = {id}`; 2const selectById = pupaTag<{id: number}>`select * from foo ${whereBy({ 3 id: 123, 4})}`; 5console.log(selectById()); 6// 'select * from foo where id = 123'
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
project is archived
Details
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
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
60 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
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