Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
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
# install without terser (optional)
npm install --no-optional @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 - 10| // output: 8
2 - 10 // 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.