-
mothership(start, ismothership, cb)
-
Searches upwards from start for package.json files, asking for each if it is the mothership. If a mothership is found it calls back with that. If it reaches the top of the univers it calls back with nothing.
mothership result
path: full path to thepackage.jsonthat is the mother shippack: thepackage.jsonobject, same that was passed to ismothership
Parameters:
Name Type Description startstring full path at which to start looking for the mothership
ismothershipfunction invoked with the package object, needs to return true if it is the mothership
cbfunction called back with either an error or full path to package.json that is the mothership
-
mothership::sync(start, ismothership) → {string}
-
Synchronous version of mothership.
Parameters:
Name Type Description startstring full path at which to start looking for the mothership
ismothershipfunction invoked with the package object, needs to return true if it is the mothership
Returns:
full path to package.json that is the mothership or
nullif it wasn't found- Type
- string

