js-format-cpf
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -1,1 +0,1 @@ | ||
export declare function formatCPF(CPF?: string): string | undefined; | ||
export declare function formatCPF(CPF: string): string; |
@@ -18,4 +18,4 @@ "use strict"; | ||
test('should return undefined when param is undefined', () => { | ||
expect((0, index_1.formatCPF)(undefined)).toBe(undefined); | ||
expect((0, index_1.formatCPF)('')).toBe(''); | ||
}); | ||
}); |
{ | ||
"name": "js-format-cpf", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Lib to format CPF", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -22,5 +22,5 @@ import { formatCPF } from './index'; | ||
test('should return undefined when param is undefined', () => { | ||
expect(formatCPF(undefined)).toBe(undefined); | ||
expect(formatCPF('')).toBe(''); | ||
}); | ||
}); |
@@ -1,2 +0,2 @@ | ||
export function formatCPF(CPF?: string) { | ||
export function formatCPF(CPF: string):string { | ||
if (!CPF) return CPF; | ||
@@ -3,0 +3,0 @@ let digits = CPF.replace(/\D/g, ""); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3795