Installations
npm install dedent-js
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
0.12.7
NPM Version
3.3.4
Score
99.9
Supply Chain
88.1
Quality
75.1
Maintenance
100
Vulnerability
100
License
Contributors
Unable to fetch Contributors
Languages
JavaScript (88.3%)
TypeScript (11.7%)
Developer
MartinKolarik
Download Statistics
Total Downloads
18,837,880
Last Day
33,811
Last Week
166,806
Last Month
761,924
Last Year
8,154,196
GitHub Statistics
55 Stars
14 Commits
6 Forks
2 Watching
1 Branches
1 Contributors
Bundle Size
659.00 B
Minified
392.00 B
Minified + Gzipped
Package Meta Information
Latest Version
1.0.1
Package Id
dedent-js@1.0.1
Size
2.84 kB
NPM Version
3.3.4
Node Version
0.12.7
Publised On
19 Sept 2015
Total Downloads
Cumulative downloads
Total Downloads
18,837,880
Last day
-4.6%
33,811
Compared to previous day
Last week
-12.7%
166,806
Compared to previous week
Last month
13.1%
761,924
Compared to previous month
Last year
65.3%
8,154,196
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
4
dedent-js
Removes indentation from multiline strings. Works with both tabs and spaces.
Installation
$ npm install dedent-js
Usage
1// Dedent can be also used as a function. 2expect(dedent`Line #1 3 Line #2 4 Line #3`).to.equal('Line #1\nLine #2\nLine #3'); 5 6// Leading/trailing line break is removed. 7expect( 8 dedent` 9 Line #1 10 Line #2 11 Line #3 12 ` 13).to.equal('Line #1\nLine #2\nLine #3'); 14 15// No more than one leading/trailing line break is removed. 16expect( 17 dedent` 18 19 Line #1 20 Line #2 21 Line #3 22 23 ` 24).to.equal('\nLine #1\nLine #2\nLine #3\n'); 25 26// Only the "base" indentation is removed. 27expect( 28 dedent` 29 Line #1 30 Line #2 31 Line #3 32 ` 33).to.equal('Line #1\n\tLine #2\n\t\tLine #3'); 34 35// The last line is ignored if it doesn't contain anything else than whitespace. 36expect( 37 function () { 38 return dedent` 39 Line #1 40 Line #2 41 Line #3 42 `; 43 }() 44).to.equal('Line #1\nLine #2\nLine #3'); 45 46// Escaped characters are NOT ignored. 47expect( 48 dedent` 49 \tLine #1 50 \tLine #2 51 \tLine #3 52 ` 53).to.equal('Line #1\nLine #2\nLine #3');
License
Copyright (c) 2015 Martin Kolárik. Released under the MIT license.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 existing vulnerabilities detected
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/14 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
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