UNPKG

graphql-extra-scalars

Version:

Collection of extra GraphQL scalar types like Email, URL, Password and more

13 lines (12 loc) 692 B
"use strict"; var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; result["default"] = mod; return result; }; Object.defineProperty(exports, "__esModule", { value: true }); const factory = __importStar(require("../factory")); const GraphQLEmail = factory.createRegexScalar('Email', 'The Email scalar type represents E-Mail addresses compliant to RFC 822.', /^(([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@(([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,})$/ui); exports.GraphQLEmail = GraphQLEmail;