Function node_resolve::resolve [] [src]

pub fn resolve(target: String) -> Result<PathBuf, ResolutionError>

Resolve a node.js module path relative to the current working directory. Returns the absolute path to the module, or an error.

match resolve("./lib") {
    Ok(path) => println!("Path is: {:?}", path),
    Err(err) => panic!("Failed: {:?}", err),
}