Is there a case where the split().reverse().join() end up being null or something 👀
It doesn't really matter in this case
pan({ split () => ({ reverse: () => ({ join: () => null }) }) })
If you're absolutely paranoid, you can check if typeof x != 'string' and throw a TypeError.
Why shouldn't you? === is simpler, therefore should be preferred
Use TypeScript if you care about types . .
Обсуждают сегодня