Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
2 answers
97 views

State management patterns in vanilla JavaScript

I am trying to manage state in vanilla JavaScript—without using frameworks like React or Vue. I am also not using state management libraries. My requirements are: Reactivity Time Travel (Undo/Redo) ...
Ahmad Ismail's user avatar
3 votes
1 answer
414 views

Event sourcing javascript implementation

An event source built around an observer design pattern implementation… ...
user avatar
1 vote
1 answer
72 views

Buffered source of HTMLElement(s)

Temporary storing the element(s) returned by document.querySelector and document.querySelectorAll methods could improve ...
user avatar
1 vote
1 answer
87 views

Sprinkler effect

Developed around visibility CSS property and HTMLElement#offsetHeight and ...
user avatar
4 votes
3 answers
242 views

Get the contents of a table cell for all selected rows

I have a table of user info. When you click the button, I want to get the email address from each selected row, output into a comma-separated string. I got it to work with the following code, but I'm ...
LBF's user avatar
  • 143
2 votes
1 answer
110 views

Move timestamp to the next Monday 10:01 AM [closed]

I've been battling ChatGPT for hours now and can't get satisfied with this simple algorithm in TypeScript. These two (hopefully correct) TypeScript+ReactNative solutions should move the timestamp ...
Slazer's user avatar
  • 121
5 votes
1 answer
141 views

Partial Function Application in JavaScript

I'm trying to make a partial function from any function. Here is a working example: ...
Miroslav Popov's user avatar
1 vote
1 answer
61 views

Click temporization on user interface elements

Implementation to accommodate different behaviours based on the frequency a user interface element is clicked. It supports number of clicks and number of clicks in a time frame. ...
user275176's user avatar
3 votes
1 answer
135 views

Recursive Factorial Calculation in JavaScript

...
TAHER El Mehdi's user avatar
4 votes
2 answers
200 views

Abundant number implementation

I have implementted a simple JavaScript function to find the list of abundant numbers and print them on the screen. an abundant number is a number for which the sum of its proper divisors is greater ...
Napoleon Bonaparte's user avatar
1 vote
1 answer
147 views

Transform an array into object and set index for an unique key in javascript

I have a method that merges keys and indexes from an array into an object. I'm stuck with ways to compress this method, and I don't know what I can do to make it simpler. Goal get an array of objects ...
wittgenstein's user avatar
1 vote
2 answers
214 views

Simplify a function which performs manipulation of data in Javascript

Upon suggestion in the original question within Stack Overflow, I'm bringing my question here. We have created a function that will convert the data into the desired format, but it has a lot of code ...
SDK's user avatar
  • 113
4 votes
0 answers
216 views

GeekTrust: Traffic problem - functional programming

First attempt to write functional programming, been following OO paradigm all through my programming journey Please review the code and let me know if any comments and violations of functional ...
HariHaravelan's user avatar
4 votes
2 answers
3k views

Download entire localStorage as file

I would like to download the entire contents from localStorage to a json file (in a "clear" formatting). I've tried this and it works perfectly. However, ...
Gibberish's user avatar
  • 109
0 votes
2 answers
89 views

Processing list of users- filtering out from refused list

The code below takes a list of users and displays two lists Refused users Admitted users Sample output: Refuse: Phil, Lola. Admit: Chris, Anne, Colin, Terri, Sam, Kay, Bruce. Any feedback is ...
Elbasel's user avatar
  • 642

15 30 50 per page
1
2 3 4 5
19