Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Syntactic transformations of JavaScript code, with taking care of whitespaces and comments.
krasota.js is trying to save the world. It provides the ability to carry out the syntactic transformation JavaScript code. Conversions can be both for the protection coding style, and for more complex refactorings logic.
Note: For using from command-line you should install it globally -- npm install -g krasota
.
$ krasota --help
Usage:
krasota [OPTIONS]
Options:
-h, --help : Help
-v, --version : Version
-i INPUT, --input=INPUT : Input file (default: stdin)
-o OUTPUT, --output=OUTPUT : Output file (default: stdout)
-b BEAUTIFIERS, --beautifier=BEAUTIFIERS : Local or global path to beautifier module, can be used many times
Examples:
$ krasota -i tests/split-vars.js -b krasota/lib/beautifiers/split-vars
$ krasota -i tests/join-vars.js -b krasota/lib/beautifiers/trailing-whitespaces -b krasota/lib/beautifiers/join-vars
$ krasota -i my-file.js -o my-beauty-file.js -b ./local/path/to/my/beautifier
Note: If you are using krasota
programatically you should not install it globally, it's enough to declare depends in package.json
.
Because of using COA all command-line interface available through require('krasota').COA
.
Example:
require('krasota').COA
.invoke({
input: 'tests/join-vars.js',
beautifiers: [ 'lib/beautifiers/trailing-whitespaces', 'krasota/lib/beautifiers/join-vars' ]
})
You can use krasota
through the require('krasota')
in terms of raw OmetaJS-grammas.
Take a look to the tests/tests.js for example of usage.
There are some proof-of-concept beautifiers:
var
statements into one var
statement with multiply assignsvar
statements with multiply assigns into multiply consecutive var
statementsRun make tests
for tests. For development version tests run make tests ENV=development
.
FAQs
Syntactic transformations of JavaScript code, with taking care of whitespaces and comments.
The npm package krasota receives a total of 13 weekly downloads. As such, krasota popularity was classified as not popular.
We found that krasota 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 allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.