Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
bun-config
Advanced tools
bun install -d bun-config
If you are building any sort of Bun project, you can use the loadConfig
function to load your configuration.
import type { Config } from 'bun-config'
import { loadConfig } from 'bun-config'
interface MyLibraryConfig {
port: number
host: string
}
const options: Config<MyLibraryConfig> = {
name: 'my-app', // required
cwd: './', // default: process.cwd()
defaults: { // default: {}
port: 3000,
host: 'localhost',
},
}
const resolvedConfig = await loadConfig(options)
console.log(resolvedConfig) // { port: 3000, host: 'localhost' }, unless a config file is found
[!TIP] If your process.cwd() includes a
$name.config.{ts,js,mjs,cjs}
file, it will be loaded and merged with the defaults, with file config file values taking precedence.
bun test
Please see our releases page for more information on what has changed recently.
Please review the Contributing Guide for details.
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
For casual chit-chat with others using this package:
Join the Stacks Discord Server
Two things are true: Stacks OSS will always stay open-source, and we do love to receive postcards from wherever Stacks is used! 🌍 We also publish them on our website. And thank you, Spatie
Our address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094
We would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us.
The MIT License (MIT). Please see LICENSE for more information.
Made with 💙
FAQs
A smart & fully-typed configuration loader for Bun.
The npm package bun-config receives a total of 30 weekly downloads. As such, bun-config popularity was classified as not popular.
We found that bun-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.