mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-28 11:26:16 -04:00
add and fix some documentation
This commit is contained in:
parent
855bd270bd
commit
3b9c321991
1 changed files with 11 additions and 11 deletions
|
@ -33,7 +33,7 @@ var AttributePool = require("./AttributePool");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is called whenever there is an error in the sync process
|
* This method is called whenever there is an error in the sync process
|
||||||
* @param msg {string} Just some message
|
* @param {String} msg Just some message
|
||||||
*/
|
*/
|
||||||
exports.error = function error(msg) {
|
exports.error = function error(msg) {
|
||||||
var e = new Error(msg);
|
var e = new Error(msg);
|
||||||
|
@ -44,8 +44,8 @@ exports.error = function error(msg) {
|
||||||
/**
|
/**
|
||||||
* This method is used for assertions with Messages
|
* This method is used for assertions with Messages
|
||||||
* if assert fails, the error function is called.
|
* if assert fails, the error function is called.
|
||||||
* @param b {boolean} assertion condition
|
* @param {Boolean} b assertion condition
|
||||||
* @param msgParts {string} error to be passed if it fails
|
* @param {String} msgParts error to be passed if it fails
|
||||||
*/
|
*/
|
||||||
exports.assert = function assert(b, msgParts) {
|
exports.assert = function assert(b, msgParts) {
|
||||||
if (!b) {
|
if (!b) {
|
||||||
|
@ -56,8 +56,8 @@ exports.assert = function assert(b, msgParts) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses a number from string base 36
|
* Parses a number from string base 36
|
||||||
* @param str {string} string of the number in base 36
|
* @param {String} str string of the number in base 36
|
||||||
* @returns {int} number
|
* @returns {Number} number
|
||||||
*/
|
*/
|
||||||
exports.parseNum = function (str) {
|
exports.parseNum = function (str) {
|
||||||
return parseInt(str, 36);
|
return parseInt(str, 36);
|
||||||
|
@ -65,8 +65,8 @@ exports.parseNum = function (str) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes a number in base 36 and puts it in a string
|
* Writes a number in base 36 and puts it in a string
|
||||||
* @param num {int} number
|
* @param {jsdoc} num number
|
||||||
* @returns {string} string
|
* @returns {String} string
|
||||||
*/
|
*/
|
||||||
exports.numToString = function (num) {
|
exports.numToString = function (num) {
|
||||||
return num.toString(36).toLowerCase();
|
return num.toString(36).toLowerCase();
|
||||||
|
@ -75,7 +75,7 @@ exports.numToString = function (num) {
|
||||||
/**
|
/**
|
||||||
* Converts stuff before $ to base 10
|
* Converts stuff before $ to base 10
|
||||||
* @obsolete not really used anywhere??
|
* @obsolete not really used anywhere??
|
||||||
* @param cs {string} the string
|
* @param {String} cs the string
|
||||||
* @return integer
|
* @return integer
|
||||||
*/
|
*/
|
||||||
exports.toBaseTen = function (cs) {
|
exports.toBaseTen = function (cs) {
|
||||||
|
@ -95,7 +95,7 @@ exports.toBaseTen = function (cs) {
|
||||||
/**
|
/**
|
||||||
* returns the required length of the text before changeset
|
* returns the required length of the text before changeset
|
||||||
* can be applied
|
* can be applied
|
||||||
* @param cs {string} String representation of the Changeset
|
* @param {String} cs String representation of the Changeset
|
||||||
*/
|
*/
|
||||||
exports.oldLen = function (cs) {
|
exports.oldLen = function (cs) {
|
||||||
return exports.unpack(cs).oldLen;
|
return exports.unpack(cs).oldLen;
|
||||||
|
@ -103,7 +103,7 @@ exports.oldLen = function (cs) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the length of the text after changeset is applied
|
* returns the length of the text after changeset is applied
|
||||||
* @param cs {string} String representation of the Changeset
|
* @param {String} cs String representation of the Changeset
|
||||||
*/
|
*/
|
||||||
exports.newLen = function (cs) {
|
exports.newLen = function (cs) {
|
||||||
return exports.unpack(cs).newLen;
|
return exports.unpack(cs).newLen;
|
||||||
|
@ -234,7 +234,7 @@ exports.stringOp = function (str) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to check if a Changeset if valid
|
* Used to check if a Changeset is valid
|
||||||
* @param cs {Changeset} Changeset to be checked
|
* @param cs {Changeset} Changeset to be checked
|
||||||
*/
|
*/
|
||||||
exports.checkRep = function (cs) {
|
exports.checkRep = function (cs) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue