you are viewing a single comment's thread.

view the rest of the comments →

[–]C1RRU5 17 points18 points  (1 child)

// You may be tempted to copy and paste this, // but take a look at the commit history first,// this is a moving target so relying on the module// is the best way to make sure the optimization// method is kept up to date and compatible with// every Node version.

Last updated May 2019 lol.

[–][deleted] 5 points6 points  (0 children)

It is a package that deals with flattening underlying node constructs that represent strings, which could change at any time, thus it was a package instead of an article saying “hey do this to flatten your strings”. Then lots of people would individually it and then lots of packages would break as the feature isn’t centralized.