SlexAxton/messageformat.js — pull request #37 by eemeli (2014-02-10 17:21:01+00:00)
Title: Add support for empty string as select key

This makes the following work: `The key is {KEY, select, ''{missing!} other{this: {KEY}}}`

It adds `''` (two single quotes) as a special `stringKey` that matches an empty string. Included are two new tests that show how it works.

The particular expression that inspired this for me was the following, which required separately generating `GOT_*` booleans for each case:

```
Listing { N, plural, one { one item } other { # items } }
{ GOT_DAY, select, true { on {DAY} } other {} }
{ GOT_AREA, select, true { in {AREA} } other {} }
{ GOT_Q, select, true { matching the query {Q} } other {} }
```

which I could now rewrite as follows:

```
Listing { N, plural, one { one item} other { # items } }
{ DAY, select, ''{} other { on {DAY} } }
{ AREA, select, ''{} other { in {AREA} } }
{ Q, select, ''{} other { matching the query {Q} } }
```