
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
alpinejs-money
Advanced tools
Alpine JS plugin for formatting currency values in multiple languages and currencies đź’¸
Alpine JS plugin for formatting currency values in multiple languages and currencies đź’¸
<script
defer
src="https://unpkg.com/alpinejs-money@latest/dist/cdn.min.js"
></script>
<script defer src="https://unpkg.com/alpinejs@latest/dist/cdn.min.js"></script>
npm install -D alpinejs-money
yarn add -D alpinejs-money
import Alpine from 'alpinejs'
import money from 'alpinejs-money'
Alpine.plugin(money)
Alpine.start()
<div x-data="{ priceInt: 9999, priceDec: 99.99 }">
<p x-money.en-GB.GBP="priceInt"></p>
<p x-money.ja-JP.JPY="priceInt"></p>
<p x-money.en-US.USD="priceInt"></p>
<!-- Decimal -->
<p x-money.en-GB.GBP.decimal="priceDec"></p>
<p x-money.ja-JP.JPY.decimal="priceDec"></p>
<p x-money.en-US.USD.decimal="priceDec"></p>
</div>
<div x-data="{ priceInt: 9999, priceDec: 99.99 }">
<p x-money="priceInt" data-locale="en-GB" data-currency="GBP"></p>
<p x-money="priceInt" data-locale="ja-JP" data-currency="JPY"></p>
<p x-money="priceInt" data-locale="en-US" data-currency="USD"></p>
<!-- Decimal -->
<p x-money.decimal="priceDec" data-locale="en-GB" data-currency="GBP"></p>
<p x-money.decimal="priceDec" data-locale="ja-JP" data-currency="JPY"></p>
<p x-money.decimal="priceDec" data-locale="en-US" data-currency="USD"></p>
</div>
<div x-data="{ priceInt: 9999, priceDec: 99.99 }">
<p x-money.global="priceInt"></p>
<p x-money.global.decimal="priceDec"></p>
</div>
This will look for locale and currency which is on the global xMoney
object.
window.xMoney = {
locale: 'en-CA',
currency: 'CAD',
}
<div x-data="{ priceInt: 9999, priceDec: 99.99 }">
<p x-money.shopify="priceInt"></p>
<p x-money.shopify.decimal="priceDec"></p>
</div>
This will look for Shopify.locale and Shopify.currency.active which is on
the global Shopify object.
If this isn't set by default then you can set it like this.
window.Shopify = {
locale: 'en-CA',
currency: {
active: 'CAD',
},
}
The .flat modifier only removes .00 (or ,00 for some locales) when the
value is a whole number.
<div x-data="{ priceInt: 6010 }">
<!-- ÂŁ60.10 -->
<p x-money.en-GB.GBP="priceInt"></p>
<!-- ÂŁ60.10 (It doesn't make sense to remove `.10` here) -->
<p x-money.en-GB.GBP.flat="priceInt"></p>
</div>
FAQs
Alpine JS plugin for formatting currency values in multiple languages and currencies đź’¸
The npm package alpinejs-money receives a total of 451 weekly downloads. As such, alpinejs-money popularity was classified as not popular.
We found that alpinejs-money 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.