Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

6to5

Package Overview
Dependencies
Maintainers
1
Versions
257
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

6to5 - npm Package Compare versions

Comparing version 1.8.0 to 1.8.1

23

lib/6to5/file.js
module.exports = File;
var SHEBANG_REGEX = /^\#\!.*/;
var transform = require("./transform");

@@ -35,8 +37,19 @@ var util = require("./util");

File.prototype.parseShebang = function (code) {
var shebangMatch = code.match(SHEBANG_REGEX);
if (shebangMatch) {
this.shebang = shebangMatch[0];
// remove shebang
code = code.replace(SHEBANG_REGEX, "");
}
return code;
};
File.prototype.parse = function (code) {
// remove shebang
code = code.replace(/^\#\!.*/, "");
var self = this;
code = this.parseShebang(code);
return util.parse(this.opts, code, function (tree) {

@@ -59,2 +72,6 @@ return self.transform(tree);

if (this.shebang) {
result.code = this.shebang + result.code;
}
if (opts.sourceMap === "inline") {

@@ -61,0 +78,0 @@ result.code += "\n" + util.sourceMapToComment(result.map);

2

package.json
{
"name": "6to5",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "1.8.0",
"version": "1.8.1",
"author": "Sebastian McKenzie <sebmck@gmail.com>",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/sebmck/6to5",

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