Skip to content

Releases: DWTechs/Checkard.js

Better error messages

07 Sep 09:44
Compare
Choose a tag to compare
  • Update error messages

Type predicate

02 Sep 19:00
Compare
Choose a tag to compare
  • All validation functions now accept unknown type and perform internal type checking
  • All validation functions now return a type predicate (e.g., v is string) instead of a boolean. Except for isFalsy() and isTruthy() still return boolean values.
  • All contain functions remain unchanged and continue to return boolean values.
  • All normalize functions remain unchanged and continue to return string | false
  • For both isValidDate() and isValidTimestamp(), min and max parameters can be of type date or timestamp.
  • Improved isDate() function to return false when date = date.setDate(NaN)
  • Improved isEmail() function to return false when Top-Level Domain starts with a number
  • Improved isValidTimestamp() function to have better min and max conversions
  • Improved test suite to more than 3200 tests with enhanced accuracy and edge case coverage

Improve throwError for compare function

24 Aug 05:38
Compare
Choose a tag to compare
  • compare() function now throws an error when a comparison fails and throwError is true, for both unary and binary comparators

throwErr

22 Aug 19:41
d15d494
Compare
Choose a tag to compare
  • Functions have a throwErr property to throw specific error instead of false
  • isBase64 regex now rejects empty strings, improving validation and error handling

Delete b64Encode() and b64Decode()

19 Aug 18:43
Compare
Choose a tag to compare
  • Delete b64Encode() and b64Decode() functions

String, number and validNumber support for undefined and null in Typescript

04 Mar 12:14
Compare
Choose a tag to compare
  • String, number and validNumber functions support undefined and null values in Typescript

Better isProperty() typings

23 Feb 20:44
Compare
Choose a tag to compare
  • Update isProperty() function inputs typings

number functions handles string as input

23 Feb 16:16
Compare
Choose a tag to compare
  • Update number validation functions type for string as input

string functions empty string cases

23 Feb 11:31
Compare
Choose a tag to compare
  • Update string validation functions for empty string cases

Base64 transform

22 Feb 08:59
Compare
Choose a tag to compare
  • Add b64Encode() and b64Decode() methods to transform strings accordingly.