pathchain 1.1.17 → 1.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/getter.js +3 -2
- package/index.js +2 -2
- package/package.json +1 -1
package/getter.js
CHANGED
|
@@ -242,6 +242,7 @@ function getPathchainObj(xpath, xauthor = '') {
|
|
|
242
242
|
|
|
243
243
|
var current_link = this.getObj(pathObj.head);
|
|
244
244
|
console.log("Head link", current_link);
|
|
245
|
+
/*
|
|
245
246
|
var current_obj = this.getObj(current_link.target);
|
|
246
247
|
console.log("First object", current_obj);
|
|
247
248
|
|
|
@@ -251,9 +252,9 @@ function getPathchainObj(xpath, xauthor = '') {
|
|
|
251
252
|
obj_list.push(current_obj);
|
|
252
253
|
current_link = this.getObj(current_link.prev);
|
|
253
254
|
current_obj = this.getObj(current_link.target);
|
|
254
|
-
}
|
|
255
|
+
}*/
|
|
255
256
|
// Get link -> get link.target
|
|
256
|
-
return
|
|
257
|
+
return current_link;
|
|
257
258
|
} catch (err) {
|
|
258
259
|
return err.code === 'ENOENT' ? "Path not found" : err;
|
|
259
260
|
}
|
package/index.js
CHANGED
|
@@ -308,7 +308,7 @@ exports.getPatheadObj = (xaddress) => {
|
|
|
308
308
|
* @param {string} xaddress - The address string.
|
|
309
309
|
* @returns {Object|string} The decoded object or an error message.
|
|
310
310
|
*/
|
|
311
|
-
exports.
|
|
312
|
-
const pathchain_object = getter.
|
|
311
|
+
exports.getPathchainObj = (xaddress) => {
|
|
312
|
+
const pathchain_object = getter.getPathchainObj(xaddress);
|
|
313
313
|
return pathchain_object;
|
|
314
314
|
}
|
package/package.json
CHANGED