不要怂,就是干,撸起袖子干!

Commit 5b96de26 by sdepold

util is the new sys

1 parent a32b6189
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
- [REFACTORING] Model#all is now a function and not a getter. - [REFACTORING] Model#all is now a function and not a getter.
- [REFACTORING] Renamed ModelDefinition to ModelFactory - [REFACTORING] Renamed ModelDefinition to ModelFactory
- [REFACTORING] Private method scoping; Attributes are still public - [REFACTORING] Private method scoping; Attributes are still public
- [REFACTORING] Use the new util module for node 0.6.2
- [FEATURE] Association definition is chainable: Person.hasOne(House).hasMany(Address) - [FEATURE] Association definition is chainable: Person.hasOne(House).hasMany(Address)
- [FEATURE] Validations (Thanks to [hiddentao](https://github.com/hiddentao)) - [FEATURE] Validations (Thanks to [hiddentao](https://github.com/hiddentao))
- [FEATURE] jQuery-like event listeners: .success(callback) and .error(callback) - [FEATURE] jQuery-like event listeners: .success(callback) and .error(callback)
......
var sys = require("sys") var util = require("util")
, EventEmitter = require("events").EventEmitter , EventEmitter = require("events").EventEmitter
module.exports = (function() { module.exports = (function() {
var CustomEventEmitter = function(fct) { var CustomEventEmitter = function(fct) {
this.fct = fct this.fct = fct
} }
sys.inherits(CustomEventEmitter, EventEmitter) util.inherits(CustomEventEmitter, EventEmitter)
CustomEventEmitter.prototype.run = function() { CustomEventEmitter.prototype.run = function() {
var self = this var self = this
......
var client = new (require("mysql").Client)() var client = new (require("mysql").Client)()
, sys = require("sys") , util = require("util")
var Utils = module.exports = { var Utils = module.exports = {
_: (function() { _: (function() {
...@@ -24,7 +24,7 @@ var Utils = module.exports = { ...@@ -24,7 +24,7 @@ var Utils = module.exports = {
return _ return _
})(), })(),
inherit: function(klass, _super) { inherit: function(klass, _super) {
sys.inherits(klass, _super) util.inherits(klass, _super)
}, },
addEventEmitter: function(_class) { addEventEmitter: function(_class) {
Utils.inherit(_class, require('events').EventEmitter) Utils.inherit(_class, require('events').EventEmitter)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!