paulmillr / noble-ciphers

Audited & minimal JS implementation of Salsa20, ChaCha and AES
https://paulmillr.com/noble
MIT License
214 stars 8 forks source link

utils: replace isPlainObject with a robuster implementation #22

Closed ocavue closed 9 months ago

ocavue commented 9 months ago

Copy the code from the NPM package is-plain-obj to replace our current isPlainObject implementation. Closes https://github.com/paulmillr/noble-ciphers/issues/21.

I choose to copy code instead of adding it as a dependency because of the following reasons:

  1. is-plain-obj is an ESM-only package, while noble is an ESM-CJS dual package.
  2. @noble/ciphers is designed as zero-dependency.
maccman commented 9 months ago

@paulmillr Just bumping this one. I suspect you'll want to merge it.

paulmillr commented 9 months ago

Solved in 2e49a16. It's only used internally, so it was simplified.

paulmillr commented 9 months ago

0.5.0 is out