/mjs-polyfill

Mongoose os example project with standardization polyfill

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

mjs-polyfill

Mongoose OS example project with standardization polyfill

Usage:

At top of init.js add:

load('polyfill.js');

Implements:

setTimeout/setInterval

let intervalId = setInterval(function() {
    // Will repeate every 1000 ms (1 sec)
}, 1000);

clearTimeout/clearInterval

clearTimeout(intervalId);

NodeJS-like exporting system

moduleName.js:

module.exports = {
    name: 'moduleName.js',
};

NodeJS-like importing system

init.js:

let someModule = require('moduleName.js');

console

console.log('Required moduleName:', someModule.name);
ESP8266 tested