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
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
171 Stars
158 Commits
9 Forks
3 Watchers
4 Branches
6 Contributors
Updated on Jun 07, 2025
Latest Version
2.2.0
Package Id
ts-dedent@2.2.0
Size
5.78 kB
NPM Version
6.14.9
Node Version
14.15.1
Published on
Aug 01, 2021
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
TypeScript package which smartly trims and strips indentation from multi-line strings.
1import dedent from '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.0
2021-08-01 Add indentation to values with multiline strings & added ESM module2.1.1
2021-03-31 Update dependencies2.1.0
2021-03-24 Bugfixes2.0.0
2020-09-28 Bugfixes1.2.0
2020-09-28 Update dependencies and a couple of minor improvments1.1.0
2019-07-26 Update 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
dependency not pinned by hash detected -- score normalized to 1
Details
Reason
9 existing vulnerabilities detected
Details
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
Found 0/6 approved changesets -- score normalized to 0
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
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-30
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