common-dir

WebJar for common-dir

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

common-dir
Last Version

Last Version

2.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

common-dir
WebJar for common-dir
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/75lb/common-dir

Download common-dir

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/common-dir/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>common-dir</artifactId>
    <version>2.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/common-dir/
implementation 'org.webjars.npm:common-dir:2.0.2'
// https://jarcasting.com/artifacts/org.webjars.npm/common-dir/
implementation ("org.webjars.npm:common-dir:2.0.2")
'org.webjars.npm:common-dir:jar:2.0.2'
<dependency org="org.webjars.npm" name="common-dir" rev="2.0.2">
  <artifact name="common-dir" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='common-dir', version='2.0.2')
)
libraryDependencies += "org.webjars.npm" % "common-dir" % "2.0.2"
[org.webjars.npm/common-dir "2.0.2"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm » common-sequence jar [1.0.2,2)

Project Modules

There are no modules declared in this project.

view on npm npm module downloads Build Status Dependency Status js-standard-style

common-dir

commonDir(files) ⇒ string

Returns the parent directory common to each path.

Kind: Exported function
Returns: string - A single path ending with the path separator, e.g. '/user/some/folder/'

Param Type Description
files Array An array of file paths to inspect

Example

> const commonDir = require('common-dir')
> files = [
  '/Users/75lb/one/package.json',
  '/Users/75lb/one/test',
  '/Users/75lb/two/test/main.js'
]
> commonDir(files)
'/Users/75lb/'

© 2014-19 Lloyd Brookes [email protected]. Documented by jsdoc-to-markdown.

Versions

Version
2.0.2