Provided as distinct CJS modules, installable via npm
Individual modules of es5-ext package. See ES6 features for usage information.
Individual modules of es5-ext package. See ES6 features for usage information.
**~~ NOTE: This is a Stage 0 proposal. ~~**
Please direct all future feedback to that repo in the form of directed issues.
Note: Up to date version now at https://github.com/lukehoban/es6features
ECMAScript 6 is the upcoming version of the ECMAScript standard. This standard is targetting ratifcation in December 2014. ES6 is a significant update to the language, and the first update to the language since ES5 was standardized in 2009. Implementation of these features in major JavaScript engines is underway now.
See the draft ES6 standard for full specification of the ECMAScript 6 language.
ES6 includes the following new features:
// Anonymous empty module. | |
define(); | |
// Anonymous values. | |
define({}); | |
define(true); | |
define(1234); | |
define(null); | |
define(undefined); |
// A. Create a new object that will contain the names ES6 module exports. We create it immediately so that | |
// it will work across cycles. | |
var es6Out = {}; | |
// B. Assign it immediately to module.exports so other files that try to require this file will see it | |
// right away. | |
module.exports = { | |
__es6_module__: es6Out | |
}; |
This section describes the conventions used here to describe type signatures.
A [T]
is an array-like value (only ever used read-only in this API), i.e., one with an integer length
and whose indexed properties from 0 to length - 1
are of type T
.
A type T?
should be read as T | undefined
-- that is, an optional value that may be undefined
.
This section describes the conventions used here to describe type signatures.
A [T]
is an array-like value (only ever used read-only in this API), i.e., one with an integer length
and whose indexed properties from 0 to length - 1
are of type T
.
A type T?
should be read as T | undefined
-- that is, an optional value that may be undefined
.
Design forces:
baseURL + moduleID + '.js'
is likely the default ID-to-URL resolution, but other declarative config could be possible for browser-based ES Module Loaders. Examples of useful declarative config in this area are the problems solved via common AMD loader configSo it will be common in JS code to use string IDs, and not URLs to refer to dependency resources.
With the coming of web components and custom elements, it will be possible for a custom element to depend on other custom e
This is an initial attempt at gathering together up to date resources on ES6 modules.
Creating npm packages which extend the functionality of Express apps has become a major thing we've been doing. There are several approaches we can take, from messing with the Express object prototypes, to creating a function in which an express app is passed in. After trying the former, I'm now a fan of the latter.
Extending the Express object prototypes has issues. The running Node.js process may have multiple versions of express
, and in order to extend the prototypes you need to require('express')
. This means that you might get a different express
module instance than the one the main app is created from.
Both approaches suffer from extending something more than once. Similar to how there may be multiple version of express
in the running Node.js process, there can also be multiple copies of the extension modules. If the app developer needs to rely on a different version of an Express ext