/polyfill-js

A repository for polyfills, javascript core functions implementations, used on a daily basis for frontend / UI engineers

Primary LanguageJavaScript

Polyfills/JavaScript Custom Implementation List -

Function Polyfills -

  1. Implement Function.bind using call/apply (DONE)
  2. Implement Function.apply using call (DONE)
  3. Implement Function.call using apply (DONE)

Array Polyfills -

  1. Array.map method on Array prototype
  2. Array.filter method on the Array Prototype
  3. Array.find method on the Array Prototype
  4. Array.forEach method on the Array Prototype
  5. Array.reduce method on the Array Prototype
  6. Array.flat method (that will flatten an array into a 1D array) Array Prototype

Promise Polyfills / Async Helpers

  1. Implement Async.sequence, which chains up async functions, like what pipe() does
  2. Implement Async.parallel, which executes a set of async tasks parallelly
  3. Implement Async.series, which executes a set of async tasks in series
  4. Write a method that will implement Promise.all
  5. Write a method that will implement Promise.race
  6. Write a method that will implement Promise.finally
  7. Write a method that will implement Promise.any
  8. Implement Promisify, provide promise support to function perform asynchronous tasks
  9. Implement Promise class

Functional Programming

  1. implement curry()
  2. Implement the pipe() polyfill

JS Concepts -

  1. prototype vs [[Prototype]]
  2. Inheritance in JS using Constructor functions (ES5 way)

JS Problems -

  1. Implement SetInterval Polyfill using setTimeout (DONE)
  2. Implement debounce
  3. Implement throttle
  4. Write a function memoize(memo) that will subsequent calls to a function
  5. Implement clearAllTimeout
  6. Implement an Event Emitter class
  7. Implement deep equal _.isEqual()
  8. Map class
  9. Set class

Design Patterns

  1. Implement observer pattern in javascript
  2. Implement the publisher-subscriber(pub-sub) pattern in javascript

Refer sites

  • bigfrontend.dev
  • jsvault.com