## A CRUD JavaScript class with localStorage persistance

BETTER VERSION AT: https://codepen.io/HugoGiraudel/pen/afxki

Any comment welcome!

### Instanciating a new database

    var db = new Database({
      name: 'MyDatabase',
      uniqueKey: 'id'
    })

    var obj = {
      'id': '1337',
      'name': 'John Doe',
      'email': 'john@doe.com'
    }

### Inserting a new entry

    db.insert(obj)

### Retrieving an entry

    db.find(1337)

### Selecting all entries

    db.findAll()
    db.findAll(3) // 3 first

### Updating an entry

    obj['age'] = 42
    db.update(obj)

### Deleting an entry

    db.delete(obj)  // whole object
    db.delete(1337) // unique key

### Dropping database

    db.drop()