Skip to content

Commit 309ed5a

Browse files
added docs to new methods
1 parent 275b6af commit 309ed5a

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

lib/woql.js

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,15 +320,28 @@ WOQL.pad = function(input, pad, len, output){ return new WOQLQuery().pad(input,
320320
/**
321321
* Joins a list variable together (input) into a string variable (output) by glueing the strings together with glue
322322
* @param {array} input - a list of variables
323-
* @param {string} glue - jioining character(s)
324-
* @param {string} output - variable that sotres output
323+
* @param {string} glue - joining character(s)
324+
* @param {string} output - variable that stores output
325325
* @return {object} WOQLQuery
326326
*/
327327
WOQL.join = function(input, glue, output){ return new WOQLQuery().join(input, glue, output); }
328328

329-
WOQL.split = function(input, glue, output){ return new WOQLQuery().split(input, glue, output); }
330-
WOQL.member = function(El, List){ return new WOQLQuery().member(El, List); }
329+
/**
330+
* Splits a variable apart (input) into a list of variables (output) by separating the strings together with separator
331+
* @param {array} input - a string or variable
332+
* @param {string} separator - character string to separate string into list
333+
* @param {string} output - variable that stores output list
334+
* @return {object} WOQLQuery
335+
*/
336+
WOQL.split = function(input, separator, output){ return new WOQLQuery().split(input, separator, output); }
331337

338+
/**
339+
* Iterates through a list and returns a value for each member
340+
* @param {string} El - a variable representing an element of the list
341+
* @param {List} List - A list variable
342+
* @return {object} WOQLQuery
343+
*/
344+
WOQL.member = function(El, List){ return new WOQLQuery().member(El, List); }
332345

333346
/**
334347
* Generates an ID for a node as a function of the passed VariableList with a specific prefix (URL base). If the values of the passed variables are the same, the output will be the same

0 commit comments

Comments
 (0)