![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
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.
Elasto Mania NPM package for working with all main game files: levels, replays, LGRs and state.dat.
npm install elmajs --save
See https://elmadev.github.io/elmajs/ for extended documentation. You will find the repository here: https://github.com/elmadev/elmajs
const fs = require('fs');
const { Level } = require('elmajs');
const fileBuffer = fs.readFileSync('C:/EOL/lev/groof89.lev');
const level = Level.from(fileBuffer);
level.name = 'rename level';
level.top10.single = []; // remove single player best times list
fs.writeFileSync('testlev.lev', level.toBuffer());
<head>
<script src="https://unpkg.com/elmajs@1.0.2/umd/main.js"></script>
<script>
(async () => {
const file = await fetch('https://eol.ams3.digitaloceanspaces.com/replays/vq0y3cwqfn/37Spef5269.rec');
const buffer = await file.arrayBuffer();
const rec = ElmaJS.Replay.from(buffer); // the UMD bundle adds a ElmaJS global variable with all functionality
const info = document.getElementById('info');
// returns whether ride in replay is finished (has a touch event as the final event)
// and the time (if finished, exact same of event -- otherwise approximation based on frame count or a touch event)
const { finished, time, reason } = rec.getTime();
info.innerHTML = `${rec.level}: ${time}`; // QWQUU037.LEV: 52690
})()
</script>
</head>
<body>
<div id="info"></div>
</body>
git clone https://github.com/YOUR-NAME/elmajs.git
cd elmajs
yarn
yarn test
and make sure everything passes.Do not modify any of the tests unless you know there is a mistake, or you need to add a new test for a new feature, or if something is missing.
If you spot any errors, make a new issue and write as many details as you can regarding the error.
FAQs
Elasto Mania NPM package to read, modify and write Elma files
We found that elmajs demonstrated a healthy version release cadence and project activity because the last version was released less than 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.