Skip to content

Commit

Permalink
Version up
Browse files Browse the repository at this point in the history
  • Loading branch information
liquid36 committed Oct 5, 2017
1 parent f977080 commit ac5098f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
17 changes: 2 additions & 15 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -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';
31 changes: 31 additions & 0 deletions src/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit ac5098f

Please sign in to comment.