Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Document constructor#119

Merged
ralphtheninja merged 4 commits intomasterfrom
api-docs
May 27, 2018
Merged

Document constructor#119
ralphtheninja merged 4 commits intomasterfrom
api-docs

Conversation

@ralphtheninja
Copy link
Copy Markdown
Member

Closes #103

@ralphtheninja ralphtheninja requested a review from vweevers May 27, 2018 12:31
Comment thread README.md Outdated
## API

### `db = leveljs(location[, options])`
Returns a new `leveljs` instance. `location` is a String pointing to the IndexedDB location to be opened.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-`location` is a String pointing to the IndexedDB location to be opened
+`location` is the string name of the IndexedDB object store to be opened

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, that's not quite it either. It also controls the IndexedDB database name.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vweevers Think about it for a bit. I'll do other stuff meanwhile.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about: location is the string name of the IDBDatabase to be opened, as well as the object store within that database. The database name will be prefixed with options.prefix.

Comment thread README.md Outdated

The optional `options` argument may contain:

* `prefix` *(string, default: `'level-js-'`)*: Prepended to the location for the underlying IndexedDB store.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here we can say: "Prefix for IDBDatabase name"

@ralphtheninja ralphtheninja merged commit ee3a41b into master May 27, 2018
@ralphtheninja ralphtheninja deleted the api-docs branch May 27, 2018 13:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants