downloads
Across all versions.
Download trend unavailable.
compatibility
Runtime metadata.
nodeany
cjs
keywords
Tagged topics.
endermodulescommonjs
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
The core client library to Ender providing you with require, provide, and a Module class.
require(id)var each = require('underscore').each
var select = require('sizzle')
each(select('h1'), function (el) {
el.style.color = 'red'
})require._modulesIncludes the list of which modules are available for use in your Ender bundle
require._cacheIncludes the list of modules that have been required() by the implementer.
provide (id, value)provide('client/utils', {
formatNumber: function (num) {
return String(num).replace(/(\d)(?=(\d{3})+$)/g, '$1,')
}
})
// access client/utils module
var format = require('client/utils').formatNumberModuleindex requiring, requiring submodules, and CommonJS compatibility.rvagg
rod@vagg.org