Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/allnulled/recursive-api
Import (nested) files and folders to compose a Node.js tree of values (asynchronously or not).
https://github.com/allnulled/recursive-api
Last synced: 1 day ago
JSON representation
Import (nested) files and folders to compose a Node.js tree of values (asynchronously or not).
- Host: GitHub
- URL: https://github.com/allnulled/recursive-api
- Owner: allnulled
- Created: 2020-06-21T10:46:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-25T14:58:38.000Z (over 4 years ago)
- Last Synced: 2024-10-11T00:46:59.604Z (about 1 month ago)
- Language: HTML
- Homepage: https://www.npmjs.com/package/recursive-api
- Size: 75.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# recursive-api
To import modules asynchronously and based on filesystem nodes.
No dependencies at all. Less than 200 lines of code.
## Install
```
$ npm i -s recursive-api
```## Usage
```js
const moduleOne = await require("recursive-api").recursiveRequire(__dirname + "/module/one", {
contextual: "parameters"
});
```## Rules
- Every file and folder is a new property of the parent's structure.
- Every `index.js` file is used to describe the parent's structure.
- If `index.js` file is not found, any directory will be a simple `{}`.
- Every file or folder can be named in this format: `{order}.{attributes}.{id}.{extension}`# License
Okay, bitch. Do not you see that all my project are **DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE**? **WTFPL**, bitch, learn this words.