
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.
This project is still in beta, and is mostly the same as JavaScript. This purpose of this module is to add some additional syntax to JavaScript. This may be updated with new features added in the future.
npm install @aspiesoft/aspiejs
const aspieJS = require('@aspiesoft/aspiejs');
// to compile a file from aspieJS to JavaScript
aspieJS.file(__dirname+'/path/to/file.js', __dirname+'/path/to/file.min.js');
// to compile a string
const output = aspieJS.script(`
validFunction(){
console.log('This function is valid in Aspie JS!')
}
log(2^2) // => console.log(Math.pow(2^2))
`);
// to compile a string in async (and minify with terser if available)
aspieJS.scriptAsync('My AspieJS Script!').then(output => {
// do stuff...
});
// to compile a file in sync
aspieJS.fileSync(__dirname+'/path/to/file', __dirname+'/path/to/file.output');
// Math.pow
let n = 2 ^ 2
n ^= 5
// nth root (Math.sqrt)
let n = 4 \ 2
n \= 5 // 5th root (n = Math.pow(n, 1/5))
// absolute value (Math.abs)
|2 - 8| // output: 8
2 - 8 // output: -8
let circumference = pi // => let circumference = Math.PI
// rounding (used Math.round with some multiplication and division)
// JavaScripts .toFixed method does not handle negative values
log(circumference ~ 0) // output: 3
circumference ~= 2
log(circumference) // output 3.14
// typeof is modified to output other common var types
typeof 'string' === 'string'
typeof /regex/ === 'regex'
typeof [1, 2, 3] === 'array'
typeof {key: 'value'} === 'object'
typeof null === 'null'
// regex modifications
/number \c/ // => /number (?:-?[0-9]+(?:\\.[0-9]+|)|-?\\.[0-9]+)/
// in addition, objects are auto closed to prevent errors
{[1, 2], [3, 4} // compiles to => {[1, 2], [3, 4]}
FAQs
A modified script that compiles to JavaScript.
The npm package aspiejs receives a total of 0 weekly downloads. As such, aspiejs popularity was classified as not popular.
We found that aspiejs 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.