Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

find-up

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-up - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

9

index.js

@@ -11,3 +11,4 @@ 'use strict';

function join(parts, filename) {
return parts.join(path.sep) + path.sep + filename;
var base = parts.join(path.sep);
return base ? (base + path.sep + filename) : filename;
}

@@ -27,6 +28,6 @@

resolve(fp);
} else if (!parts.pop()) {
} else if (parts.pop()) {
find();
} else {
resolve(null);
} else {
find();
}

@@ -33,0 +34,0 @@ });

{
"name": "find-up",
"version": "1.1.0",
"version": "1.1.1",
"description": "Find a file by walking up parent directories",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -28,5 +28,5 @@ # find-up [![Build Status](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up)

// example.js
var findUp = require('find-up');
const findUp = require('find-up');
findUp('unicorn.png').then(function (filepath) {
findUp('unicorn.png').then(filepath => {
console.log(filepath);

@@ -42,3 +42,3 @@ //=> '/Users/sindresorhus/unicorn.png'

Returns a promise that resolves to a filepath or `null`.
Returns a promise for the filepath or `null`.

@@ -69,3 +69,3 @@ ### findUp.sync(filename, [options])

- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file
- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of a npm package
- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package

@@ -72,0 +72,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc