From ac5098fd4b2838068380df58dc5b9f3f1d7a9eae Mon Sep 17 00:00:00 2001 From: Mariano Botta Date: Thu, 5 Oct 2017 20:07:26 -0300 Subject: [PATCH] Version up --- package.json | 2 +- src/main.js | 17 ++--------------- src/test.js | 31 +++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 1b2fa51..a295fa2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@movilizame/networking", - "version": "0.0.3", + "version": "0.0.4", "description": "Network utilities for Vue-UI", "main": "main.js", "repository": "https://github.com/movilizame/networking", diff --git a/src/main.js b/src/main.js index 4d23e52..6bb45ca 100644 --- a/src/main.js +++ b/src/main.js @@ -1,18 +1,5 @@ export * from './Network'; -export * from './NetworkRequest'; +export * from './NetworkResponse'; export * from './TagApi'; export * from './TaggedList'; - - -import { Thread } from './Thread.js'; - -function callback (context) { - console.log('Times', context.times); - console.log('Data', context.data); - context.next(); -} - - -let t = new Thread({ - interval: 2000 -}).action(callback).run(10); +export * from './Thread'; \ No newline at end of file diff --git a/src/test.js b/src/test.js index d01586c..faf1813 100644 --- a/src/test.js +++ b/src/test.js @@ -20,3 +20,34 @@ let request2 = api.tag('vaca').get('/').then(() => { api.abort(true); console.log(tags.keys()); + + +import { Thread } from './Thread.js'; + +function callback (context) { + console.log('UNO', context.times); + + if (context.times === 0) { + let r = new Thread({ + interval: 1000 + }).action(callback2).run(77); + context.register(r); + } + if (context.times > 5) { + context.next(false); + } else { + context.next(); + } + + +} + +function callback2 (context) { + console.log('DOS', context.times); + context.next(); +} + + +let t = new Thread({ + interval: 2000 +}).action(callback).run(10); \ No newline at end of file