Unit test for latch.

Closes #12.

File                             Raw         Min         Zip     Min/Zip
index.js                   674/00.66   416/00.41   262/00.26   211/00.21