diff --git a/test/test.both.ts b/test/test.both.ts index 3506355..0ce8ac4 100644 --- a/test/test.both.ts +++ b/test/test.both.ts @@ -10,6 +10,11 @@ tap.test('first test', async () => { tap.test('should check an IBAN', async () => { expect(testValidator.isIban('AT95 0100 0000 0555 4915')).toBeTrue(); +}); + +tap.test('escape email', async () => { + const escapedEmail = testValidator.escape('test@example.com'); + console.log(escapedEmail); }) tap.start(); diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index a6554fc..e72808f 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@pushrocks/smartvalidator', - version: '1.0.2', + version: '1.0.3', description: 'a wrapper for the validator package to perform validations' } diff --git a/ts/index.ts b/ts/index.ts index 370ab09..88cd01c 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -8,4 +8,8 @@ export class SmartValidator { public isIban(stringArg: string) { return plugins.validator.isIBAN(stringArg); } + + public escape(stringArg: string) { + return plugins.validator.escape(stringArg); + } } \ No newline at end of file