brianreavis / sifter.js

A library for textually searching arrays and hashes of objects by property (or multiple properties). Designed specifically for autocomplete.
1.09k stars 125 forks source link

Change microtime to be optional dependency with fallback to milliseconds #28

Closed gionkunz closed 9 years ago

gionkunz commented 9 years ago

Hi there. As the microtime dependency is cause a lot of troubles on systems where Python is not installed, and the fact that it's only used to show more accurate timings, it should be made an optional dependency. In the PR the require is surrounded with a try catch block and a fallback to regular milliseconds (with Date) is used.