Skip to content

Instantly share code, notes, and snippets.

View miniBill's full-sized avatar

Leonardo Taglialegne miniBill

  • Italy
  • 18:16 (UTC +02:00)
View GitHub Profile
@Janiczek
Janiczek / elm-make-readable.mjs
Created April 15, 2022 19:46
elm-make-readable
import fs from 'fs/promises';
const rules = [
{
rule: /var ([^=]+)( = F\d\([^f]+function)[^(]\(/gmi,
replacement: `var $1$2 __$1( `,
},
{
rule: /(\sA\d\([\s]+)([^,]+)(,[\s]+)(function[^(]+)\(/gm,
replacement: `$1$2$3$4___$2(`,
},