Gathering detailed insights and metrics for source-list-map
Gathering detailed insights and metrics for source-list-map
Gathering detailed insights and metrics for source-list-map
Gathering detailed insights and metrics for source-list-map
npm install source-list-map
Typescript
Module System
Node Version
NPM Version
99.9
Supply Chain
97.1
Quality
75.8
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
3,609,665,916
Last Day
1,728,434
Last Week
10,840,119
Last Month
42,960,440
Last Year
490,920,936
MIT License
39 Stars
50 Commits
18 Forks
5 Watchers
2 Branches
81 Contributors
Updated on Oct 30, 2023
Minified
Minified + Gzipped
Latest Version
2.0.1
Package Id
source-list-map@2.0.1
Size
6.98 kB
NPM Version
5.6.0
Node Version
8.11.4
Published on
Oct 10, 2018
Cumulative downloads
Total Downloads
Last Day
-20%
1,728,434
Compared to previous day
Last Week
-0.1%
10,840,119
Compared to previous week
Last Month
46.6%
42,960,440
Compared to previous month
Last Year
-16.6%
490,920,936
Compared to previous year
1var SourceListMap = require("source-list-map").SourceListMap; 2 3// Create a new map 4var map = new SourceListMap(); 5 6// Add generated code that is map line to line to some soure 7map.add("Generated\ncode1\n", "source-code.js", "Orginal\nsource"); 8 9// Add generated code that isn't mapped 10map.add("Generated\ncode2\n"); 11 12// Get SourceMap and generated source 13map.toStringWithSourceMap({ file: "generated-code.js" }); 14// { 15// source: 'Generated\ncode1\nGenerated\ncode2\n', 16// map: { 17// version: 3, 18// file: 'generated-code.js', 19// sources: [ 'source-code.js' ], 20// sourcesContent: [ 'Orginal\nsource' ], 21// mappings: 'AAAA;AACA;;;' 22// } 23// } 24 25// Convert existing SourceMap into SourceListMap 26// (Only the first mapping per line is preserved) 27var fromStringWithSourceMap = require("source-list-map").fromStringWithSourceMap; 28var map = fromStringWithSourceMap("Generated\ncode", { version: 3, ... }); 29
new SourceListMap()
SourceListMap.prototype.add
1SourceListMap.prototype.add(generatedCode: string) 2SourceListMap.prototype.add(generatedCode: string, source: string, originalSource: string) 3SourceListMap.prototype.add(sourceListMap: SourceListMap)
Append some stuff.
SourceListMap.prototype.prepend
1SourceListMap.prototype.prepend(generatedCode: string) 2SourceListMap.prototype.prepend(generatedCode: string, source: string, originalSource: string) 3SourceListMap.prototype.prepend(sourceListMap: SourceListMap)
Prepend some stuff.
SourceListMap.prototype.toString()
Get generated code.
SourceListMap.prototype.toStringWithSourceMap
1SourceListMap.prototype.toStringWithSourceMap(options: object)
Get generated code and SourceMap. options
can contains file
property which defines the file
property of the SourceMap.
SourceListMap.prototype.mapGeneratedCode
1SourceListMap.prototype.mapGeneratedCode(fn: function) : SourceListMap
Applies fn
to each generated code block (per line). The returned value is set as new generated code. Returns a new SourceListMap.
Removing and adding lines is supported. The SourceMap complexity will increase when doing this.
Copyright (c) 2017 JS Foundation
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 4/20 approved changesets -- score normalized to 2
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
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 2025-02-03
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