mirror of
https://github.com/flynx/types.js.git
synced 2025-10-29 02:20:07 +00:00
minor rework of queue.clear()...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
82e1327e69
commit
ce3faafc61
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ig-types",
|
||||
"version": "5.0.27",
|
||||
"version": "5.0.28",
|
||||
"description": "Generic JavaScript types and type extensions...",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
||||
@ -114,8 +114,12 @@ object.Constructor('Queue', Array, {
|
||||
return handle(false) }
|
||||
this.__state = 'stopped' }),
|
||||
|
||||
// XXX revise...
|
||||
clear: events.Event('clear', function(){
|
||||
this.splice(0, this.length) }),
|
||||
this.splice(0, this.length)
|
||||
if(this.state == 'running'){
|
||||
this.trigger('queueEmpty')
|
||||
this.trigger('stop') } }),
|
||||
|
||||
|
||||
// events...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user