lessen.js

code used for minimizing the languages from the repo


const langs = require('./src/lib/languages');
const fs = require('fs');

var newLangs = {};
Object.keys(langs).map((l, index) => {
  // accept only prose and programming
  if (langs[l].type === 'programming' || langs[l].type === 'prose') {
    newLangs[l] = langs[l];
  }
});
fs.writeFileSync('new.js', JSON.stringify(newLangs));

public

@anonymous

Embed Paste