pathchain 1.0.52 → 1.0.53

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.
Files changed (3) hide show
  1. package/README.md +4 -4
  2. package/index.js +14 -96
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -535,9 +535,9 @@ Parameter rules:
535
535
  |Parameter |Required |
536
536
  |-------------------------|----------|
537
537
  |{string} target |(required)|
538
- |{string} prev |(required)|
539
- |{string} next |(required)|
540
- |{string} author |(required)|
538
+ |{string} prev |(optional)|
539
+ |{string} next |(optional)|
540
+ |{string} author |(optional)|
541
541
  |{string} ancestor |(optional)|
542
542
  |{string} format |(optional)|
543
543
 
@@ -548,7 +548,7 @@ Summoning `makeLink(target, prev, next, author, ancestor, format)`:
548
548
  const pathchain = require("pathchain"); // Summoning pathchain
549
549
 
550
550
  // Nodelink creation
551
- var link_buff = pathchain.makelink(node_buff);
551
+ var link_buff = pathchain.makelink(target);
552
552
 
553
553
  console.log("Link buffer: ", link_buff);
554
554
  ```
package/index.js CHANGED
@@ -184,29 +184,29 @@ exports.getNodeObj = (xnode, xauthor="") => {
184
184
 
185
185
 
186
186
  ///////////////////////
187
- /// NODELINK ///
187
+ /// LINK ///
188
188
  ///////////////////////
189
189
 
190
- /** makeNodelink
191
- * [Nodelink maker]
190
+ /** makeLink
191
+ * [Link maker]
192
192
  *
193
- * @return {string} nodelink_buffer
193
+ * @return {string} link_buffer
194
194
  */
195
- exports.makeNodelink = (first="", second="", xauthor = "", ancestor = "", format = 'MM DD YYYY HH:mm:SSS [GMT]Z') => {
196
- const nodelink_buffer = maker.nodelink(first, second, xauthor, ancestor, format);
197
- return nodelink_buffer;
195
+ exports.makeLink = (target="", prev="", next = "", xauthor = "", ancestor = "", format = 'MM DD YYYY HH:mm:SSS [GMT]Z') => {
196
+ const link_buffer = maker.link(target, prev, next, xauthor, ancestor, format);
197
+ return link_buffer;
198
198
  }
199
199
 
200
- /** getNodelinkObj
201
- * [Function that recieves a nodelink hash and returns the nodelink object]
200
+ /** getLinkObj
201
+ * [Function that recieves a link hash and returns the link object]
202
202
  *
203
- * @param {string} xnodelink (required)
203
+ * @param {string} xlink (required)
204
204
  *
205
- * @return {obj} nodelink_object (nodelink object)
205
+ * @return {obj} link_object (link object)
206
206
  */
207
- exports.getNodelinkObj = (xnodelink, xauthor="") => {
208
- const nodelink_object = getter.getNodelinkObj(xnodelink, xauthor);
209
- return nodelink_object;
207
+ exports.getLinkObj = (xlink, xauthor="") => {
208
+ const link_object = getter.getLinkObj(xlink, xauthor);
209
+ return link_object;
210
210
  }
211
211
 
212
212
 
@@ -236,88 +236,6 @@ exports.getPathObj = (xpath, xauthor="") => {
236
236
  return path_object;
237
237
  }
238
238
 
239
-
240
- ///////////////////////
241
- /// PATHLINK ///
242
- ///////////////////////
243
-
244
- /** makePathlink
245
- * [Pathlink maker]
246
- *
247
- * @return {string} pathlink_buffer
248
- */
249
- exports.makePathlink = (first="", second="", xauthor = "", ancestor = "", format = 'MM DD YYYY HH:mm:SSS [GMT]Z') => {
250
- const pathlink_buffer = maker.pathlink(first, second, xauthor, ancestor, format);
251
- return pathlink_buffer;
252
- }
253
-
254
- /** getPathlinkObj
255
- * [Function that recieves a pathlink hash and returns the pathlink object]
256
- *
257
- * @param {string} xpathlink (required)
258
- *
259
- * @return {obj} pathlink_object (pathlink object)
260
- */
261
- exports.getPathlinkObj = (xpathlink, xauthor="") => {
262
- const pathlink_object = getter.getPathlinkObj(xpathlink, xauthor);
263
- return pathlink_object;
264
- }
265
-
266
-
267
- //////////////////
268
- /// TREE ///
269
- //////////////////
270
-
271
- /** makeTree
272
- * [Tree maker]
273
- *
274
- * @return {string} tree_buffer
275
- */
276
- exports.makeTree = (text ="", head="", xauthor = "", ancestor="", format = 'MM DD YYYY HH:mm:SSS [GMT]Z') => {
277
- const tree_buffer = maker.tree(text, head, xauthor, ancestor, format);
278
- return tree_buffer;
279
- }
280
-
281
- /** getTreeObj
282
- * [Function that recieves a tree hash and returns the tree object]
283
- *
284
- * @param {string} xtree (required)
285
- *
286
- * @return {obj} tree_object (tree object)
287
- */
288
- exports.getTreeObj = (xtree, xauthor="") => {
289
- const tree_object = getter.getTreeObj(xtree, xauthor);
290
- return tree_object;
291
- }
292
-
293
-
294
- ///////////////////////
295
- /// TREELINK ///
296
- ///////////////////////
297
-
298
- /** makeTreelink
299
- * [Treelink maker]
300
- *
301
- * @return {string} treelink_buffer
302
- */
303
- exports.makeTreelink = (first="", second="", xauthor = "", ancestor = "", format = 'MM DD YYYY HH:mm:SSS [GMT]Z') => {
304
- const treelink_buffer = maker.treelink(first, second, xauthor, ancestor, format);
305
- return treelink_buffer;
306
- }
307
-
308
- /** getTreelinkObj
309
- * [Function that recieves a treelink hash and returns the treelink object]
310
- *
311
- * @param {string} xtreelink (required)
312
- *
313
- * @return {obj} treelink_object (treelink object)
314
- */
315
- exports.getTreelinkObj = (xtreelink, xauthor="") => {
316
- const treelink_object = getter.getTreelinkObj(xtreelink, xauthor);
317
- return treelink_object;
318
- }
319
-
320
-
321
239
  ////////////////////
322
240
  /// LABEL ///
323
241
  ////////////////////
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.0.52"
37
+ "version": "1.0.53"
38
38
  }