stevendesu / jsindex

1 stars 0 forks source link

Array.load() did not default to synchronous #1

Closed stevendesu closed 5 years ago

stevendesu commented 5 years ago

When possibly I prefer to work with synchronous code (until performance has become an issue) to keep things easy to understand and debug.

For this reason, Array.load() should default to be synchronous and return a collection. Instead, when I tried using jsindex on a project today, it returned a promise. I had to call Array.load(data, {sync: true}) to get synchronous behavior.

As this is technically an API-breaking change (someone using my library may depend on the default behavior of returning a Promise) I'll bump the version number to 0.2.0 when I fix this