Commit Graph

10 Commits

Author SHA1 Message Date
Guangcong Luo
b5c25a84e2 Fix typo 2021-01-06 11:18:56 -08:00
Guangcong Luo
c44af3286d Implement Utils.forceWrap
I wrote a `forceWrap` method to support break-word wrapping in table
cells for scavengers, but apparently code blocks need it too, so I'm
moving it to Utils.

Fixes #7854
2020-12-30 17:41:41 -08:00
Mia
1b1d91df02
Utils: Visualize Maps/Sets in a cleaner fashion (#7830)
* Utils: Visualize Maps/Sets in a cleaner fashion

* OK

* Update lib/utils.ts

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>

* Update lib/utils.ts

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>

* Update lib/utils.ts

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2020-12-27 12:51:11 -08:00
Mia
f792cfe28e
Move FSPath#waitUntil to Utils (#7805) 2020-12-14 14:15:52 -08:00
Mia
fca97b418c Fix build errors 2020-11-30 13:17:52 -06:00
Guangcong Luo
8d79bf9725 Rename Dex.deepClone to Utils.deepClone
`this.dex.deepClone` still exists as an alias to `Utils.deepClone` for
use in `data/`. I'll need to spend more time figuring out the correct
solution there.
2020-08-21 04:24:34 -07:00
Mia
deeed6c789
Remove sim/ and data/'s globals (#7091) 2020-08-07 06:44:15 -07:00
Guangcong Luo
8eeec74ce0 Use TypeScript tuples for low splitFirst limits 2020-07-02 15:06:53 -04:00
Guangcong Luo
e0f97dcf6b Replace Chat.uncache* with Utils.clearRequireCache
This replaces the old approach with a new "clear everything except a
whitelist" approach, which should overall involve much less code and
lead to fewer bugs of the "the path changed for a module and I forgot
to update the uncache paths" variety.

I considered a lot of other approaches, but they seem to have more
flaws without any advantages in exchange for them. (We moved away
from `uncacheTree` because it only tracks the first require: there's
no way to get a full list of dependents for a module, only its first
dependent.)
2020-06-12 22:02:32 -07:00
Mia
6839a1f4db
Add a library for utility functions (#6817) 2020-06-09 22:06:43 -07:00