
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
price-parser-js
Advanced tools
A powerful library that parses price and currency from text (string). Handles almost every case!
A powerful JavaScript library that extracts prices and currency from text! Handles multiple formats and edge cases.
✅ Extracts price & currency from any text
✅ Handles $, €, £, ₹, ¥, and more
✅ Works with decimals, commas, and spaces
✅ Supports JavaScript & TypeScript
Install using npm:
npm install price-parser-js
const { extractPriceAndCurrency } = require("price-parser");
const result = extractPriceAndCurrency("$1233.54 CHF");
console.log(result); // { price: 1233.54, currency: "CHF" }
extractPriceAndCurrency(priceText)
// Parses a string to extract the price and currency.
priceText (string) - The input text containing a price and currency.
Returns
{ price: number, currency: string | null }
Examples
extractPriceAndCurrency("€1.234,99"); // { price: 1234.99, currency: "€" }
extractPriceAndCurrency("1233.54 CHF"); // { price: 1233.54, currency: "CHF" }
extractPriceAndCurrency("$1,233.54"); // { price: 1233.54, currency: "$" }
extractPriceAndCurrency("JPY 1000"); // { price: 1000, currency: "JPY" }
extractPriceAndCurrency("1000 GBP"); // { price: 1000, currency: "GBP" }
extractPriceAndCurrency("No price here"); // { price: null, currency: null }
FAQs
A powerful library that parses price and currency from text (string). Handles almost every case!
We found that price-parser-js demonstrated a not healthy version release cadence and project activity because the last version was released 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
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.