intl-messageformat-parser
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -6,2 +6,10 @@ # Change Log | ||
## [2.1.3](https://github.com/formatjs/formatjs/compare/intl-messageformat-parser@2.1.2...intl-messageformat-parser@2.1.3) (2019-07-25) | ||
**Note:** Version bump only for package intl-messageformat-parser | ||
## [2.1.2](https://github.com/formatjs/formatjs/compare/intl-messageformat-parser@2.1.1...intl-messageformat-parser@2.1.2) (2019-07-23) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "intl-messageformat-parser", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "Parses ICU Message strings into an AST via JavaScript.", | ||
@@ -44,3 +44,3 @@ "main": "dist/index.js", | ||
"homepage": "https://github.com/formatjs/formatjs", | ||
"gitHead": "daf961b0b7325dadeaecc384e9c08ab103b66df4" | ||
"gitHead": "0a4253ccd32ac4d878b6a9ebb8777f29c0c32201" | ||
} |
@@ -16,22 +16,7 @@ # Intl MessageFormat Parser | ||
### Loading in the Browser | ||
The `dist/` folder contains the version of this package for use in the browser, and it can be loaded and used like this: | ||
```html | ||
<script src="intl-messageformat-parser/dist/parser.min.js"></script> | ||
<script> | ||
IntlMessageFormatParser.parse('...'); | ||
</script> | ||
```ts | ||
import { parse } from 'intl-messageformat-parser'; | ||
const ast = parse('this is {count, plural, one{# dog} other{# dogs}}'); | ||
``` | ||
### Loading in Node.js | ||
This package can also be `require()`-ed in Node.js: | ||
```js | ||
var parser = require('intl-messageformat-parser'); | ||
parser.parse('...'); | ||
``` | ||
### Example | ||
@@ -51,3 +36,3 @@ | ||
// Assume `msg` is the string above. | ||
parser.parse(msg); | ||
parse(msg); | ||
``` | ||
@@ -54,0 +39,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
244498
31
6385
123