Socket
Socket
Sign inDemoInstall

convert-source-map

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convert-source-map - npm Package Compare versions

Comparing version 1.1.3 to 1.2.0

5

index.js

@@ -144,2 +144,7 @@ 'use strict';

exports.generateMapFileComment = function (file, options) {
var data = 'sourceMappingURL=' + file;
return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
};
Object.defineProperty(exports, 'commentRegex', {

@@ -146,0 +151,0 @@ get: function getCommentRegex () {

2

package.json
{
"name": "convert-source-map",
"version": "1.1.3",
"version": "1.2.0",
"description": "Converts a source-map from/to different formats and allows adding/changing properties.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -120,3 +120,11 @@ # convert-source-map [![build status](https://secure.travis-ci.org/thlorenz/convert-source-map.png)](http://travis-ci.org/thlorenz/convert-source-map)

### generateMapFileComment(file, [options])
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")

@@ -51,2 +51,8 @@ 'use strict';

test('to map file comment', function (t) {
t.equal(convert.generateMapFileComment('index.js.map'), '//# sourceMappingURL=index.js.map');
t.equal(convert.generateMapFileComment('index.css.map', { multiline: true }), '/*# sourceMappingURL=index.css.map */');
t.end();
})
test('from source', function (t) {

@@ -53,0 +59,0 @@ var foo = [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc