project-slippi / slippi-js

Parse slp files and compute stats
GNU Lesser General Public License v3.0
148 stars 79 forks source link

Remove moment dependency #101

Closed vinceau closed 2 years ago

vinceau commented 2 years ago

We currently only use the moment library for two things:

  1. calling moment().toISOString()
  2. formatting the initial filename for SLP files

We do not need to import the entirety of moment just to use this functionality. We can simply use (new Date()).toISOString() and import { format } from 'date-fns' to format the date keeping in mind that the format string is 🚨different🚨 to moment.

shrianshChari commented 2 years ago

Fixed by #103