Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 5b96de26
authored
Nov 21, 2011
by
sdepold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util is the new sys
1 parent
a32b6189
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
changelog.md
lib/emitters/custom-event-emitter.js
lib/utils.js
changelog.md
View file @
5b96de2
...
@@ -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)
...
...
lib/emitters/custom-event-emitter.js
View file @
5b96de2
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
...
...
lib/utils.js
View file @
5b96de2
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
)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment