Skip to content

Instantly share code, notes, and snippets.

View KevinOrfas's full-sized avatar
🎯
Focusing

Anastasis Orfanidis KevinOrfas

🎯
Focusing
View GitHub Profile
@KevinOrfas
KevinOrfas / README.md
Created April 20, 2026 12:18
Nullable pattern: generic ConfigurableResponse<T> with EventEmitter and OutputTracker. From EkoLite.

Nullable pattern: generic ConfigurableResponse<T>

A typed, generic implementation of the ConfigurableResponse primitive used alongside OutputTracker and EventEmitter to build null objects that can be seeded with pre configured responses (including errors) for tests.

Forked and generified from EkoLite, the public dojo demo from ekohacks.

What it does

A null wrapper (e.g. FileStorage.createNull()) is used in tests instead of a real implementation. ConfigurableResponse<T> lets a test pre seed a queue of responses the null should return for each operation, including error throwing:

@KevinOrfas
KevinOrfas / SassMeister-input.scss
Created July 22, 2014 15:32
Generated by SassMeister.com.
// ----
// Sass (v3.4.0.rc.1)
// Compass (v1.0.0.alpha.20)
// ----
/**
* Generate the carousel animation
* based on the number of frames
* and the pourcentage of a frame spent static
*