Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var dbUtil = require('levelup/lib/util')
, toEncoding = dbUtil.toEncoding
, toSlice = dbUtil.toSlice
, Stream = require('stream')
, deepEquals = require('deep-equal')
, bytewise = require('byteup')()
, sublevel = require('level-sublevel')
, livestream = require('level-live-stream')
, uid = require('./uid')
, _ = require('underscore');
module.exports = function (db) {
db.options.keyEncoding = 'bytewise';
db.options.valueEncoding = 'json';
db.urlPut = urlPut.bind(null, db);
db.urlGet = urlGet.bind(null, db);
db.urlPush = urlPush.bind(null, db);