Skip to content

Dot-Env Conversion v3.0.0

Choose a tag to compare

@linhntaim linhntaim released this 15 Oct 13:56
· 4 commits to master since this release

Changes:

  • auto:boolean and boolean conversion methods now accept additional original values:
    • True values: ok, Ok, OK.
    • False: not, Not, NOT, none, None, NONE.
  • Binary (0b...) , octal (0o...) and hexadecimal (0x...) number syntax are now accepted in auto:number, auto:bigint, boolean, number, bigint conversion methods.
  • Empty array ([], [ ], ...) or empty object ({}, { }, ...) are now accepted in boolean (converted to false), number (converted to 0) and bigint (converted to 0n) conversion methods.
  • Conversion now ignores non-string environment variables.
  • Add Documentation to README.md.
  • Update ignore files.
  • Do some small refactor.
  • Enhancements:
    • switch(true) turns into if ... return ... blocks.
    • Values that could be matched with an exact converted value now are cached in specific lookup tables -> reduce the cost of executing if statements.
    • flattenValue is now more detailed.
    • restoreValue now ignores non-string values.