Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c0a6f61d6 | |||
| 5d78b27eed |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartvalidator",
|
"name": "@pushrocks/smartvalidator",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@pushrocks/smartvalidator",
|
"name": "@pushrocks/smartvalidator",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/validator": "^13.7.4",
|
"@types/validator": "^13.7.4",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartvalidator",
|
"name": "@pushrocks/smartvalidator",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "a wrapper for the validator package to perform validations",
|
"description": "a wrapper for the validator package to perform validations",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
|||||||
@@ -10,6 +10,11 @@ tap.test('first test', async () => {
|
|||||||
|
|
||||||
tap.test('should check an IBAN', async () => {
|
tap.test('should check an IBAN', async () => {
|
||||||
expect(testValidator.isIban('AT95 0100 0000 0555 4915')).toBeTrue();
|
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();
|
tap.start();
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@pushrocks/smartvalidator',
|
name: '@pushrocks/smartvalidator',
|
||||||
version: '1.0.2',
|
version: '1.0.3',
|
||||||
description: 'a wrapper for the validator package to perform validations'
|
description: 'a wrapper for the validator package to perform validations'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,4 +8,8 @@ export class SmartValidator {
|
|||||||
public isIban(stringArg: string) {
|
public isIban(stringArg: string) {
|
||||||
return plugins.validator.isIBAN(stringArg);
|
return plugins.validator.isIBAN(stringArg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public escape(stringArg: string) {
|
||||||
|
return plugins.validator.escape(stringArg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user