Skip to content

Instantly share code, notes, and snippets.

View jhnns's full-sized avatar
🧀
When in doubt add cheese!

Johannes Ewald jhnns

🧀
When in doubt add cheese!
View GitHub Profile
@jhnns
jhnns / index.json
Last active May 31, 2017 15:32
Github stars history of Meteor. Compiled with https://github.com/jhnns/popular-javascript-projects
This file has been truncated, but you can view the full file.
[
"2012-01-19T01:58:17Z",
"2012-01-19T01:58:17Z",
"2012-01-19T01:58:17Z",
"2012-01-19T01:58:17Z",
"2012-01-19T01:58:17Z",
"2012-01-19T01:58:17Z",
"2012-01-19T01:58:17Z",
"2012-01-19T01:58:17Z",
"2012-01-19T01:58:17Z",
@jhnns
jhnns / generate.js
Created May 12, 2017 23:42
Dynamic modules
module.exports = options => ({
cacheable: true,
code: "console.log('Hello')"
}};
@jhnns
jhnns / node-function-wrapper.js
Last active October 23, 2018 04:04
Node function wrapper
const module = {
exports: {}
};
const require = makeRequireFunction();
const filename = "...";
const dirname = "...";
(function (exports, require, module, __filename, __dirname) {
/* YOUR CODE */
})(module.exports, require, module, filename, dirname);
@jhnns
jhnns / webpack-runtime-example.js
Last active September 1, 2018 07:00
Webpack module runtime example
(function(modules) {
// This is the module runtime.
// It's only included once per compilation.
// Other chunks share the same runtime.
var installedModules = {};
// The require function
function __webpack_require__(moduleId) {
...
}
...
@jhnns
jhnns / a.js
Last active May 23, 2017 17:17
Bundle example
export let number = 42;
export function incr() {
number++;
}
@jhnns
jhnns / a.js
Last active May 15, 2017 14:55
Comparison of ambiguous grammar edge cases
console.log(this);
@jhnns
jhnns / example.js
Created May 16, 2017 14:00
CJS consuming an ESM
const driverPromise = import("dbdriver");
exports.readFromDb = async (query) => {
return (await driverPromise).read(query);
};
@jhnns
jhnns / index.json
Last active May 31, 2017 15:30
Github stars history of Express. Compiled with https://github.com/jhnns/popular-javascript-projects
[
"2009-06-26T18:56:01Z",
"2009-06-26T18:56:01Z",
"2009-06-26T18:56:01Z",
"2009-06-26T18:56:01Z",
"2009-06-26T18:56:01Z",
"2009-06-26T18:56:01Z",
"2009-06-26T18:56:01Z",
"2009-06-26T18:56:01Z",
"2009-06-26T18:56:01Z",
@jhnns
jhnns / index.json
Last active May 31, 2017 15:29
Github stars history of Backbone. Compiled with https://github.com/jhnns/popular-javascript-projects
[
"2010-09-30T19:41:28Z",
"2010-09-30T19:41:28Z",
"2010-09-30T19:41:28Z",
"2010-09-30T19:41:28Z",
"2010-09-30T19:41:28Z",
"2010-09-30T19:41:28Z",
"2010-09-30T19:41:28Z",
"2010-09-30T19:41:28Z",
"2010-09-30T19:41:28Z",
@jhnns
jhnns / index.json
Last active May 31, 2017 15:29
Github stars history of Ember. Compiled with https://github.com/jhnns/popular-javascript-projects
[
"2011-05-25T23:39:40Z",
"2011-05-25T23:39:40Z",
"2011-05-25T23:39:40Z",
"2011-05-25T23:39:40Z",
"2011-05-25T23:39:40Z",
"2011-05-25T23:39:40Z",
"2011-05-25T23:39:40Z",
"2011-05-25T23:39:40Z",
"2011-05-25T23:39:40Z",