Lady [Fri, 19 May 2023 07:20:39 +0000 (00:20 -0700)]
Fix base64 implementation
I believe that the old implementation was just wrong, and it simply
wasn’t caught because Deno’s `assertEquals` doesn’t actually know what
to do with raw buffers. Wrapping them to build typed arrays creates
working tests, and this implementation matches observed behaviour with
`atob` and `btoa`.
Lady [Tue, 20 Sep 2022 03:39:11 +0000 (20:39 -0700)]
Add to⸺Notation functions to numeric.js
The default Number::toString method provides a result which is
difficult to parse. Number::toExponential and Number::toFixed are
better; they are now provided via toExponentialNotation and
toFixedDecimalNotation. Support for big·ints has been added as well.
Lady [Thu, 8 Sep 2022 05:20:46 +0000 (22:20 -0700)]
Provide fake external constructor for Matcher
Classes which depend on identity for behaviours should not be exposed
because this inheritance can be modified at runtime. This commit
provides a fake Matcher constructor which simply calls the real one.
This has a side‐effect of reducing the amount of prototype modification
which this class setup entailed, at the cost of needing to manually
redefine all the properties from the internal Matcher constructor
prototype onto the external one.
Lady [Sun, 4 Sep 2022 21:47:15 +0000 (14:47 -0700)]
Treat object function args more consistently
Functions like getOwnPropertyKeys now do not require that their
arguments are objects, but *do* require that they are not null or
undefined. Similarly, toObject now throws for null and undefined
values, rather than returning an empty object. Use `toObject($ ?? {})`
if you need the old behaviour.