📄️ Implement Event Emitter
Implementing an event emitter in JavaScript involves creating a class or object that can handle events. This typically includes methods for adding event listeners, emitting events, and removing event listeners. Here's a basic example to illustrate how you can implement an event emitter in JavaScript:
📄️ Implement curry function
You are required to implement a curry function that takes a function and returns a curried version of it.
📄️ Debounce decorator
Debounce decorator is a high-order function that delays the function execution by the given timer. You are required to implement it.
📄️ Deep Clone of an object
You are required to implement a deep copy of an object.
📄️ Flatten the Array
You are required to implement a custom Array.prototype.flat function. This function creates a new array with all sub-array elements concatenated into it recursively up to the specified depth.
📄️ Implement forEach
You are required to implement Array.prototype.forEach method, which calls the given callback function for each element in a given array.
📄️ Implement Array.prototype.map
You are required to implement a custom Array.prototype.map method, which is used to create a new array by applying a given callback function to every element of an original array. This method is particularly useful for transforming data.
📄️ Implement a custom Observable
You are required to implement a custom Observable from a RxJS library.
📄️ Implement a custom Promise.all() method
Promise.all is a method in JavaScript that takes an iterable of promises as input and returns a single promise that resolves when all of the input promises have resolved or when any of the input promises rejects.
📄️ Implement a custom Promise.race() method
You are required to implement a custom Promise.race() function.
📄️ Implement custom Promise
You are required to implement a custom Promise.
📄️ Implement primisify
You are required to implement custom Promisify function.
📄️ Implement Spy decorator
The Decorator is a design pattern that allows you to modify the existing functionality of a function by wrapping it in another function.
📄️ Implement throttle decorator
Throttling is a technique that ensures that the function does not execute more than once in a specified time period.
📄️ Traverse DOM tree
You are required to implement a function that traverses the DOM tree and returns an array of all the elements in the tree.