
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@gotoeasy/csjs
Advanced tools
CSS、JS的编译、美化、压缩等常用操作封装
npm i @gotoeasy/csjs
const csjs = require('@gotoeasy/csjs');
let lessCode = `
@base: #f938ab;
.box {
color: @base;
}`;
(async function(){
let rs = await csjs.lessToCss(lessCode);
console.info(rs.css);
})();
/*
.box {
color: #f938ab;
}
*/
const csjs = require('@gotoeasy/csjs');
let sassCode = `
$base: #f938ab;
.box {
color: $base;
}`;
(async function(){
let css = await csjs.sassToCss(sassCode);
console.info(css);
})();
/*
.box {
color: #f938ab;
}
*/
const csjs = require('@gotoeasy/csjs');
(async function(){
let rs = await csjs.formatCss('.box { color: #f938ab; }');
console.info(rs.css);
})();
/*
.box {
color: #f938ab;
}
*/
const csjs = require('@gotoeasy/csjs');
(async function(){
let rs = await csjs.miniCss('.box { color: #f938ab; }');
console.info(rs.css);
})();
/*
.box{color:#f938ab}
*/
const csjs = require('@gotoeasy/csjs');
let jsCode = `
(function(window){
class Component { constructor(html, props={}, defaults={}) {
let template = new Template(html, '$props, $data');
this.render = $data =>{ let model = extend(defaults, $data);
return createDocumentFragment( template.toString(props, model) );}
}} window.TheComponent = Component;
}(window))
`;
let jsFmt = csjs.formatJs(jsCode);
console.info(jsFmt);
/*
(function(window) {
class Component {
constructor(html, props = {}, defaults = {}) {
let template = new Template(html, "$props, $data");
this.render = $data => {
let model = extend(defaults, $data);
return createDocumentFragment(template.toString(props, model));
};
}
}
window.TheComponent = Component;
})(window);
*/
const csjs = require('@gotoeasy/csjs');
let jsCode = `
(function(window) {
class Component {
constructor(html, props = {}, defaults = {}) {
let template = new Template(html, "$props, $data");
this.render = $data => {
let model = extend(defaults, $data);
return createDocumentFragment(template.toString(props, model));
};
}
}
window.TheComponent = Component;
})(window);
`;
let jsMin = csjs.miniJs(jsCode);
console.info(jsCode);
/*
!function(e){e.TheComponent=class{constructor(e,t={},n={}){let r=new Template(e,"$props, $data");this.render=(e=>{let o=extend(n,e);return createDocumentFragment(r.toString(t,o))})}}}(window);
*/
const csjs = require('@gotoeasy/csjs');
let code = `
let fn = (...args) => args.includes('y') ? Promise.resolve(args) : Promise.reject(args);
`;
let js = csjs.babel(code);
console.info(js);
const csjs = require('@gotoeasy/csjs');
let code = `
"use strict";
require("core-js/modules/es6.string.starts-with");
var flg = 'abc'.startsWith('a');
`;
(async function(){
let js = await csjs.browserify(code);
console.info(js);
})();
Linksnpm-packages https://github.com/gotoeasy/npm-packagesFAQs
CSS、JS常用的编译、美化、压缩操作封装
We found that @gotoeasy/csjs 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.