Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: thlorenz/convert-source-map
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.7.0
Choose a base ref
...
head repository: thlorenz/convert-source-map
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.8.0
Choose a head ref
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Jun 17, 2021

  1. Verified

    This commit was signed with the committer’s verified signature.
    benjamn Ben Newman
    Copy the full SHA
    24cbae4 View commit details

Commits on Jun 18, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2ee0b34 View commit details
  2. 1.8.0

    thlorenz committed Jun 18, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    df4deb6 View commit details
Showing with 3 additions and 8 deletions.
  1. +0 −5 README.md
  2. +2 −2 index.js
  3. +1 −1 package.json
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# convert-source-map [![build status](https://secure.travis-ci.org/thlorenz/convert-source-map.svg?branch=master)](http://travis-ci.org/thlorenz/convert-source-map)

<a href="https://www.patreon.com/bePatron?u=8663953"><img alt="become a patron" src="https://c5.patreon.com/external/logo/become_a_patron_button.png" height="35px"></a>

Converts a source-map from/to different formats and allows adding/changing properties.

```js
@@ -120,6 +118,3 @@ Returns a comment that links to an external source map via `file`.
By default, the comment is formatted like: `//# sourceMappingURL=...`, which you would normally see in a JS source file.

When `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file.


[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/thlorenz/convert-source-map/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ Object.defineProperty(exports, 'mapFileCommentRegex', {


function decodeBase64(base64) {
return SafeBuffer.Buffer.from(base64, 'base64').toString();
return (SafeBuffer.Buffer.from(base64, 'base64') || "").toString();
}

function stripComment(sm) {
@@ -58,7 +58,7 @@ Converter.prototype.toJSON = function (space) {

Converter.prototype.toBase64 = function () {
var json = this.toJSON();
return SafeBuffer.Buffer.from(json, 'utf8').toString('base64');
return (SafeBuffer.Buffer.from(json, 'utf8') || "").toString('base64');
};

Converter.prototype.toComment = function (options) {
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "convert-source-map",
"version": "1.7.0",
"version": "1.8.0",
"description": "Converts a source-map from/to different formats and allows adding/changing properties.",
"main": "index.js",
"scripts": {