New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

6to5-brunch

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

6to5-brunch - npm Package Compare versions

Comparing version 1.7.2 to 1.7.3

25

index.js

@@ -0,5 +1,7 @@

'use strict';
var to5 = require('6to5');
function ES6to5Compiler(config) {
if (config == null) config = {};
if (config == null) { config = {}; }
var options = config.plugins && config.plugins.ES6to5 || {};

@@ -9,6 +11,6 @@ var _this = this;

Object.keys(options).forEach(function (key) {
if (key === 'sourceMap') return;
if (key === 'sourceMap') { return; }
_this.options[key] = options[key];
});
this.options.sourceMapObject = !!config.sourceMaps;
this.options.sourceMaps = !!config.sourceMaps;
}

@@ -22,3 +24,3 @@

this.options.filename = params.path;
var compiled, lines, mapComment, map;
var compiled;
try {

@@ -29,15 +31,8 @@ compiled = to5.transform(params.data, this.options);

}
if (this.options.sourceMap) {
lines = compiled.code.split('\n');
mapComment = lines.splice(-2, 1)[0];
if (mapComment.slice(0, 26) === '//# sourceMappingURL=data:') {
compiled = lines.join('\n');
map = (new Buffer(mapComment.slice(50), 'base64').toString());
}
} else {
compiled = {code: compiled};
}
return callback(null, {data: compiled.code, map: compiled.map});
callback(null, {
data: compiled.code || compiled,
map: !!compiled.map && compiled.map.toJSON()
});
};
module.exports = ES6to5Compiler;

2

package.json
{
"name": "6to5-brunch",
"version": "1.7.2",
"version": "1.7.3",
"description": "Brunch plugin to turn ES6 code into vanilla ES5 with no runtime required.",

@@ -5,0 +5,0 @@ "author": "Elan Shanker",

@@ -1,2 +0,3 @@

# 6to5-brunch
6to5-brunch
===========
Brunch plugin using [6to5](https://github.com/sebmck/6to5) to turn ES6 code

@@ -7,6 +8,8 @@ into vanilla ES5 with no runtime required.

## Installation
Installation
------------
`npm install --save 6to5-brunch`
## Configuration
Configuration
-------------
Set [6to5 options](https://github.com/sebmck/6to5#options) in your brunch

@@ -24,4 +27,8 @@ config (such as `brunch-config.coffee`) exceptfor `filename` and `sourceMap`

## License
Change Log
----------
[See release notes page on GitHub](https://github.com/es128/6to5-brunch/releases)
License
-------
[ISC](https://raw.github.com/es128/6to5-brunch/master/LICENSE)
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