Comparing version 0.0.0 to 0.0.1
@@ -5,1 +5,2 @@ import GQLResultInterface, { GQLNodeInterface } from "./types"; | ||
export declare const tx: (id: string) => Promise<GQLNodeInterface>; | ||
export declare const fetchTxTag: (id: string, name: string) => Promise<string | undefined>; |
@@ -128,3 +128,17 @@ import fetch from 'node-fetch'; | ||
}); }; | ||
var fetchTxTag = function (id, name) { return __awaiter(void 0, void 0, void 0, function () { | ||
var res, tag; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, tx(id)]; | ||
case 1: | ||
res = _a.sent(); | ||
tag = res.tags.find(function (tag) { return tag.name === name; }); | ||
if (tag) | ||
return [2 /*return*/, tag.value]; | ||
return [2 /*return*/]; | ||
} | ||
}); | ||
}); }; | ||
export { all, run, tx }; | ||
export { all, fetchTxTag, run, tx }; |
@@ -136,5 +136,20 @@ 'use strict'; | ||
}); }; | ||
var fetchTxTag = function (id, name) { return __awaiter(void 0, void 0, void 0, function () { | ||
var res, tag; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, tx(id)]; | ||
case 1: | ||
res = _a.sent(); | ||
tag = res.tags.find(function (tag) { return tag.name === name; }); | ||
if (tag) | ||
return [2 /*return*/, tag.value]; | ||
return [2 /*return*/]; | ||
} | ||
}); | ||
}); }; | ||
exports.all = all; | ||
exports.fetchTxTag = fetchTxTag; | ||
exports.run = run; | ||
exports.tx = tx; |
{ | ||
"name": "ar-gql", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"author": "John Letey <johnletey@gmail.com>", | ||
@@ -5,0 +5,0 @@ "repository": "git@github.com:johnletey/arGQL.git", |
16617
336