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

intl-messageformat

Package Overview
Dependencies
Maintainers
10
Versions
268
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intl-messageformat - npm Package Compare versions

Comparing version 7.3.3 to 7.5.0

22

CHANGELOG.md

@@ -6,2 +6,24 @@ # Change Log

# [7.5.0](https://github.com/formatjs/formatjs/compare/intl-messageformat@7.3.3...intl-messageformat@7.5.0) (2019-10-30)
### Features
* **@formatjs/cli:** A CLI for formatjs ([#234](https://github.com/formatjs/formatjs/issues/234)) ([1f57a0b](https://github.com/formatjs/formatjs/commit/1f57a0b0921e0228cf3fd4eff756b0cd17e28fb5))
# [7.4.0](https://github.com/formatjs/formatjs/compare/intl-messageformat@7.3.3...intl-messageformat@7.4.0) (2019-10-30)
### Features
* **@formatjs/cli:** A CLI for formatjs ([#234](https://github.com/formatjs/formatjs/issues/234)) ([1f57a0b](https://github.com/formatjs/formatjs/commit/1f57a0b0921e0228cf3fd4eff756b0cd17e28fb5))
## [7.3.3](https://github.com/formatjs/formatjs/compare/intl-messageformat@7.3.2...intl-messageformat@7.3.3) (2019-10-23)

@@ -8,0 +30,0 @@

6

package.json
{
"name": "intl-messageformat",
"version": "7.3.3",
"version": "7.5.0",
"description": "Formats ICU Message strings with number, date, plural, and select placeholders to create localized messages.",

@@ -34,3 +34,3 @@ "keywords": [

"dependencies": {
"intl-format-cache": "^4.2.3",
"intl-format-cache": "^4.2.5",
"intl-messageformat-parser": "^3.2.2"

@@ -57,3 +57,3 @@ },

"license": "BSD-3-Clause",
"gitHead": "cd9ad1f8d260e314b6cdb380a91ce58969b62f97"
"gitHead": "eebc5905d87538092ef0227e3f612263b51b37ae"
}

@@ -59,7 +59,13 @@ # Intl MessageFormat

const enNumPhotos = new IntlMessageFormat(MESSAGES['en-US'].NUM_PHOTOS, 'en-US');
const enNumPhotos = new IntlMessageFormat(
MESSAGES['en-US'].NUM_PHOTOS,
'en-US'
);
output = enNumPhotos.format({numPhotos: 1000});
console.log(output); // => "You have 1,000 photos."
const esNumPhotos = new IntlMessageFormat(MESSAGES['es-MX'].NUM_PHOTOS, 'es-MX');
const esNumPhotos = new IntlMessageFormat(
MESSAGES['es-MX'].NUM_PHOTOS,
'es-MX'
);
output = esNumPhotos.format({numPhotos: 1000});

@@ -192,10 +198,14 @@ console.log(output); // => "Usted tiene 1,000 fotos."

```tsx
const msg = new IntlMessageFormat('The price is: {price, number, USD}', 'en-US', {
number: {
USD: {
style: 'currency',
currency: 'USD',
const msg = new IntlMessageFormat(
'The price is: {price, number, USD}',
'en-US',
{
number: {
USD: {
style: 'currency',
currency: 'USD',
},
},
},
});
}
);

@@ -202,0 +212,0 @@ const output = msg.format({price: 100});

Sorry, the diff of this file is too big to display

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