
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
babel-preset-cosmo
Advanced tools
Babel preset for Cosmo CLI
If you have bootstrapped your project with cosmo
, you are already using this preset. If you would like to configure it, Add .babelrc
to your project root. Cosmo
will use that as babel config instead of default preset.
To use it in a non-cosmo project, Follow the steps bellow:
$ npm install @babel/core @babel/cli babel-preset-cosmo
$ npm install @babel/runtime --save
Or using yarn
:
$ yarn add --dev @babel/core @babel/cli babel-preset-cosmo
$ yarn add @babel/runtime
In your .babelrc
:
{
"presets": ["cosmo"]
}
All the features supported by babel-preset-env
Support for flow
types:
const add = (x: number, y: number): number => x + y;
class Dog {
bark = () => console.log("Wooof!");
}
const sleep = ms => new Promise(res => setTimeout(res, ms));
const logAfterTenMs = async () => {
await sleep(10);
console.log("This will log after 10ms");
};
// Rest properties
let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 };
console.log(x); // 1
console.log(y); // 2
console.log(z); // { a: 3, b: 4 }
// Spread properties
let n = { x, y, ...z };
console.log(n); // { x: 1, y: 2, a: 3, b: 4 }
MIT © Sid Doshi
FAQs
Babel preset for cosmo cli
The npm package babel-preset-cosmo receives a total of 2 weekly downloads. As such, babel-preset-cosmo popularity was classified as not popular.
We found that babel-preset-cosmo 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.