From 2c044b9c1d99e821303fca2b7478c739cb4ee952 Mon Sep 17 00:00:00 2001 From: Lars-Magnus Skog Date: Wed, 13 Dec 2017 21:35:44 +0100 Subject: [PATCH 1/2] update README style --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 896b4af..4ffdbe1 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,12 @@ - # level-errors -LevelDB Logo - -> Error module for [LevelUP](https://github.com/rvagg/node-levelup) +> Error module for [levelup][levelup] +[![level badge][level-badge]](https://github.com/level/awesome) [![Build Status](https://travis-ci.org/Level/errors.png)](https://travis-ci.org/Level/errors) +[![dependencies](https://david-dm.org/Level/level.svg)](https://david-dm.org/level/level) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) -[![Greenkeeper badge](https://badges.greenkeeper.io/Level/errors.svg)](https://greenkeeper.io/) +[![npm](https://img.shields.io/npm/dm/level-errors.svg)](https://www.npmjs.com/package/level-errors) ## Usage @@ -67,3 +66,6 @@ levelup('./db', { createIfMissing: false }, function (err, db) { Copyright (c) 2012-2017 LevelUP contributors. LevelUP 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. + +[level-badge]: http://leveldb.org/img/badge.svg +[levelup]: https://github.com/level/levelup From 85fc4ca3758979c1197f0b0175af1d477b07487d Mon Sep 17 00:00:00 2001 From: Lars-Magnus Skog Date: Wed, 13 Dec 2017 21:38:27 +0100 Subject: [PATCH 2/2] usage moved to level --- README.md | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/README.md b/README.md index 4ffdbe1..e288fe6 100644 --- a/README.md +++ b/README.md @@ -3,24 +3,11 @@ > Error module for [levelup][levelup] [![level badge][level-badge]](https://github.com/level/awesome) -[![Build Status](https://travis-ci.org/Level/errors.png)](https://travis-ci.org/Level/errors) +[![Build Status](https://travis-ci.org/Level/errors.svg)](https://travis-ci.org/Level/errors) [![dependencies](https://david-dm.org/Level/level.svg)](https://david-dm.org/level/level) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![npm](https://img.shields.io/npm/dm/level-errors.svg)](https://www.npmjs.com/package/level-errors) -## Usage - -```js -const levelup = require('levelup') -const errors = levelup.errors - -levelup('./db', { createIfMissing: false }, function (err, db) { - if (err instanceof errors.OpenError) { - console.log('open failed because expected db to exist') - } -}) -``` - ## API ### .LevelUPError()