1.0.1 • Published 9 years ago

commondir v1.0.1

Weekly downloads
13,000,568
License
MIT
Repository
-
Last release
9 years ago

commondir

compute the closest common parent directory among an array of directories

example

var commondir = require('commondir');
var dir = commondir(process.argv.slice(2))
console.log(dir);

output:

$ node dir.js /x/y/z /x/y /x/y/w/q
/x/y
$ node ../baz ../../foo/quux ./bizzy
/foo

methods

var commondir = require('commondir');

commondir(absolutePaths)

Compute the closest common parent directory for an array absolutePaths.

commondir(basedir, relativePaths)

Compute the closest common parent directory for an array relativePaths which will be resolved for each dir in relativePaths according to: path.resolve(basedir, dir).

install

With npm do:

npm install commondir

license

MIT

web-desktop-helperarchetype-libraryeasy-select-rnvuedragdropuploadimagespopsmart-common-authreact-native-bluetooth2killi8n-react-native-fast-image@bzafiris/madgern-send-sms@arisageha/react-lazyload@arisageha/react-lazyload-fixreact-native-template-rfbaseairscanairscan-examplebb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxfdeneme323112@texttree/demo-bsa-reference-rcl@fundefund/funde_ck@ntt_app/react-native-custom-notificationreact-native-custom-text-hwjamesreact-native-covid-sdkgql_din_modalex-frontend-sdk-stagingafryxiconsreact-native-thanh-toast-library@thanhnguyen14797/react-native-thanh-toast-library@l1nyanm1ng/react-picture-viewer@saeon/ol-reactcthpb-plugin-social@olivervorasai/sliderreact-native-printer-brothersrn-pdf-reader-offlinecbmis-ai-toolboxreact-native-shekhar-bridge-testasterjscogoportutilswilscanner@oiti/documentoscopy-react-nativejs4cytoscapequoc-testreact-native-slider-kf@infinitebrahmanuniverse/nolb-commond@saaspe/componentshyperpass-sdkoptimus-dcexpand-react-bridgeopea-bootstraapluminos-ui-coresklif-ui-kitsklif-api@everything-registry/sub-chunk-1363jawwy-sdkjawwy_gamification_releasereact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgcomponent-library-starter-packp149-tabletest-popupssklif-uireact-native-jawwy_sample@geeky-apo/react-native-advanced-clipboardlint-trapkafirchain-tetrislitepie-datepicker-gabehelp-widgethotlanghot-zone-vuekirin-buildkhaled-salem-custom-componentsktortestzsoltbleadengageimage-storiesjesusdemojordy-frijters-test-liblogin_module_ccloopback-bootloopback-bootnextmoonwalkerswap-default-token-listsnode-module-loaderng-search-dropdownnka-gantt-task-reactnn-input-fieldsmoduleboxmocha-helpersmobi-loopback-bootmicroend-componentmj4d-excalidraw-originalmiracle-webpack-tree-shakinghello_test_my_webpackjulien-easy-modaljrennsoh88-react-native-scroll-indicatorjs-file-moverjsmonkeyicons-vue-testid-holiday-datepicker
1.0.1

9 years ago

1.0.0

9 years ago

0.0.2

9 years ago

0.0.1

12 years ago

0.0.0

13 years ago