Gathering detailed insights and metrics for ts-dedent
Gathering detailed insights and metrics for ts-dedent
Gathering detailed insights and metrics for ts-dedent
Gathering detailed insights and metrics for ts-dedent
TypeScript package which smartly trims and strips indentation from multi-line strings
npm install ts-dedent
99.8
Supply Chain
99.5
Quality
75.5
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
163 Stars
158 Commits
8 Forks
4 Watching
4 Branches
6 Contributors
Updated on 28 Oct 2024
Minified
Minified + Gzipped
TypeScript (100%)
Cumulative downloads
Total Downloads
Last day
-5.8%
1,403,384
Compared to previous day
Last week
2.3%
7,695,617
Compared to previous week
Last month
8.5%
32,492,540
Compared to previous month
Last year
16.6%
337,787,165
Compared to previous year
TypeScript package which smartly trims and strips indentation from multi-line strings.
1import { dedent } from 'ts-dedent'; 2 3console.log(dedent`A string that gets so long you need to break it over 4 multiple lines. Luckily dedent is here to keep it 5 readable without lots of spaces ending up in the string 6 itself.`); 7 8console.log(dedent` 9 A string that gets so long you need to break it over 10 multiple lines. Luckily dedent is here to keep it 11 readable without lots of spaces ending up in the string 12 itself. 13`);
1A string that gets so long you need to break it over 2multiple lines. Luckily dedent is here to keep it 3readable without lots of spaces ending up in the string 4itself.
1console.log(dedent` 2 Leading and trailing lines will be trimmed, so you can write something like 3 this and have it work as you expect: 4 5 * how convenient it is 6 * that I can use an indented list 7 - and still have it do the right thing 8 9 That's all. 10`);
1Leading and trailing lines will be trimmed, so you can write something like 2this and have it work as you expect: 3 4 * how convenient it is 5 * that I can use an indented list 6 - and still have it do the right thing 7 8That's all.
1console.log(dedent` 2 Also works fine 3 4 ${1}. With any kind of 5 ${2}. Placeholders 6`);
1Also works fine 2 31. With any kind of 42. Placeholders
1console.log(dedent(` 2 Wait! I lied. Dedent can also be used as a function. 3`);
1Wait! I lied. Dedent can also be used as a function.
MIT
See history for more details.
2.2.1
2021-08-01 Update build dependencies and fixed typos in readme2.2.0
2021-08-01 Add indentation to values with multiline strings & added ESM module2.1.1
2021-03-31 Update build dependencies2.1.0
2021-03-24 Bugfixes2.0.0
2020-09-28 Bugfixes1.2.0
2020-09-28 Update build dependencies and a couple of minor improvments1.1.0
2019-07-26 Update build dependencies and fixed links in readme1.0.0
2018-06-14 Initial releaseNo vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
7 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 1
Details
Reason
Found 0/6 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
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
SAST tool is not run on all commits -- score normalized to 0
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