commonjs
How can I 'require' CommonJS modules in the browser? [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing th[详细]
2023-04-09 01:37 分类:问答Similar pattern to promises/deferred's that support multiple results and cancellation
Similar to the promises pattern I\'m looking for an event pattern that avoids needing to pollute objects with addEventListener/etc methods, I want to be able to return an object, that can be cancelled[详细]
2023-04-08 05:25 分类:问答Use of CommonJS promises: rejection vs. exceptions
I have a function, downloadAsync(), that returns a CommonJS promise (using Q). It can fail in two ways:[详细]
2023-04-06 02:02 分类:问答module.exports vs exports in Node.js
I\'ve found the following contract in a Node.js module: module.exports = exports = nano = function database_module(cfg) {...}[详细]
2023-03-29 08:58 分类:问答How to reuse commonjs modules in the browser and server using modulr?
I\'m using modulr for using commonjs modules in the browser. The goal is to be able to reuse some of those modules also in a server environment.[详细]
2023-03-26 13:16 分类:问答NodeJS modules vs classes
To me classes are quite similar to NodeJS (CommonJS) modules. You can have many of them, they can be reused, they can use each other and they are generally one-per-file.[详细]
2023-03-25 05:59 分类:问答get information about current commonjs implementation
Is there a standard way of detecting the implementation (node.js, rhino etc) and ideally version of that implementatio开发者_开发百科n in CommonJS.[详细]
2023-03-20 08:11 分类:问答best practices for cross commonjs/browser development
Currently, I use a few defines via the Google Closure Compiler along the lines of IS_CJS and IS_BROWSER, and just have different files that get built (browser.myproject.js, cjs.myproject.js, etc).[详细]
2023-03-19 11:57 分类:问答Node.js - are modules initialised only once?
I am using node-mysql driver for a node.js app. Instead of having to set-up the mysql connection over and over again for each of my model-like modules, I do this:[详细]
2023-03-05 09:02 分类:问答EventMachine vs Node.js
I\'m going to develop a collaborative site, and one of the features will be collaborative editing with realtime changes. i.e. when two or more users are editing the same doc,开发者_高级运维 they can s[详细]
2023-02-22 12:26 分类:问答