Skip to content

Instantly share code, notes, and snippets.

@gaearon
Created October 10, 2014 10:57
Show Gist options
  • Select an option

  • Save gaearon/f49518e5e8b0a7d9e450 to your computer and use it in GitHub Desktop.

Select an option

Save gaearon/f49518e5e8b0a7d9e450 to your computer and use it in GitHub Desktop.
function makeIdentitySourceMap(map, source, resourcePath) {
source.split('\n').map(function (line, index) {
map.addMapping({
source: resourcePath,
original: {
line: index + 1,
column: 0
},
generated: {
line: index + 1,
column: 0
}
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment