@@ -7,6 +7,7 @@ module.exports = class NodeCache extends EventEmitter
77 super ()
88
99 @ _initErrors ()
10+
1011 # container for cached data
1112 @data = {}
1213
@@ -36,7 +37,7 @@ module.exports = class NodeCache extends EventEmitter
3637
3738 # generate functions with callbacks (legacy)
3839 if (@options .enableLegacyCallbacks )
39- console .warn (" WARNING! Callback legacy support will drop in node-cache v6.x" )
40+ console .warn (" WARNING! node-cache legacy callback support will drop in v6.x" )
4041 [
4142 " get" ,
4243 " mget" ,
@@ -49,16 +50,16 @@ module.exports = class NodeCache extends EventEmitter
4950 ].forEach ((methodKey ) =>
5051 # reference real function
5152 oldMethod = @ [methodKey]
52- @ [methodKey] = (... args , cb ) = >
53+ @ [methodKey] = (args ... , cb ) - >
5354 # return a callback if cb is defined and a function
5455 if (typeof cb is " function" )
5556 try
56- res = oldMethod (... args )
57+ res = oldMethod (args ... )
5758 cb (null , res)
5859 catch err
5960 cb (err)
6061 else
61- return oldMethod (... args , cb)
62+ return oldMethod (args ... , cb)
6263 return
6364 return
6465 )
@@ -601,8 +602,7 @@ module.exports = class NodeCache extends EventEmitter
601602
602603 return
603604
604- createErrorMessage : (errMsg ) => (args ) =>
605- return errMsg .replace (" __key" , args .type );
605+ createErrorMessage : (errMsg ) -> (args ) -> errMsg .replace (" __key" , args .type )
606606
607607 _ERRORS :
608608 " ENOTFOUND" : " Key `__key` not found"
0 commit comments