Each layer you add can expose new functionality or modify functionality of inner layers, or you can bypass the layers by using the inner unmodified layers.

WARNING This is currently experimental, and primarily a proof-of-concept. There are no guarantees that this will be a best practice for working with levelup, or be adopted by any significant portion of the levelup ecosystem.

Pros: Simple & low impact.

Cons: I'm not exactly thrilled with the convention it requires wrapping modules to comply with.

Example: case-insensitive keys:

Create a wrapping layer:

functionUpper(){

// Required

this.type="upper"

// Default false, if true it will prevent you from double-wrapping with this wrapper.

this.unique =false

}

// Requires an install method that takes the wrapped db and the parent it is wrapping