11/**
22 * A CursorPaginator represents an array of items
33 * that can be paginated via offset/limit parameters.
4- * The items may be Resources, Symlinks, primatives , or any combination.
4+ * The items may be Resources, Symlinks, primitives , or any combination.
55 * CursorPaginator provides a fluent interface to simplify their creation.
66 *
77 * ```js
@@ -45,9 +45,9 @@ var CursorPaginator = function(id, items, expires) {
4545/**
4646 * Sets the resource ID for this collection.
4747 *
48- * @param string|undefined - The new resource ID or `undefined` to remove it.
48+ * @param { string|undefined } id - The new resource ID or `undefined` to remove it.
4949 * @throws Error - Provided resource ID is invalid.
50- * @return this - Fluent interface.
50+ * @returns this - Fluent interface.
5151 */
5252CursorPaginator . prototype . setId = function ( id ) {
5353 var type = typeof id ;
@@ -61,7 +61,7 @@ CursorPaginator.prototype.setId = function(id) {
6161/**
6262 * Gets the resource ID, or undefined if not set.
6363 *
64- * @return string|undefined - The resource ID for this collection
64+ * @returns string|undefined - The resource ID for this collection
6565 */
6666CursorPaginator . prototype . getId = function ( ) {
6767 return this . $id ;
@@ -70,10 +70,10 @@ CursorPaginator.prototype.getId = function() {
7070/**
7171 * Sets the items in the collection.
7272 *
73- * @param array items - Array of items that are in this collection.
74- * May be an array of Resources, Symlinks, primatives , or any combination.
73+ * @param { Array } items - Array of items that are in this collection.
74+ * May be an array of Resources, Symlinks, primitives , or any combination.
7575 * @throws Error - When non-array is passed in.
76- * @return this - Fluent interface.
76+ * @returns this - Fluent interface.
7777 */
7878CursorPaginator . prototype . setItems = function ( items ) {
7979 if ( ! Array . isArray ( items ) ) {
@@ -86,7 +86,7 @@ CursorPaginator.prototype.setItems = function(items) {
8686/**
8787 * Gets the items in the collection.
8888 *
89- * @return array - All items in the collection.
89+ * @returns array - All items in the collection.
9090 */
9191CursorPaginator . prototype . getItems = function ( ) {
9292 return this . items ;
@@ -95,10 +95,10 @@ CursorPaginator.prototype.getItems = function() {
9595/**
9696 * Sets the value for an item in the collection.
9797 *
98- * @param integer position - The array position.
99- * @param array item - Item to be placed into specified position.
98+ * @param { Number } position - The integer array position.
99+ * @param { Array } item - Item to be placed into specified position.
100100 * @throws Error - Invalid position.
101- * @return this - Fluent interface.
101+ * @returns this - Fluent interface.
102102 */
103103CursorPaginator . prototype . setItem = function ( position , item ) {
104104 if ( typeof position !== 'number' ) {
@@ -116,8 +116,8 @@ CursorPaginator.prototype.setItem = function(position, item) {
116116/**
117117 * Returns the value for an item in the collection, or undefined if not set.
118118 *
119- * @param integer position - The array position.
120- * @return mixed - The item at the position in the collection or undefined.
119+ * @param { Number } position - The integer array position.
120+ * @returns mixed - The item at the position in the collection or undefined.
121121 */
122122CursorPaginator . prototype . getItem = function ( position ) {
123123 return this . items [ position ] ;
@@ -126,9 +126,9 @@ CursorPaginator.prototype.getItem = function(position) {
126126/**
127127 * Sets the expiration for the collection in milliseconds.
128128 *
129- * @param integer |undefined - Maximum number of milliseconds this collection may be cached for.
129+ * @param { Number |undefined} expires - Maximum number of milliseconds this collection may be cached for.
130130 * @throws Error - Expiration is invalid.
131- * @return this - Fluent interface.
131+ * @returns this - Fluent interface.
132132 */
133133CursorPaginator . prototype . setExpires = function ( expires ) {
134134 var type = typeof expires ;
@@ -148,7 +148,7 @@ CursorPaginator.prototype.setExpires = function(expires) {
148148/**
149149 * Returns the expiration for the collection in milliseconds, or undefined if not set.
150150 *
151- * @return integer|undefined - Maximum number of milliseconds this collection may be cached for.
151+ * @returns integer|undefined - Maximum number of milliseconds this collection may be cached for.
152152 */
153153CursorPaginator . prototype . getExpires = function ( ) {
154154 return this . $expires ;
@@ -158,9 +158,9 @@ CursorPaginator.prototype.getExpires = function() {
158158 * Sets the total number of items in the collection.
159159 * May be more than the number of items represented.
160160 *
161- * @param integer total - Number of items in the collection.
161+ * @param { Number } total - Number of items in the collection.
162162 * @throws Error - Total is invalid.
163- * @return mixed - Total number of items in collection if no argument provided,
163+ * @returns mixed - Total number of items in collection if no argument provided,
164164 * otherwise returns `this` for fluent interface
165165 */
166166CursorPaginator . prototype . setTotal = function ( total ) {
@@ -181,7 +181,7 @@ CursorPaginator.prototype.setTotal = function(total) {
181181/**
182182 * Returns the total number of items in the collection, or undefined if not set.
183183 *
184- * @return integer|undefined - Total number of items in the collection
184+ * @returns integer|undefined - Total number of items in the collection
185185 */
186186CursorPaginator . prototype . getTotal = function ( ) {
187187 return this . total ;
@@ -190,9 +190,9 @@ CursorPaginator.prototype.getTotal = function() {
190190/**
191191 * Sets the limit of items in the collection, or undefined if no limit is set.
192192 *
193- * @param integer |undefined limit - Limit of items in the collection.
193+ * @param { Number |undefined} limit - Limit of items in the collection.
194194 * @throws Error - Limit is invalid.
195- * @return this - Fluent interface.
195+ * @returns this - Fluent interface.
196196 */
197197CursorPaginator . prototype . setLimit = function ( limit ) {
198198 var type = typeof limit ;
@@ -212,7 +212,7 @@ CursorPaginator.prototype.setLimit = function(limit) {
212212/**
213213 * Returns the limit of items in the collection, or undefined if not set.
214214 *
215- * @return integer|undefined - Limit of items in the collection.
215+ * @returns integer|undefined - Limit of items in the collection.
216216 */
217217CursorPaginator . prototype . getLimit = function ( ) {
218218 return this . limit ;
@@ -221,8 +221,8 @@ CursorPaginator.prototype.getLimit = function() {
221221/**
222222 * Sets the current cursor for the items in the collection, or undefined if no cursor exists.
223223 *
224- * @param string |undefined cursor - Current cursor for items in the collection.
225- * @return this - Fluent interface.
224+ * @param { String |undefined} cursor - Current cursor for items in the collection.
225+ * @returns this - Fluent interface.
226226 */
227227CursorPaginator . prototype . setCursor = function ( cursor ) {
228228 this . cursor = cursor ;
@@ -232,7 +232,7 @@ CursorPaginator.prototype.setCursor = function(cursor) {
232232/**
233233 * Returns the current cursor for the items in the collection, or undefined if no cursor exists.
234234 *
235- * @return string|undefined - Current cursor for items in the collection.
235+ * @returns string|undefined - Current cursor for items in the collection.
236236 */
237237CursorPaginator . prototype . getCursor = function ( ) {
238238 return this . cursor ;
@@ -242,8 +242,8 @@ CursorPaginator.prototype.getCursor = function() {
242242/**
243243 * Sets the cursor for the next page of items in the collection, or undefined if no next cursor exists.
244244 *
245- * @param string |undefined nextCursor - Cursor for the next page of items in the collection.
246- * @return this - Fluent interface.
245+ * @param { String |undefined} nextCursor - Cursor for the next page of items in the collection.
246+ * @returns this - Fluent interface.
247247 */
248248CursorPaginator . prototype . setNextCursor = function ( nextCursor ) {
249249 this . nextCursor = nextCursor ;
@@ -253,7 +253,7 @@ CursorPaginator.prototype.setNextCursor = function(nextCursor) {
253253/**
254254 * Returns the cursor for the next page of items in the collection, or undefined if not set.
255255 *
256- * @return string|undefined - Cursor for next page of items in the collection.
256+ * @returns string|undefined - Cursor for next page of items in the collection.
257257 */
258258CursorPaginator . prototype . getNextCursor = function ( ) {
259259 return this . nextCursor ;
@@ -262,7 +262,7 @@ CursorPaginator.prototype.getNextCursor = function() {
262262/**
263263 * Removes the last item from the collection and returns it.
264264 *
265- * @return mixed
265+ * @returns any
266266 */
267267CursorPaginator . prototype . pop = function ( ) {
268268 return this . items . pop ( ) ;
@@ -271,8 +271,8 @@ CursorPaginator.prototype.pop = function() {
271271/**
272272 * Adds the item to the end of the collection.
273273 *
274- * @param mixed item - The item to add
275- * @return this - fluent interface
274+ * @param { any } item - The item to add
275+ * @returns { CursorPaginator } - fluent interface
276276 */
277277CursorPaginator . prototype . push = function ( item ) {
278278 this . items . push ( item ) ;
@@ -282,7 +282,7 @@ CursorPaginator.prototype.push = function(item) {
282282/**
283283 * Removes the first item from the collection and returns it.
284284 *
285- * @return mixed
285+ * @returns mixed
286286 */
287287CursorPaginator . prototype . shift = function ( ) {
288288 return this . items . shift ( ) ;
@@ -291,8 +291,8 @@ CursorPaginator.prototype.shift = function() {
291291/**
292292 * Adds the item to the beginning of the collection.
293293 *
294- * @param mixed item - The item to add
295- * @return this - fluent interface
294+ * @param { any } item - The item to add
295+ * @returns this - fluent interface
296296 */
297297CursorPaginator . prototype . unshift = function ( item ) {
298298 this . items . unshift ( item ) ;
0 commit comments