Skip to content

Commit 0da773d

Browse files
committed
update readme
1 parent 63b6287 commit 0da773d

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

README.md

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,32 @@ It's also a library that can be used in your projects. It contains algos that ar
88

99
## To use this package in your project
1010

11-
Using Github packages [here](https://github.com/iamwill123/collection-of-algos/pkgs/npm/collection-of-algos) (the choice for hosting this library)
11+
- npm package [here](https://www.npmjs.com/package/collection-of-algos)
1212

1313
**Installation**
1414
Open your terminal or command prompt, navigate to your project directory and run the following command:
1515

1616
```bash
1717
# using npm
18-
npm install @iamwill123/collection-of-algos@latest
18+
npm install collection-of-algos
1919

2020
# using yarn
21-
yarn add @iamwill123/collection-of-algos@latest
21+
yarn add collection-of-algos
2222
```
2323

24-
This will install version `latest` version of the package `@iamwill123/collection-of-algos`.
24+
This will install version `latest` version of the package `collection-of-algos`.
2525

2626
**Import**
27-
2827
For CommonJS (Node.js):
2928

3029
```javascript
31-
const algos = require('@iamwill123/collection-of-algos');
30+
const algos = require('collection-of-algos');
3231
```
3332

3433
For ES6 syntax:
3534

3635
```javascript
37-
import algos from '@iamwill123/collection-of-algos';
36+
import algos from 'collection-of-algos';
3837
```
3938

4039
**Usage**
@@ -46,7 +45,7 @@ algos.nativeSort();
4645
**Import specific functions**
4746

4847
```javascript
49-
import { bubbleSort, nativeSort } from '@iamwill123/collection-of-algos';
48+
import { bubbleSort, nativeSort } from 'collection-of-algos';
5049
```
5150

5251
**Usage**
@@ -87,20 +86,10 @@ console.log(arrOfObjs);
8786
// ]
8887
```
8988

90-
In this code, `bubbleSort` and `nativeSort` are specific functions imported from the `@iamwill123/collection-of-algos` package. `bubbleSort` is a sorting algorithm that's being applied to an array of numbers, while `nativeSort` is used to sort an array of objects by a specific key.
89+
In this code, `bubbleSort` and `nativeSort` are specific functions imported from the `collection-of-algos` package. `bubbleSort` is a sorting algorithm that's being applied to an array of numbers, while `nativeSort` is used to sort an array of objects by a specific key.
9190

9291
Remember, before using `await`, you should ensure that your code is inside an `async` function. The `await` operator is used to wait for a Promise. It can only be used inside an `async` function.
9392

94-
## Using from NPM [here](https://www.npmjs.com/package/collection-of-algos) (no longer supported)
95-
96-
```bash
97-
# using npm
98-
npm install collection-of-algos
99-
100-
# using yarn
101-
yarn add collection-of-algos
102-
```
103-
10493
## Work with this repo locally
10594

10695
In your terminal

0 commit comments

Comments
 (0)