Dot-Env Conversion v2.0.0
Rework from v1:
- Fresh code base with the same idea.
- Main features are nearly the same.
- Changes:
makemethod is nowconvert.envproperty that keeps converting results is removed.getenvmethod with the default-value feature is removed.- Auto-conversion works slightly differently:
- Case-sensitive is enabled.
nullconversion is removed from public access (i.e. you cannot override it) (considered as a fixed conversion) and returns null value instead of empty string; values to be null is different from v1 (due to case-sensitive).boolconversion is nowboolean; values to be false or true is different from v1 (due to case-sensitive).rawconversion is nowstring.numberconversion: update regex to match a number.arrayconversion has the logic different from v1 (now usesJSON.parseinstead of custom parsing).jsonconversion is nowobject.- New values to handle:
undefined,NaN,Infinity. stringconversion is now used by default instead ofjson(now:object) as in v1. And it is used by default not only for Auto-conversion but everywhere.
- New features:
- New conversions:
undefined(fixed conversion),bigint,symbol. - Method aliases:
boolis now an alias tobooleanconversion.
- New conversions:
See README.md file for new documentation.