Skip to content

Commit

Permalink
feat: add circular singly linked list
Browse files Browse the repository at this point in the history
  • Loading branch information
exbotanical committed Jun 8, 2021
1 parent 35feb20 commit 1af46cd
Show file tree
Hide file tree
Showing 6 changed files with 224 additions and 132 deletions.
7 changes: 6 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"presets": [
"@babel/preset-env"
["@babel/preset-env", {
"shippedProposals": true
}]
],
"plugins": [
["@babel/plugin-proposal-class-properties", {
"loose": false
}],
["@babel/plugin-transform-runtime", {
"regenerator": true
}]
Expand Down
11 changes: 5 additions & 6 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"env": {
"node": true,
"es6": true,
"commonjs": true,
"browser": true
"browser": true,
"es2021": true,
"node": true
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"parser": "babel-eslint",
"ecmaVersion": 2021,
"ecmaVersion": 12,
"sourceType": "module",
"ecmaFeatures": {
"impliedStrict": true,
Expand Down
29 changes: 15 additions & 14 deletions build/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
export default {
presets: [
[
'@babel/preset-env',
{
useBuiltIns: false,
modules: false
}
]
],
plugins: [
['@babel/plugin-transform-runtime', {
regenerator: true
}]
]
presets: [
['@babel/preset-env', {
shippedProposals: true,
useBuiltIns: false,
modules: false
}]
],
plugins: [
['@babel/plugin-proposal-class-properties', {
loose: false
}],
['@babel/plugin-transform-runtime', {
regenerator: true
}]
]
}
2 changes: 1 addition & 1 deletion lib/CircularSinglyLinkedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class CircularSinglyLinkedList {
* @returns {Node}
* @private
*/
#move(node, at) {
#move (node, at) {
const tmp = this.#findNodeBefore(node);

tmp.next = node.next;
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,19 @@
]
},
"devDependencies": {
"@babel/core": "7.13.8",
"@babel/core": "7.14.3",
"@babel/eslint-parser": "7.14.4",
"@babel/plugin-proposal-private-methods": "7.13.0",
"@babel/plugin-transform-runtime": "7.13.9",
"@babel/preset-env": "7.13.9",
"@babel/preset-env": "7.14.4",
"@commitlint/cli": "12.0.1",
"@commitlint/config-conventional": "12.0.1",
"@rollup/plugin-babel": "5.3.0",
"@rollup/plugin-commonjs": "17.1.0",
"@rollup/plugin-node-resolve": "11.2.0",
"babel-eslint": "10.1.0",
"core-js": "3.9.1",
"cz-conventional-changelog": "3.3.0",
"eslint": "7.21.0",
"eslint": "7.28.0",
"esm": "3.2.25",
"husky": "4.3.8",
"lint-staged": "10.5.4",
Expand Down
Loading

0 comments on commit 1af46cd

Please sign in to comment.