Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

git-autoregister-odb

1.0.0 • Public • Published

git-autoregister-odb

given fs, dir, a method for finding objects by sha, and a list of potential backends, automatically load the backends that apply to this directory.

var odb = {}
  , fs = require('fs')
  , path = require('path')
  , autoregister = require('git-autoregister-odb')
 
var loose = require('git-odb-loose')
  , pack = require('git-odb-pack')
 
autoregister(fs, path.join(__dirname, '.git'), find, [
  loose, pack
], ready)
 
function ready(err, backends) {
  odb.backends = backends
}
 
function find(oid, ready) {
  //
}

API

autoregister(fs, directory, findSha, candidate list, ready)

License

MIT

install

npm i git-autoregister-odb

Downloadsweekly downloads

20

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability