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.
Find a file or directory by walking up parent directories recursively. Zero dependency.
Find a file or directory by walking up parent directories recursively. Zero dependency.
npm install look-it-up
import { existsSync } from 'fs'
import { join } from 'path'
import { lookItUp, lookItUpSync, exists } from 'look-it-up'
const contains = async (file, dir) => (await exists(join(dir, file))) ? dir : null
const containsSync = (file, dir) => existsSync(join(dir, file) ? dir : null
;(async () => {
await lookItUp('.zshrc') //=> '~/.zshrc'
await lookItUp(dir => containsSync('.zshrc', dir)) //=> '~'
await lookItUp(async dir => await contains('.zshrc', dir)) //=> '~'
})()
lookItUpSync('.zshrc') //=> '~/.zshrc'
lookItUpSync(dir => containsSync('.zshrc', dir)) //=> '~'
declare type MatcherResult = string | null | symbol
declare type Matcher = string | ((dir: string) => MatcherResult | Promise<MatcherResult>)
declare type MatcherSync = string | ((dir: string) => MatcherResult)
declare const lookItUp: (matcher: Matcher, dir?: string) => Promise<string | null>
declare const lookItUpSync: (matcher: MatcherSync, dir?: string) => string | null | never
declare const exists: (path: string) => Promise<boolean>
declare const stop: unique symbol
export { exists, lookItUp, lookItUpSync, stop }
MIT License © 2021 Exuanbo
2.1.0 (2021-12-05)
exists
.sideEffects: false
to package.json
.FAQs
Find a file or directory by walking up parent directories recursively. Zero dependency.
The npm package look-it-up receives a total of 82,984 weekly downloads. As such, look-it-up popularity was classified as popular.
We found that look-it-up demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.