Skip to content

Instantly share code, notes, and snippets.

@Minigugus
Minigugus / index.js
Last active July 31, 2021 18:53
Lightweight (~2kB minified), performent and type checked reactive state management library inspired by Vue 3 supporting IE9.
// MIT License (C) Minigugus 2021
/**
* Handy reactive state management inspired by Vue 3.
*
* You might be insterested by this lib if:
* * Your project targets an old browser (this code should support IE9 without transform)
* * You like to Keep It Simple
* * You're a VanillaJS lover but also a declarative state management lover
* * You have to prototype/develop fast but:
@Minigugus
Minigugus / index.js
Created July 30, 2021 19:53
Dead simple (~3kB) declarative library supporting IE9 that emulate the Vue 3 `ref`-like API
// MIT License (C) Minigugus 2021
/**
* @template T
* @param {T} value
* @class
*/
function Ref(value, debounce = 0) {
if (typeof self === 'undefined')
return new Ref(value);
/*
* A HTTP Source for Aurora.JS (https://github.com/audiocogs/aurora.js) allowing real-time decoding and playing.
* Use fetch & Streams API in order to process the response in real-time.
*
* Example :
*
* var player = new AV.Player(new AV.Asset(new HTTPLiveSource('http://example.com/live.aac')))
* player.play();
*
*/