{"id":19124438,"url":"https://github.com/panates/doublylinked","last_synced_at":"2025-05-05T19:27:53.973Z","repository":{"id":37406228,"uuid":"109401993","full_name":"panates/doublylinked","owner":"panates","description":"Doubly linked list implementation for JavaScript with iterator and array-like interface","archived":false,"fork":false,"pushed_at":"2025-01-28T10:11:31.000Z","size":791,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T23:54:02.409Z","etag":null,"topics":["doubly-linked-list","javascript","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/panates.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-03T14:00:01.000Z","updated_at":"2025-01-28T10:11:35.000Z","dependencies_parsed_at":"2024-06-19T00:21:43.258Z","dependency_job_id":"1de0a2e4-7fe2-4dff-8b59-5a46d2ba30e6","html_url":"https://github.com/panates/doublylinked","commit_stats":{"total_commits":76,"total_committers":3,"mean_commits":"25.333333333333332","dds":0.5,"last_synced_commit":"96d0bfb6f05d765de9866293ae1c4b0305c15e92"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panates%2Fdoublylinked","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panates%2Fdoublylinked/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panates%2Fdoublylinked/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panates%2Fdoublylinked/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panates","download_url":"https://codeload.github.com/panates/doublylinked/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252562265,"owners_count":21768264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["doubly-linked-list","javascript","nodejs"],"created_at":"2024-11-09T05:29:10.207Z","updated_at":"2025-05-05T19:27:53.949Z","avatar_url":"https://github.com/panates.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# doublylinked\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n[![Dependencies][dependencies-image]][dependencies-url]\n[![DevDependencies][devdependencies-image]][devdependencies-url]\n\n## About\n\nDoubly linked list implementation for JavaScript with iterator and array-like interface\n\n## Installation\n\n`$ npm install doublylinked [--save]`\n\n## Constructor\n\n```js\nconst list = new DoublyLinked([element1[, ..[, elementN]]]);\n```\n\n##### Parameters\n\n- *elementN :* The elements will list contains\n\n\n## Methods\n\n* [`DoublyLinked.prototype.concat()`](#doublylinkedprototypeconcat)\n* [`DoublyLinked.prototype.entries()`](#doublylinkedprototypeentries) \n* [`DoublyLinked.prototype.every()`](#doublylinkedprototypeevery)\n* [`DoublyLinked.prototype.everyRight()`](#doublylinkedprototypeeveryright)\n* [`DoublyLinked.prototype.filter()`](#doublylinkedprototypefilter)\n* [`DoublyLinked.prototype.find()`](#doublylinkedprototypefind)\n* [`DoublyLinked.prototype.forEach()`](#doublylinkedprototypeforeach)\n* [`DoublyLinked.prototype.forEachRight()`](#doublylinkedprototypeforeachright)\n* [`DoublyLinked.prototype.includes()`](#doublylinkedprototypeincludes)\n* [`DoublyLinked.prototype.insert()`](#doublylinkedprototypeinsert)\n* [`DoublyLinked.prototype.join()`](#doublylinkedprototypejoin)\n* [`DoublyLinked.prototype.map()`](#doublylinkedprototypemap)\n* [`DoublyLinked.prototype.next()`](#doublylinkedprototypenext)\n* [`DoublyLinked.prototype.prev()`](#doublylinkedprototypeprev)\n* [`DoublyLinked.prototype.pop()`](#doublylinkedprototypepop)\n* [`DoublyLinked.prototype.push()`](#doublylinkedprototypepush)\n* [`DoublyLinked.prototype.reduce()`](#doublylinkedprototypereduce)\n* [`DoublyLinked.prototype.reduce()`](#doublylinkedprototypereduce)\n* [`DoublyLinked.prototype.reduceRight()`](#doublylinkedprototypereduceright)\n* [`DoublyLinked.prototype.remove()`](#doublylinkedprototyperemove)\n* [`DoublyLinked.prototype.reset()`](#doublylinkedprototypereset)\n* [`DoublyLinked.prototype.reverse()`](#doublylinkedprototypereverse)\n* [`DoublyLinked.prototype.shift()`](#doublylinkedprototypeshift)\n* [`DoublyLinked.prototype.some()`](#doublylinkedprototypesome)\n* [`DoublyLinked.prototype.someRight()`](#doublylinkedprototypesomeright)\n* [`DoublyLinked.prototype.toArray()`](#doublylinkedprototypetoarray)\n* [`DoublyLinked.prototype.toString()`](#doublylinkedprototypetostring)\n* [`DoublyLinked.prototype.unshift()`](#doublylinkedprototypeunshift)\n* [`DoublyLinked.prototype[@@iterator]`](#doublylinkedprototypeiterator)\n\n### DoublyLinked.prototype.concat()\n\nMerges cursor list with and given lists/values into new list.\n\n`list.concat(otherList1[, element1[, ...[otherList2]]])`\n\n##### Parameters\n\n- *valueN :* Lists and/or values to concatenate into a new list\n\n- *Return value :* A new DoublyLinked instance\n\n\n\n### DoublyLinked.prototype.entries()\n\nReturns the iterator object contains entries\n\n`list.entries()`\n\n##### Parameters\n\n- *Return value :* A new iterator object.\n\n\n\n### DoublyLinked.prototype.every()\n\nTests whether all elements in the list pass the test implemented by the provided function (from left to right)\n\n`list.every(callback[, thisArg])`\n\n##### Parameters\n\n- *callback :* Function to test for each element, taking three arguments:\n    \n    - *currentValue :* The current element being processed in the list\n    \n    - *index :* The index of the current element being processed in the list\n    \n    - *list :* The list every was called upon\n\n- *thisArg :* Value to use as this when executing callback\n\n- *Return value :* true if the callback function returns a truthy value for every list element; otherwise, false\n\n\n### DoublyLinked.prototype.everyRight()\n\nTests whether all elements in the list pass the test implemented by the provided function (from right to left)\n\n`list.everyRight(callback[, thisArg])`\n\n##### Parameters\n\n- *callback :* Function to test for each element, taking three arguments:\n    \n    - *currentValue :* The current element being processed in the list\n    \n    - *index :* The index of the current element being processed in the list\n    \n    - *list :* The list every was called upon\n\n- *thisArg :* Value to use as this when executing callback\n\n- *Return value :* true if the callback function returns a truthy value for every list element; otherwise, false\n\n\n\n### DoublyLinked.prototype.filter()\n\nCreates a new list with all elements that pass the test implemented by the provided function\n\n`list.filter(callback[, thisArg])`\n\n##### Parameters\n\n- *callback :* Function to test for each element, taking three arguments:\n    \n    - *element :* The current element being processed in the list\n    \n    - *index :* The index of the current element being processed in the list\n    \n    - *list :* The list every was called upon\n\n- *thisArg :* Value to use as this when executing callback\n\n- *Return value :* A new list with the elements that pass the test\n\n\n\n### DoublyLinked.prototype.find()\n\nReturns the value of the first element in the list that satisfies the provided testing function. Otherwise undefined is returned\n\n`list.find(callback[, thisArg])`\n\n##### Parameters\n\n- *callback :* Function to test for each element, taking three arguments:\n    \n    - *element :* The current element being processed in the list\n    \n    - *index :* The index of the current element being processed in the list\n    \n    - *list :* The list every was called upon\n\n- *thisArg :* Value to use as this when executing callback\n\n- *Return value :* A value in the list if an element passes the test; otherwise, undefined\n\n\n\n### DoublyLinked.prototype.forEach()\n\nExecutes a provided function once for each list element (from left to right)\n\n`list.forEach(callback[, thisArg])`\n\n##### Parameters\n\n- *callback :* Function to test for each element, taking three arguments:\n    \n    - *element :* The current element being processed in the list\n    \n    - *index :* The index of the current element being processed in the list\n    \n    - *list :* The list every was called upon\n\n- *thisArg :* Value to use as this when executing callback\n\n- *Return value :* Value to use as this when executing callback\n\n\n### DoublyLinked.prototype.forEachRight()\n\nExecutes a provided function once for each list element (from right to left)\n\n`list.forEachRight(callback[, thisArg])`\n\n##### Parameters\n\n- *callback :* Function to test for each element, taking three arguments:\n    \n    - *element :* The current element being processed in the list\n    \n    - *index :* The index of the current element being processed in the list\n    \n    - *list :* The list every was called upon\n\n- *thisArg :* Value to use as this when executing callback\n\n- *Return value :* Value to use as this when executing callback\n\n\n### DoublyLinked.prototype.includes()\n\nDetermines whether an list includes a certain element, returning true or false as appropriate\n\n`list.includes(searchElement[, fromIndex])`\n\n##### Parameters\n\n- *searchElement :* The element to search for\n    \n- *fromIndex :* The position in this list at which to begin searching for searchElement. A negative value searches from the index of list.length + fromIndex by asc. Defaults to 0.\n\n- *Return value :* true if the searchElement found in the list; otherwise, false\n\n\n\n### DoublyLinked.prototype.insert()\n\nAdds one or more elements right after the cursor node of the list and returns the new length of the list\n\n`list.insert(element1[, ...[, elementN]])`\n\n##### Parameters\n\n- *elementN :* The elements to add right after the cursor\n    \n- *Return value :* The new length of the list\n\n\n### DoublyLinked.prototype.join()\n\nAdds one or more elements right after the cursor node of the list and returns the new length of the list\n\n`list.join([separator])`\n\n##### Parameters\n\n- *separator :* Specifies a string to separate each pair of adjacent elements of the list\n    \n- *Return value :* A string with all list elements joined. If length is 0, the empty string is returned\n\n\n### DoublyLinked.prototype.map()\n\nCreates a new list with the results of calling a provided function on every element in the calling list\n\n`list.map(callback[, thisArg])`\n\n##### Parameters\n\n- *callback :* Function to test for each element, taking three arguments:\n    \n    - *currentValue :* The current element being processed in the list\n    \n    - *index :* The index of the current element being processed in the list\n    \n    - *list :* The list every was called upon\n\n- *thisArg :* Value to use as this when executing callback\n\n- *Return value :* A new list with each element being the result of the callback function\n\n\n\n### DoublyLinked.prototype.next()\n\nMoves cursor to the next and returns its value\n\n`list.next()`\n\n##### Parameters\n\n- *Return value :* Returns value of next node to the cursor. If cursor reaches to the end it returns undefined\n\n\n\n### DoublyLinked.prototype.prev()\n\nMoves cursor to the previous and returns its value\n\n`list.prev()`\n\n##### Parameters\n\n- *Return value :* Returns value of previous node to the cursor. If cursor reaches to the head it returns undefined\n\n\n\n### DoublyLinked.prototype.pop()\n\nRemoves the last element from the list and returns that element\n\n`list.pop()`\n\n##### Parameters\n\n- *Return value :* The removed element from the list; undefined if the list is empty.\n\n\n\n### DoublyLinked.prototype.push()\n\nAdds one or more elements to the end of the list and returns the new length of the list\n\n`list.push(element1[, ...[, elementN]])`\n\n##### Parameters\n\n- *elementN :* The elements to add to the end of the list\n    \n- *Return value :* The new length of the list\n\n\n\n### DoublyLinked.prototype.reduce()\n\nApplies a function against an accumulator and each element in the list (from left-to-right) to reduce it to a single value\n\n`list.reduce(callback[, initialValue])`\n\n##### Parameters\n\n- *callback :* Function to test for each element, taking three arguments:\n    \n    - *accumulator :* The accumulator accumulates the callback's return values; it is the accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied.\n    \n    - *currentValue :* The current element being processed in the list\n    \n    - *currentIndex :* The index of the current element being processed in the list\n    \n    - *list :* The list every was called upon\n\n- *initialValue :* Value to use as the first argument to the first call of the callback\n\n- *Return value :* The value that results from the reduction\n\n\n### DoublyLinked.prototype.reduceRight()\n\nApplies a function against an accumulator and each element in the list (from right-to-left) to reduce it to a single value\n\n`list.reduceRight(callback[, initialValue])`\n\n##### Parameters\n\n- *callback :* Function to test for each element, taking three arguments:\n    \n    - *accumulator :* The accumulator accumulates the callback's return values; it is the accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied.\n    \n    - *currentValue :* The current element being processed in the list\n    \n    - *currentIndex :* The index of the current element being processed in the list\n    \n    - *list :* The list every was called upon\n\n- *initialValue :* Value to use as the first argument to the first call of the callback\n\n- *Return value :* The value that results from the reduction\n\n\n### DoublyLinked.prototype.reset()\n\nResets cursor to head\n\n`list.reset()`\n\n##### Parameters\n\n- *Return value :* Returns the DoublyLinked instance which this method is called\n\n\n\n### DoublyLinked.prototype.reverse()\n\nReverses a list in place. The first array element becomes the last, and the last list element becomes the first\n\n`list.reverse()`\n\n##### Parameters\n\n- *Return value :* Returns the DoublyLinked instance which this method is called\n\n\n### DoublyLinked.prototype.shift()\n\nRemoves the first element from the list and returns that element\n\n`list.shift()`\n\n##### Parameters\n\n- *Return value :* The removed element from the list; undefined if the list is empty\n\n\n\n### DoublyLinked.prototype.some()\n\nTests whether all elements in the list pass the test implemented by the provided function (from left to right)\n\n`list.some(callback[, thisArg])`\n\n##### Parameters\n\n- *callback :* Function to test for each element, taking three arguments:\n    \n    - *currentValue :* The current element being processed in the list\n    \n    - *index :* The index of the current element being processed in the list\n    \n    - *list :* The list every was called upon\n\n- *thisArg :* Value to use as this when executing callback\n\n- *Return value :* Value to use as this when executing callback\n\n\n\n### DoublyLinked.prototype.someRight()\n\nTests whether all elements in the list pass the test implemented by the provided function (from right to left)\n\n`list.someRight(callback[, thisArg])`\n\n##### Parameters\n\n- *callback :* Function to test for each element, taking three arguments:\n    \n    - *currentValue :* The current element being processed in the list\n    \n    - *index :* The index of the current element being processed in the list\n    \n    - *list :* The list every was called upon\n\n- *thisArg :* Value to use as this when executing callback\n\n- *Return value :* Value to use as this when executing callback\n\n\n### DoublyLinked.prototype.toArray()\n\nReturns a new array containing elements of the list\n\n`list.toArray()`\n\n##### Parameters\n\n- *Return value :* A new Array instance contains elements of the list\n\n\n\n### DoublyLinked.prototype.toString()\n\nReturns a string representing the specified list and its elements\n\n`list.toString()`\n\n##### Parameters\n\n- *Return value :* Returns a string representing the specified list and its elements.\n\n\n\n### DoublyLinked.prototype.unshift()\n\nAdds one or more elements to the beginning of the list the new length of the list\n\n`list.unshift(element1[, ...[, elementN]])`\n\n##### Parameters\n\n- *elementN :* The elements to add to the front of the list\n    \n- *Return value :* The new length of the list\n\n\n### DoublyLinked.prototype\\[@@iterator\\]\n\nReturns the iterator object contains entries\n\n`const iterator = list[Symbol.iterator]()`\n\n```js\nfor (const val in list) {\n  ...\n}\n```\n\n##### Parameters\n    \n- *Return value :* Returns the iterator object contains entries\n\n\n\n## Properties\n\n#### cursor\n\nReturns current located node of the list\n\n#### head\n\nReturns first node of the list\n\n#### length\n\nReturns the element count of the list\n\n#### head\n\nReturns last node of the list\n\n## Node Compatibility\n\n  - node `\u003e= 6.0`;\n  \n### License\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/doublylinked.svg\n[npm-url]: https://npmjs.org/package/doublylinked\n[travis-image]: https://img.shields.io/travis/panates/doublylinked/master.svg\n[travis-url]: https://travis-ci.org/panates/doublylinked\n[coveralls-image]: https://img.shields.io/coveralls/panates/doublylinked/master.svg\n[coveralls-url]: https://coveralls.io/r/panates/doublylinked\n[downloads-image]: https://img.shields.io/npm/dm/doublylinked.svg\n[downloads-url]: https://npmjs.org/package/doublylinked\n[gitter-image]: https://badges.gitter.im/panates/doublylinked.svg\n[gitter-url]: https://gitter.im/panates/doublylinked?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\n[dependencies-image]: https://david-dm.org/panates/doublylinked/status.svg\n[dependencies-url]:https://david-dm.org/panates/doublylinked\n[devdependencies-image]: https://david-dm.org/panates/doublylinked/dev-status.svg\n[devdependencies-url]:https://david-dm.org/panates/doublylinked?type=dev\n[quality-image]: http://npm.packagequality.com/shield/doublylinked.png\n[quality-url]: http://packagequality.com/#?package=doublylinked\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanates%2Fdoublylinked","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanates%2Fdoublylinked","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanates%2Fdoublylinked/lists"}