Export static methods wherever possible

This commit is contained in:
Paris Kasidiaris
2017-12-12 08:46:06 +00:00
parent 052dc15d55
commit d81e304ce7
6 changed files with 51 additions and 60 deletions
+2 -2
View File
@@ -16,7 +16,7 @@
* should happen instantly or at a maximum
* frequency of 1 rendering per 10ms.
*/
function attach(term, socket, bidirectional, buffered) {
export function attach(term, socket, bidirectional, buffered) {
bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional;
term.socket = socket;
@@ -79,7 +79,7 @@ function attach(term, socket, bidirectional, buffered) {
* @param {WebSocket} socket - The socket from which to detach the current
* terminal.
*/
function detach(term, socket) {
export function detach(term, socket) {
term.off('data', term._sendData);
socket = (typeof socket == 'undefined') ? term.socket : socket;