pathchain 1.1.15 → 1.1.16

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 CHANGED
@@ -207,7 +207,7 @@ function getObj(xaddress) {
207
207
  * @param {string} xauthor - The author of the path (optional).
208
208
  * @returns {Object|string} The decoded path object or an error message.
209
209
  */
210
- function getPathChainObj(xpath, xauthor = '') {
210
+ function getPatheadObj(xpath, xauthor = '') {
211
211
  const pathProto = pb(fs.readFileSync('node_modules/pathchain/proto/path.proto'));
212
212
  const filePath = `files/${xauthor ? xauthor + '/' : ''}paths/${xpath}`;
213
213
 
@@ -238,5 +238,5 @@ module.exports = {
238
238
  getPathObj,
239
239
  getLabelObj,
240
240
  getObj,
241
- getPathChainObj
241
+ getPatheadObj
242
242
  };
package/index.js CHANGED
@@ -285,4 +285,17 @@ exports.getLabelObj = (xlabel, xauthor="") => {
285
285
  exports.getObj = (xaddress) => {
286
286
  const pathchain_object = getter.getObj(xaddress);
287
287
  return pathchain_object;
288
+ }
289
+
290
+ /** getPathChainObj
291
+ * [Function that recieves a path hash and returns the path object]
292
+ *
293
+
294
+ * Retrieves and decodes a address object from a file.
295
+ * @param {string} xaddress - The address string.
296
+ * @returns {Object|string} The decoded object or an error message.
297
+ */
298
+ exports.getPatheadObj = (xaddress) => {
299
+ const pathchain_object = getter.getPatheadObj(xaddress);
300
+ return pathchain_object;
288
301
  }
package/maker.js CHANGED
@@ -230,6 +230,7 @@ function path(text, elements, author, ancestor, format = 'MM DD YYYY HH:mm:SSS [
230
230
 
231
231
  let prev_link = "";
232
232
  let head_link = "";
233
+
233
234
  // Building target chain
234
235
  for (let i = 0; i < elements.length; i++) {
235
236
  const current_link = link(elements[i], "", "", author, "");
package/package.json CHANGED
@@ -34,5 +34,5 @@
34
34
  "deprecated": false,
35
35
  "description": "![image](https://user-images.githubusercontent.com/104391124/282268780-cbbc1ee6-8d97-4d80-b896-66ae3eb723dd.png)",
36
36
  "name": "pathchain",
37
- "version": "1.1.15"
37
+ "version": "1.1.16"
38
38
  }