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 81750a85
authored
Feb 10, 2015
by
Mick Hansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update event emitter deprecation notice
1 parent
f5f58ec7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
lib/promise.js
lib/promise.js
View file @
81750a8
...
@@ -177,7 +177,7 @@ Promise.prototype.emit = function(evt) {
...
@@ -177,7 +177,7 @@ Promise.prototype.emit = function(evt) {
*/
*/
Promise
.
prototype
.
success
=
Promise
.
prototype
.
success
=
Promise
.
prototype
.
ok
=
function
(
fct
)
{
Promise
.
prototype
.
ok
=
function
(
fct
)
{
deprecated
(
'
EventEmitter#success|ok is deprecated
, please use promise-style instead.'
);
deprecated
(
'
success|ok() is deprecated and will be removed in 2.1
, please use promise-style instead.'
);
if
(
fct
.
length
>
1
)
{
if
(
fct
.
length
>
1
)
{
return
this
.
spread
(
fct
);
return
this
.
spread
(
fct
);
}
else
{
}
else
{
...
@@ -205,7 +205,7 @@ Promise.prototype.ok = function(fct) {
...
@@ -205,7 +205,7 @@ Promise.prototype.ok = function(fct) {
Promise
.
prototype
.
error
=
Promise
.
prototype
.
error
=
Promise
.
prototype
.
failure
=
Promise
.
prototype
.
failure
=
Promise
.
prototype
.
fail
=
function
(
fct
)
{
Promise
.
prototype
.
fail
=
function
(
fct
)
{
deprecated
(
'
EventEmitter#failure|fail|error is deprecated
, please use promise-style instead.'
);
deprecated
(
'
failure|fail|error() is deprecated and will be removed in 2.1
, please use promise-style instead.'
);
return
this
.
then
(
null
,
fct
);
return
this
.
then
(
null
,
fct
);
};
};
...
@@ -234,7 +234,7 @@ Promise.prototype.complete = function(fct) {
...
@@ -234,7 +234,7 @@ Promise.prototype.complete = function(fct) {
}
}
if
(
fct
.
length
>
2
)
{
if
(
fct
.
length
>
2
)
{
deprecated
(
'
EventEmitter#complete|done is deprecated
, please use promise-style instead.'
);
deprecated
(
'
complete|done() is deprecatedand will be removed in 2.1
, please use promise-style instead.'
);
return
this
.
spread
(
function
()
{
return
this
.
spread
(
function
()
{
fct
.
apply
(
null
,
[
null
].
concat
(
Array
.
prototype
.
slice
.
call
(
arguments
)));
fct
.
apply
(
null
,
[
null
].
concat
(
Array
.
prototype
.
slice
.
call
(
arguments
)));
},
fct
);
},
fct
);
...
...
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