diff --git a/HISTORY.md b/HISTORY.md index 90157e0..710372a 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,4 +1,9 @@ -3.3.1 / 2020-11-06 +3.3.6 / 2020-11-06 +================== + + * Remove third party library "is-email" + +3.3.3 / 2020-11-06 ================== * Remove third party library "type-component" in favor of native JS functions diff --git a/lib/group.js b/lib/group.js index 171311e..24bb402 100644 --- a/lib/group.js +++ b/lib/group.js @@ -1,7 +1,7 @@ "use strict"; import inherit from "inherits"; -import isEmail from "is-email"; +import isEmail from "./is-email"; import newDate from "new-date"; import { Facade } from "./facade"; diff --git a/lib/identify.js b/lib/identify.js index 2c5af82..11df7bd 100644 --- a/lib/identify.js +++ b/lib/identify.js @@ -3,7 +3,7 @@ import { Facade } from "./facade"; import get from "obj-case"; import inherit from "inherits"; -import isEmail from "is-email"; +import isEmail from "./is-email"; import newDate from "new-date"; let trim = (str) => str.trim(); diff --git a/lib/is-email.js b/lib/is-email.js new file mode 100644 index 0000000..c4edda2 --- /dev/null +++ b/lib/is-email.js @@ -0,0 +1,5 @@ +const matcher = /.+\@.+\..+/; + +export default function isEmail(string) { + return matcher.test(string); +} diff --git a/lib/page.js b/lib/page.js index 887d940..b077190 100644 --- a/lib/page.js +++ b/lib/page.js @@ -3,7 +3,7 @@ import inherit from "inherits"; import { Facade } from "./facade"; import { Track } from "./track"; -import isEmail from "is-email"; +import isEmail from "./is-email"; /** * Initialize a new `Page` facade with a `dictionary` of arguments. diff --git a/lib/track.js b/lib/track.js index 7ac3fd6..7ac28aa 100644 --- a/lib/track.js +++ b/lib/track.js @@ -3,7 +3,7 @@ import inherit from "inherits"; import { Facade } from "./facade"; import { Identify } from "./identify"; -import isEmail from "is-email"; +import isEmail from "./is-email"; import get from "obj-case"; /** diff --git a/package.json b/package.json index 05e11ec..f0d30d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@segment/facade", - "version": "3.3.5", + "version": "3.3.6", "description": "Providing common fields for analytics integrations", "keywords": [], "main": "dist/index.js", @@ -24,7 +24,6 @@ "@ndhoule/clone": "^1.0.0", "@segment/isodate-traverse": "^1.0.0", "inherits": "^2.0.1", - "is-email": "0.1.0", "new-date": "github://segmentio/new-date", "obj-case": "0.x" }, diff --git a/yarn.lock b/yarn.lock index 5be91a1..175c193 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5733,10 +5733,6 @@ is-dotfile@^1.0.0: version "1.0.3" resolved "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" -is-email@0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/is-email/-/is-email-0.1.0.tgz#e7eb1aefe8d4a3183980a7172b851272ebd04a95" - is-equal-shallow@^0.1.3: version "0.1.3" resolved "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"