Skip to content

Instantly share code, notes, and snippets.

View dallonf's full-sized avatar

Dallon Feldner dallonf

View GitHub Profile

Motivation

  • expression-oriented programming one of the great advances of FP
  • expressions plug together like legos, making more malleable programming experience in-the-small

Examples

Write in an expression-oriented style, scoping variables as locally as possible:

@adam-lynch
adam-lynch / requireNoCache.js
Last active April 12, 2025 08:46
Require a module, without going to Node.js's require cache
var path = require('path');
var _invalidateRequireCacheForFile = function(filePath){
delete require.cache[path.resolve(filePath)];
};
var requireNoCache = function(filePath){
_invalidateRequireCacheForFile(filePath);
return require(filePath);
};