MCPcopy Index your code
hub / github.com/css/csso / getGeneratedPosition

Function getGeneratedPosition

test/sourceMaps.js:31–48  ·  view source on GitHub ↗
(str, source)

Source from the content-addressed store, hash-verified

29}
30
31function getGeneratedPosition(str, source) {
32 const index = source.indexOf(str);
33 let line = null;
34 let column = null;
35
36 if (index !== -1) {
37 const lines = source.substr(0, index).split('\n');
38
39 line = lines.length;
40 column = lines.pop().length;
41 }
42
43 return {
44 line,
45 column,
46 lastColumn: null
47 };
48}
49
50function defineSourceMap(filename) {
51 const string = `{"version":3,"sources":["${filename}"],"names":[],"mappings":"AAAA,E,CAAK,S,CACL,E,CAAK,a,CAAgB,U","file":"${filename}","sourcesContent":[${JSON.stringify(css)}]}`;

Callers 1

sourceMaps.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…