Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
6to5 turns ES6 code into vanilla ES5, so you can use ES6 features today.
$ npm install -g 6to5
To be implemented:
Compile the file script.js
and output it to script-compiled.js
.
$ 6to5 script.js -o script-compiled.js
Compile the entire src
directory and output it to the lib
directory.
$ 6to5 src -d lib
Compile the file script.js
and output it to stdout.
$ 6to5 script.js
Launch a repl.
$ 6to5-node
Evaluate code.
$ 6to5-node -e "class Test { }"
Compile and run test.js
.
$ 6to5-node test
var to5 = require("6to5");
to5.transform("code();");
to5.transformFileSync("filename.js");
to5.transformFile("filename.js", function (err, data) {
});
to5.transform("code();", {
// List of transformers to EXCLUDE
// This is a camelised version of the name found in `features`
// eg. "Arrow functions" is "arrowFunctions"
blacklist: [],
// List of transformers to ONLY use.
// See `blacklist` for naming scheme.
whitelist: [],
// Append source map and comment to bottom of returned output.
sourceMap: false,
// Returns an object `{ code: "", map: {} }` instead of an appended string.
sourceMapObject: false,
// Filename for use in errors etc.
filename: "unknown",
// Format options
// See https://github.com/Constellation/escodegen/wiki/API for options.
format: {}
});
All subsequent files required by node will be transformed into ES5 compatible code.
require("6to5/register");
Iterator/Symbol polyfill required.
Cannot subclass built-ins such as Date
, Array
, DOM
etc.
Implement own parser and generator that preserves whitespace and automatically works out generation rules based on code input.
FAQs
Turn ES6 code into readable vanilla ES5 with source maps
The npm package 6to5 receives a total of 297 weekly downloads. As such, 6to5 popularity was classified as not popular.
We found that 6to5 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.