Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
resolve-file
Advanced tools
Resolve an absolute file path from local directories, local node_modules or global node_modules.
Resolve an absolute file path from local directories, local node_modules or global node_modules.
Install with npm:
$ npm install --save resolve-file
var resolveFile = require('resolve-file');
Resolve the path to a file located in one of the following places:
'./index.js'
)'/usr/something.rc'
)'cwd'
)'cwd/LICENSE'
)'~/.npmrc'
)Params
name
{String}: Filename to resolveoptions
{Object}: Additional options to specify cwd
returns
{String}: Resolved filepath
if foundExample
var fp = resolve('./index.js')
//=> /path/to/resolve-file/index.js
Resolve the path to a file located in one of the following places:
'./index.js'
)'/usr/something.rc'
)'cwd'
)'cwd/LICENSE'
)'~/.npmrc'
)Params
name
{String}: Filename to resolveoptions
{Object}: Additional options to specify cwd
returns
{Object}: File object with resolved path
if found.Example
var file = resolve.file('./index.js')
//=> {
//=> cwd: '/path/to/resolve-file',
//=> path: '/path/to/resolve-file/index.js'
//=> }
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
$ npm install -g verb verb-generate-readme && verb
Install dev dependencies:
$ npm install -d && npm test
Brian Woodward
Copyright © 2016, Brian Woodward. Released under the MIT license.
This file was generated by verb, v0.9.0, on August 17, 2016.
FAQs
Resolve an absolute file path from local directories, local node_modules or global node_modules.
The npm package resolve-file receives a total of 40,864 weekly downloads. As such, resolve-file popularity was classified as popular.
We found that resolve-file demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.