
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
localized-address-format
Advanced tools
Zero-dependency address formatting library.
If you are in need for simply formatting postal addresses in a localized format, this is the right library for you. It is based on code from libaddressinput by Google and uses the same data from their Address Data Service, but in a pruned format which is only a little over 5kb in size.
Usage of the library is very straight forward:
import {formatAddress} from 'localized-address-format';
console.log(formatAddress({
postalCountry: 'US',
administrativeArea : 'CA',
locality: 'San Fransisco',
//dependentLocality: '',
postalCode: '94016',
//sortingCode: '',
organization: 'Example Org.',
name: 'Jon Doe',
addressLines : ['548 Market St'],
}).join('\n'));
This library formats addresses in the local script type by default. If you prefer to use the latin script type, pass
latin
as second argument to the formatAddress()
function.
All fields of the address are optional and can either be left out completely or passed in as empty string or, in the
case of addressLines
, be an empty array. The format of the resulting address is dependent on the postalCountry
.
The formatted address will not include the country itself. Adding the country to the end of the address is up to your application.
FAQs
Localized Address Formatting
The npm package localized-address-format receives a total of 4,402 weekly downloads. As such, localized-address-format popularity was classified as popular.
We found that localized-address-format 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.