
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@lacussoft/cpf-fmt
Advanced tools
Utility function to format CPF (Brazilian ID document).
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
---|---|---|---|---|---|
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
$ npm install @lacussoft/cpf-fmt
// ES Modules
import cpfFmt from '@lacussoft/cpf-fmt'
// Common JS
const cpfFmt = require('@lacussoft/cpf-fmt')
or import it through your HTML file, using CDN:
<script src="https://cdn.jsdelivr.net/npm/@lacussoft/cpf-fmt@latest/dist/cpf-fmt.min.js"></script>
const cpf = '47844241055'
cpfFmt(cpf) // returns '478.442.410-55'
cpfFmt(cpf, { // returns '478.***.***-**'
hidden: true
})
cpfFmt(cpf, { // returns '478442410_55'
delimiters: {
dot: '',
dash: '_'
}
})
cpfFmt(cpf, {
delimiters: {
dot: '.', // string to replace the dot characters
dash: '-', // string to replace the dash character
},
escape: false, // boolean to define if the result should be HTML escaped
hidden: false, // boolean to define if digits should be hidden
hiddenKey: '*', // string to replace hidden digits
hiddenRange: {
start: 3, // starting index of the numeric sequence to be hidden (min 0)
end: 10, // ending index of the numeric sequence to be hidden (max 10)
},
onFail(value) { // fallback function to be invoked in case a non-11-digits is passed
return value
}
})
FAQs
Utility function to format CNPJ (Brazilian personal ID)
The npm package @lacussoft/cpf-fmt receives a total of 773 weekly downloads. As such, @lacussoft/cpf-fmt popularity was classified as not popular.
We found that @lacussoft/cpf-fmt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.