# dssrv-use

> Require files, modules and directories too.

Latest version **0.0.4** (published 2016-10-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install dssrv-use
pnpm add dssrv-use
yarn add dssrv-use
bun add dssrv-use
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2016-10-19 |
| First published | 2016-10-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8.21 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Halász Ádám |
| Maintainers | frank-dspeed |
| Keywords | require, use, require directories, include, include files, require files, incude directories, folder require |

## Links

- npm: https://www.npmjs.com/package/dssrv-use
- Repository: https://github.com/dssrv/use
- Homepage: https://github.com/dssrv/use#readme
- Issues: http://github.com/adamhalasz/diet-use/issues
- npm.io page: https://npm.io/package/dssrv-use

## Alternatives

- [adhdev](https://npm.io/package/adhdev.md) — 11.1K weekly downloads
- [react-slide-button](https://npm.io/package/react-slide-button.md) — 310 weekly downloads
- [better](https://npm.io/package/better.md) — 42 weekly downloads
- [react-native-swipe-image](https://npm.io/package/react-native-swipe-image.md) — 22 weekly downloads
- [nl.fokkezb.pulltorefresh](https://npm.io/package/nl.fokkezb.pulltorefresh.md) — 11 weekly downloads

## Recent versions

- 0.0.4 (latest) — 2016-10-19

## README

# Use
Require files, modules and directories too

### Install
```
npm install dssrv-use
```

### Require
- **files**: `use('/path/to/file.js')` - this includes a single file
- **modules**: `use('/path/to/module')` - this includes a default or a custom module
- **directories**: `use('/path/to/directory')` - This includes all `.js` files in a directory
- **AutoInstallIfmissing**: `use('/path/to/directory', install)` - This includes all `.js` files in a directory and Installs missing modules also it will accept install to be a callback or function.
	
### 


### How does module requireing work?
It will traverse up from the current directory to search for a module in a `node_modules` folder until it finds it. If no modules match it will try to inlcude the directory.

### Example
```javascript
// file structure
- root
	- node_modules
		- matrix
	- project
		- server.js
```

```javascript
// in server.js
use('matrix');
```

---
_Source: https://npm.io/package/dssrv-use · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
