Skip to content

Commit

Permalink
Add SourceNode.fromStringWithSourceMap´ to source-map` benchmark
Browse files Browse the repository at this point in the history
Closes #43.
  • Loading branch information
alopezsanchez authored and mathiasbynens committed Mar 20, 2018
1 parent 707d377 commit 49c1501
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/source-map-benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ module.exports = {
const smc = new sourceMap.SourceMapConsumer(payload);
// ...then serialize the parsed source map to a String.
const smg = sourceMap.SourceMapGenerator.fromSourceMap(smc);
return smg.toString();

// Create a SourceNode from the generated code and a SourceMapConsumer.
const fswsm = sourceMap.SourceNode.fromStringWithSourceMap(payload, smc);

return [smg.toString(), fswsm.toString()];
});
}
};

0 comments on commit 49c1501

Please sign in to comment.