From a7493c82dc38ba357146bd4588b58fe90284f2bb Mon Sep 17 00:00:00 2001 From: Evan Shortiss Date: Wed, 31 Aug 2022 15:26:11 -0700 Subject: [PATCH] chore: release prep for 7.2.0 --- API.md | 6 ++++++ CHANGELOG.md | 3 +++ package.json | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 47b8796..e7e792d 100644 --- a/API.md +++ b/API.md @@ -15,6 +15,7 @@ A complete listing of the `env-var` API. * [asArray()](#asarraydelimiter-string) * [asBool()](#asbool) * [asBoolStrict()](#asboolstrict) + * [asEmailString()](#asemailstring) * [asEnum()](#asenumvalidvalues-string) * [asFloat()](#asfloat) * [asFloatNegative()](#asfloatnegative) @@ -196,6 +197,11 @@ Attempt to parse the variable to a Boolean. Throws an exception if parsing fails. The var must be set to either "true" or "false" (upper or lowercase) to succeed. +#### asEmailString() + +Read the variable and validate that it's an email address. Throws an exception +if the value is not an email address. + #### asEnum(validValues: string[]) Converts the value to a string, and matches against the list of valid values. diff --git a/CHANGELOG.md b/CHANGELOG.md index 4547064..c8c20e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 7.2.0 (01/09/2022) +* Add `asEmailString()` accessor (#146) + ## 7.1.1 (28/10/2021) * Fix duplicate identifier error for TypeScript builds (#151) diff --git a/package.json b/package.json index 265bfed..441d36d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "env-var", - "version": "7.1.1", + "version": "7.2.0", "description": "Verification, sanitization, and type coercion for environment variables in Node.js", "main": "env-var.js", "typings": "env-var.d.ts",