1.0.8 • Published 9 years ago

ender-commonjs v1.0.8

Weekly downloads
1,540
License
-
Repository
-
Last release
9 years ago

Ender CommonJS

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._modules

Includes the list of which modules are available for use in your Ender bundle

require._cache

Includes 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').formatNumber

Module

  • supports multi-file modules, internal/relative requires, index requiring, requiring submodules, and CommonJS compatibility.
1.0.8

9 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.4

10 years ago

0.1.0

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago