Skip to content

Commit 1b459f5

Browse files
committed
📝 Add README
1 parent a9d8632 commit 1b459f5

File tree

4 files changed

+62
-0
lines changed

4 files changed

+62
-0
lines changed

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# MIT License
2+
3+
Copyright (c) 2021 Eliaz Bobadilla
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Fibonacci
2+
3+
[![GitMoji](https://img.shields.io/badge/Gitmoji-%F0%9F%8E%A8%20-FFDD67.svg)](https://gitmoji.dev)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5+
![Lines Of Code](https://img.shields.io/tokei/lines/github.com/UltiRequiem/fibonacci-deno?color=blue&label=Total%20Lines)
6+
![CodeQL](https://github.com/UltiRequiem/fibonacci-deno/workflows/CodeQL/badge.svg)
7+
8+
Port of [fibonacci-go](https://github.com/UltiRequiem/fibonacci) for [Deno](https://deno.land).
9+
10+
> Utilities for the Fibonacci Number and Sequence
11+
12+
## Usage
13+
14+
```typescript
15+
16+
```
17+
18+
### CLI Tool
19+
20+
This project contains a cli tool, it is made to give an example of use mainly.
21+
22+
Install it:
23+
24+
```bash
25+
deno install
26+
```
27+
28+
For more info check [this](https://deno.land/manual/tools/script_installer).
29+
30+
### License
31+
32+
[This package](https://deno.land/x/fibonacci) is licensed under the [MIT License](./LICENSE.md).

cli.ts

+9
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ import { fibonacci, fibonacciSequence } from "./mod.ts";
55
function Exec() {
66
const { number, sequence } = parse(Deno.args);
77

8+
if (!number && !sequence) {
9+
const help = `Options:
10+
--number Print the Nth Fibonacci Number
11+
--sequence Print an array with the first N numbers in the Fibonacci sequence`;
12+
13+
console.log(help);
14+
return;
15+
}
16+
817
if (number && sequence) {
918
console.log("You can't use number and sequence flag at the same time!");
1019
return;

example.ts

Whitespace-only changes.

0 commit comments

Comments
 (0)