mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-11 17:05:08 +00:00
19 lines
376 B
JavaScript
19 lines
376 B
JavaScript
|
'use strict';
|
||
|
|
||
|
define(['_dataio'], function(dataio) {
|
||
|
return function(socket) {
|
||
|
var connect = dataio(socket);
|
||
|
|
||
|
/*
|
||
|
* Extend resource
|
||
|
*/
|
||
|
var resource = connect.resource('__someResource__'),
|
||
|
resourcePrototype = Object.getPrototypeOf(resource);
|
||
|
|
||
|
resourcePrototype.unsubscribeAll = function() {
|
||
|
this.socket.removeAllListeners();
|
||
|
};
|
||
|
|
||
|
return connect;
|
||
|
};
|
||
|
});
|