Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

js-format-cpf

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-format-cpf - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

2

dist/index.d.ts

@@ -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, "");

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc