fined

WebJar for fined

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

fined
Last Version

Last Version

1.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

fined
WebJar for fined
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/gulpjs/fined

Download fined

How to add to project

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

Dependencies

compile (5)

Group / Artifact Type Version
org.webjars.npm : object.defaults jar [1.1.0,2)
org.webjars.npm : object.pick jar [1.2.0,2)
org.webjars.npm : parse-filepath jar [1.0.1,2)
org.webjars.npm : is-plain-object jar [2.0.3,3)
org.webjars.npm : expand-tilde jar [2.0.2,3)

Project Modules

There are no modules declared in this project.

fined

NPM version Downloads Azure Pipelines Build Status Travis Build Status AppVeyor Build Status Coveralls Status Gitter chat

Find a file given a declaration of locations.

Usage

var fined = require('fined');

fined({ path: 'path/to/file', extensions: ['.js', '.json'] });
// => { path: '/absolute/path/to/file.js', extension: '.js' }  (if file exists)
// => null  (if file does not exist)

var opts = {
  name: '.app',
  cwd: '.',
  extensions: {
    'rc': 'default-rc-loader',
    '.yml': 'default-yml-loader',
  },
};

fined({ path: '.' }, opts);
// => { path: '/absolute/of/cwd/.app.yml', extension: { '.yml': 'default-yml-loader' } }

fined({ path: '~', extensions: { 'rc': 'some-special-rc-loader' } }, opts);
// => { path: '/User/home/.apprc', extension: { 'rc': 'some-special-rc-loader' } }

API

fined(pathObj, opts) => object | null

Arguments:

  • pathObj [string | object] : a path setting for finding a file.

  • opts [object] : a plain object supplements pathObj.

    pathObj and opts can have same properties:

    • path [string] : a path string.
    • name [string] : a basename.
    • extensions: [string | array | object] : extensions.
    • cwd: a base directory of path and for finding up.
    • findUp: [boolean] : a flag to find up.

Return:

This function returns a plain object which consists of following properties if a file exists otherwise null.

  • path : an absolute path
  • extension : a string or a plain object of extension.

License

MIT

org.webjars.npm

gulp

A toolkit to automate & enhance your workflow

Versions

Version
1.2.0
1.1.1
1.1.0