Giter Site home page Giter Site logo

to-do-list's Introduction

To Do list

a simple to do list

live version

screen

Built With

  • Javascript
  • CSS
  • Html

Getting Started

To get the local copy of the project up and running you will need to run the following commands on your terminal:

git clone https://github.com/elasfarc/To-Do-list.git

To install all the available dependecies run: npm install

To run this application locally : npm run start:Dev And then open your browser on the port 3000

Authors

👤 Mohammed Al-Asfar

Show your support

Give a ⭐️ if you like this project!❤️❤️❤️

to-do-list's People

Contributors

elasfarc avatar

Watchers

 avatar

to-do-list's Issues

Code Refactor using DRY,KISS and YAGNI

  • These functions never used in your code, remove them
    export function taskTobeSwapped(e) {
    if (e.path[0].nodeName !== 'LI') return e.path[0].parentElement;
    return e.target;
    }
    export function exchangeElements(parent, element1, element2) {
    const clonedElement1 = element1.cloneNode(true);
    const clonedElement2 = element2.cloneNode(true);
    parent.replaceChild(clonedElement1, element2);
    parent.replaceChild(clonedElement2, element1);
    }

-You have to update the whole array every time

To-Do-list/src/todo.js

Lines 57 to 68 in 79bd6d8

updateIndex(updatedIndexArr) {
updatedIndexArr = updatedIndexArr.map((ele) => ele.title);
const output = [];
updatedIndexArr.forEach((element) => {
output.push(this.#storage.find((ele) => ele.description.trim() === element.trim()));
});
for (const i in output) {
output[i].index = parseInt(i, 10) + 1;
}
this.#storage = output;
this.updateLocalStorage();
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.