Skip to content

Releases: smonn/validator-fns

v1.6.3

12 Jun 18:55
Compare
Choose a tag to compare

Upgrade dev dependencies.

v1.6.2

01 Jun 15:52
Compare
Choose a tag to compare

Upgrade dev dependencies.

v1.6.1

26 May 18:09
Compare
Choose a tag to compare

Switched back to uvu for testing.

v1.6.0

26 May 16:39
Compare
Choose a tag to compare

Various fixes and type changes via #31, but note the following:

  • Reverted the ESM only build due to compatibility issues with Next.js)
  • Reverted back to c8 from nyc as c8 "just works"
  • Slight file size increase due to some internal changes. Same tests and features as before.
  • The typings may include some breaking changes.

v1.5.4

22 May 17:13
Compare
Choose a tag to compare

Upgrade dev dependencies.

v1.5.0

01 Mar 22:01
Compare
Choose a tag to compare

Performance optimizations. Primitive tests (string, number, etc) now cache/memoize the results for faster re-validation. In benchmarks, this translates to 60%-80% faster validation.

v1.3.0

06 Feb 03:46
Compare
Choose a tag to compare
  • Minor breaking change: APIs for valid and invalid helpers have changed. Check the README for details.
  • Updated README
  • Added optional exclusive parameters for minDate and maxDate

v1.2.0

04 Feb 03:27
Compare
Choose a tag to compare
  • Add oneOf validator for enum-style validation
  • Add a more thorough example to README
  • Update tests to include the kitchen sink example to ensure it correctly runs

v1.1.5

04 Feb 02:04
Compare
Choose a tag to compare
  • Bumped code coverage to 100%
    • Minor refactoring in some places to ensure 100% coverage
  • Upgraded dev dependencies

v1.1.2

11 Jan 20:25
Compare
Choose a tag to compare

Performance improvements

About 45% improved performance in the benchmark. Not quite fastest-validator fast, but that library lacks built-in async support and is over 10 kB gzipped. This is fully async and aims to stay below 2.5 kB gzipped.

Before:

===========================
  Benchmark validator-fns
===========================

Platform info:
==============
   Darwin 20.2.0 x64
   Node.JS: 14.15.3
   V8: 8.4.371.19-node.17
   Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz × 16

Suite: Simple test
✔ validator-fns*          293,781 rps

   validator-fns*           0%        (293,781 rps)   (avg: 3μs)
-----------------------------------------------------------------------

After:

===========================
  Benchmark validator-fns
===========================

Platform info:
==============
   Darwin 20.2.0 x64
   Node.JS: 14.15.3
   V8: 8.4.371.19-node.17
   Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz × 16

Suite: Simple test
✔ validator-fns*          420,459 rps

   validator-fns*           0%        (420,459 rps)   (avg: 2μs)
-----------------------------------------------------------------------