Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs #141

Merged
merged 12 commits into from
Jun 15, 2018
22 changes: 22 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Contributors

| Name | GitHub | Social |
| ----------------------- | ------------------------------------------------------ | --------------------------------------------------------------- |
| **Vincent Weevers** | [**@vweevers**](https://github.com/vweevers) | [**@vweevers@twitter**](https://twitter.com/vweevers) |
| **Max Ogden** | [**@maxogden**](https://github.com/maxogden) | [**@maxogden@twitter**](https://twitter.com/maxogden) |
| **Lars-Magnus Skog** | [**@ralphtheninja**](https://github.com/ralphtheninja) | [**@ralph@social.weho.st**](https://social.weho.st/@ralph) |
| **Rod Vagg** | [**@rvagg**](https://github.com/rvagg) | [**@rvagg@twitter**](https://twitter.com/rvagg) |
| **Nolan Lawson** | [**@nolanlawson**](https://github.com/nolanlawson) | [**@nolan@toot.cafe**](https://toot.cafe/@nolan) |
| **Josh** | [**@qs44**](https://github.com/qs44) | |
| **Julian Gruber** | [**@juliangruber**](https://github.com/juliangruber) | [**@juliangruber@twitter**](https://twitter.com/juliangruber) |
| **Dominic Tarr** | [**@dominictarr**](https://github.com/dominictarr) | [**@dominictarr@twitter**](https://twitter.com/dominictarr) |
| **Matteo Collina** | [**@mcollina**](https://github.com/mcollina) | [**@matteocollina@twitter**](https://twitter.com/matteocollina) |
| **Kyle Robinson Young** | [**@shama**](https://github.com/shama) | [**@shamakry@twitter**](https://twitter.com/shamakry) |
| **Mathias Buus** | [**@mafintosh**](https://github.com/mafintosh) | [**@mafintosh@twitter**](https://twitter.com/mafintosh) |
| **James Halliday** | [**@substack**](https://github.com/substack) | [**@substack@twitter**](https://twitter.com/substack) |
| **Ryan Ramage** | [**@ryanramage**](https://github.com/ryanramage) | |
| **James Kyburz** | [**@jameskyburz**](https://github.com/jameskyburz) | [**@jameskyburz@twitter**](https://twitter.com/jameskyburz) |
| **Yoshua Wuyts** | [**@yoshuawuyts**](https://github.com/yoshuawuyts) | [**@yoshuawuyts@twitter**](https://twitter.com/yoshuawuyts) |
| **Calvin Metcalf** | [**@calvinmetcalf**](https://github.com/calvinmetcalf) | |
| **Nicholas Westlake** | [**@nrw**](https://github.com/nrw) | |
| **Bryce Baril** | [**@brycebaril**](https://github.com/brycebaril) | [**@brycebaril@twitter**](https://twitter.com/brycebaril) |
Copy link
Member

Choose a reason for hiding this comment

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

@vweevers Now we're getting somewhere. Looks really nice!

4 changes: 1 addition & 3 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# The MIT License (MIT)

## Copyright (c) 2012-2018 `level-js` contributors

*`level-js` contributors listed at <https://github.com/level/community#contributors>*
**Copyright © 2012-present [Max Ogden](https://github.com/maxogden) and [Contributors](./CONTRIBUTORS.md).**

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@

Here are the goals of `level-js`:

- Store large amounts of data in modern browsers
- Pass the full `abstract-leveldown` test suite
- Support [Buffer](https://nodejs.org/api/buffer.html) values (in all target environments)
- Support all key types of IndexedDB Second Edition, including binary keys (depends on environment)
- Support all value types of the structured clone algorithm (depends on environment) except for `null` and `undefined`
- Be as fast as possible
- Sync with [multilevel](https://github.com/juliangruber/multilevel) over either ASCII or binary transports.
- Store large amounts of data in modern browsers
- Pass the full `abstract-leveldown` test suite
- Support [Buffer](https://nodejs.org/api/buffer.html) values (in all target environments)
- Support all key types of IndexedDB Second Edition, including binary keys (depends on environment)
- Support all value types of the structured clone algorithm (depends on environment) except for `null` and `undefined`
- Be as fast as possible
- Sync with [multilevel](https://github.com/juliangruber/multilevel) over either ASCII or binary transports.

Being `abstract-leveldown` compliant means you can use many of the [Level modules](https://github.com/Level/awesome/) on top of this library. For some demos of it working, see @brycebaril's presentation [Path of the NodeBases Jedi](http://brycebaril.github.io/nodebase_jedi/#/vanilla).

Expand Down Expand Up @@ -61,14 +61,15 @@ This library is best used with [browserify](http://browserify.org).
## API

### `db = leveljs(location[, options])`

Returns a new `leveljs` instance. `location` is the string name of the [`IDBDatabase`](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase) to be opened, as well as the object store within that database. The database name will be prefixed with `options.prefix`.

#### `options`

The optional `options` argument may contain:

* `prefix` *(string, default: `'level-js-'`)*: Prefix for `IDBDatabase` name.
* `version` *(string | number, default: `1`)*: The version to open the database with.
- `prefix` _(string, default: `'level-js-'`)_: Prefix for `IDBDatabase` name.
- `version` _(string | number, default: `1`)_: The version to open the database with.

See [`IDBFactory#open`](https://developer.mozilla.org/en-US/docs/Web/API/IDBFactory/open) for more details.

Expand All @@ -91,8 +92,6 @@ Cross-browser Testing Platform and Open Source ♥ Provided by [Sauce Labs](http

## License

Copyright (c) 2012-present `level-js` [contributors](https://github.com/level/community#contributors).

`level-js` is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included `LICENSE.md` file for more details.
[MIT](./LICENSE.md) © 2012-present [Max Ogden](https://github.com/maxogden) and [Contributors](./CONTRIBUTORS.md).

[level-badge]: http://leveldb.org/img/badge.svg
10 changes: 0 additions & 10 deletions collaborators.md

This file was deleted.

59 changes: 35 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
{
"name": "level-js",
"version": "3.0.0-rc1",
"description": "leveldown/leveldb library for browsers using IndexedDB",
"description": "An abstract-leveldown compliant store on top of IndexedDB",
"author": "max ogden",
"license": "MIT",
"main": "index.js",
"scripts": {
"test": "standard && airtap --local --no-coverage test/index.js",
"test-browsers": "standard && airtap --sauce-connect --loopback airtap.local --no-coverage test/index.js"
"test-browsers": "standard && airtap --sauce-connect --loopback airtap.local --no-coverage test/index.js",
"remark": "remark README.md CONTRIBUTORS.md -o"
Copy link
Member

Choose a reason for hiding this comment

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

How does remark know how each file should be processed and which plugin to apply to which output? CONTRIBUTORS.md is completely generated, right? Just curious about the algorithm of this command, in which order things are done etc.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's pretty much the same as doing remark README.md && remark CONTRIBUTORS.md. It'll use the same configuration, same list of plugins, but it creates a new processor (and plugin "instances") for each file.

Copy link
Member Author

Choose a reason for hiding this comment

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

If you're wondering why remark-git-contributors doesn't modify README.md: because README.md doesn't have a # Contributors heading.

Copy link
Member

@ralphtheninja ralphtheninja Jun 12, 2018

Choose a reason for hiding this comment

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

Aah ok. So I guess this means CONTRIBUTORS.md has to exist and have an empty # Contributors section at the very least.

},
"files": [
"index.js",
"iterator.js",
"util",
"collaborators.md",
"CONTRIBUTORS.md",
"CHANGELOG.md",
"sauce-labs.svg"
],
"repository": {
"type": "git",
"url": "git@github.com:Level/level-js.git"
"browser": {
"./util/immediate.js": "./util/immediate-browser.js"
},
"keywords": [
"level",
"leveldb"
],
"author": "max ogden",
"license": "MIT",
"devDependencies": {
"airtap": "0.0.7",
"buffer": "~5.1.0",
"standard": "^11.0.1",
"tape": "^4.0.0"
"standard": {
"ignore": [
"test/util/idb-shim.js"
]
},
"dependencies": {
"abstract-leveldown": "~5.0.0",
Expand All @@ -38,12 +33,28 @@
"ltgt": "^2.1.2",
"typedarray-to-buffer": "~3.1.5"
},
"browser": {
"./util/immediate.js": "./util/immediate-browser.js"
"devDependencies": {
"airtap": "0.0.7",
"buffer": "~5.1.0",
"level-community": "~3.0.0",
"remark-cli": "^5.0.0",
"remark-git-contributors": "~0.2.0",
"standard": "^11.0.1",
"tape": "^4.0.0"
},
"standard": {
"ignore": [
"test/util/idb-shim.js"
]
}
"remarkConfig": {
"plugins": {
"remark-git-contributors": "level-community"
}
},
"repository": {
"type": "git",
"url": "git@github.com:Level/level-js.git"
},
"keywords": [
"level",
"leveldb",
"indexeddb",
"abstract-leveldown"
]
}