Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Asondo/mjs-polyfill
Mongoose os example project with standardization polyfill
https://github.com/Asondo/mjs-polyfill
esp32 esp8266 example mjslibrary mongoose-os nodejs polyfill require setinterval
Last synced: 21 days ago
JSON representation
Mongoose os example project with standardization polyfill
- Host: GitHub
- URL: https://github.com/Asondo/mjs-polyfill
- Owner: Asondo
- License: gpl-3.0
- Created: 2019-07-11T17:58:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-12T16:03:38.000Z (over 5 years ago)
- Last Synced: 2024-07-31T21:53:00.992Z (4 months ago)
- Topics: esp32, esp8266, example, mjslibrary, mongoose-os, nodejs, polyfill, require, setinterval
- Language: JavaScript
- Size: 22.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mongoose-os - mJS Polyfill - Mongoose os example project with standardization polyfill (Awesome Mongoose OS [![Awesome](https://awesome.re/badge.svg)](https://awesome.re) / Community Examples)
README
# 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_