Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dailyrandomphoto/read-first-file
Read the frist file from a directory.
https://github.com/dailyrandomphoto/read-first-file
Last synced: about 1 month ago
JSON representation
Read the frist file from a directory.
- Host: GitHub
- URL: https://github.com/dailyrandomphoto/read-first-file
- Owner: dailyrandomphoto
- License: mit
- Created: 2020-07-27T08:41:00.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-27T06:52:38.000Z (over 3 years ago)
- Last Synced: 2023-12-22T17:01:11.910Z (about 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# read-first-file
[![NPM Version][npm-version-image]][npm-url]
[![LICENSE][license-image]][license-url]
[![Build Status][travis-image]][travis-url]
[![code style: prettier][code-style-prettier-image]][code-style-prettier-url]Read the first file from a directory.
## Installation
```sh
npm install read-first-file
```## Usages
```js
const readfirst = require("read-first-file");readfirst("/foo/bar/", {
onFileContent: function (filename, content) {
console.log(content);
},
});
```## Related
- [a-read-files](https://github.com/dailyrandomphoto/a-read-files) - Read files from a directory.
## License
Copyright (c) 2020 [dailyrandomphoto][my-url]. Licensed under the [MIT license][license-url].
[my-url]: https://github.com/dailyrandomphoto
[npm-url]: https://www.npmjs.com/package/read-first-file
[travis-url]: https://travis-ci.org/dailyrandomphoto/read-first-file
[license-url]: LICENSE
[code-style-prettier-url]: https://github.com/prettier/prettier
[npm-downloads-image]: https://img.shields.io/npm/dm/read-first-file
[npm-version-image]: https://img.shields.io/npm/v/read-first-file
[license-image]: https://img.shields.io/npm/l/read-first-file
[travis-image]: https://img.shields.io/travis/dailyrandomphoto/read-first-file
[code-style-prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square