Skip to content Skip to sidebar Skip to footer
Showing posts with the label Commonjs

How To Browserify A Browserified Module?

The title seems confusing but I'll give an example. Let's say I create a module that uses E… Read more How To Browserify A Browserified Module?

How To Import Part Of Object In Es6 Modules

In the react documentation I found this way to import PureRenderMixin var PureRenderMixin = require… Read more How To Import Part Of Object In Es6 Modules

Load Stripe.js With Require.js

I'm having trouble loading Stripe.js with Require.js. My setup looks a bit like this requirejs.… Read more Load Stripe.js With Require.js

Jest - Mock A Constant Property From A Module For A Specific Test

So, I'm attempting to do something which on the surface should be very simple... I have some co… Read more Jest - Mock A Constant Property From A Module For A Specific Test

What Is The Benefit Of A 'promise' Abstraction In CommonJS?

I'm reading this article and the section on the promise abstraction seems a little overly compl… Read more What Is The Benefit Of A 'promise' Abstraction In CommonJS?

CommonJS Modules - Exporting A Function That Returns A Function With Arguments

In this rendr - sessions example, there's an express middleware module... module.exports = func… Read more CommonJS Modules - Exporting A Function That Returns A Function With Arguments