Skip to content

Releases: DWTechs/Antity.js

Better property names

14 Mar 19:53

Choose a tag to compare

  • Rename send property to isPrivate with inverted logic (isPrivate: true means the property should NOT be sent)
  • Rename need property to requiredFor for better clarity
  • Rename typeCheck property to isTypeChecked for consistency
  • Rename unsafeProps getter to privateProps to align with new naming convention

Entity properties update

01 Mar 08:05

Choose a tag to compare

  • Delete check() method
  • Delete methods, sanityze, normalize and validate options
  • requiredoption is now called require. It is of type array of methods instead of boolean
  • safeoption is now called send

Replace `normalize()` and `validate()`

22 Dec 20:47

Choose a tag to compare

  • Replace normalize() and validate() methods with more explicit methods:
    • Add normalizeArray() for normalizing arrays of records (supports req.body.rows as array)
    • Add validateArray() for validating arrays of records (supports req.body.rows as array)
    • Add normalizeOne() for normalizing a single record (supports req.body as object)
    • Add validateOne() for validating a single record (supports req.body as object)

Arbitrary custom properties

26 Sep 19:12

Choose a tag to compare

  • Property class now includes an index signature, allowing arbitrary custom properties to be added to instances. This makes the class extensible for downstream libraries and user code.

Improve error messages

21 Sep 17:54

Choose a tag to compare

  • Improve error messages
  • Update dependencyies :
    • @dwtechs/checkard to 3.5.1
    • @dwtechs/sparray to 0.2.1

logs

16 Aug 06:22

Choose a tag to compare

  • Add logs at the beginning of exported methods

Check() method

27 Jul 20:04

Choose a tag to compare

  • Add check middleware to Entity class for validating and normalizing request body rows

Password validation

04 May 22:00

Choose a tag to compare

  • Add password validation with configurable options

Typescript v5.8.3

03 May 18:48

Choose a tag to compare

  • Update Typescript to version 5.8.3

Fix middleware scope

03 May 17:14

Choose a tag to compare

  • Fix scope issue when using validate and normalize middlewares