Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove third party library is-email #140

Merged
merged 2 commits into from
Nov 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/group.js
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion lib/identify.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 5 additions & 0 deletions lib/is-email.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const matcher = /.+\@.+\..+/;

export default function isEmail(string) {
return matcher.test(string);
}
2 changes: 1 addition & 1 deletion lib/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/track.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";

/**
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
},
Expand Down
4 changes: 0 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down