Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jesselpalmer/jalgo
Algorithms in JavaScript
https://github.com/jesselpalmer/jalgo
algorithms computer-science cs cs-algorithms
Last synced: 11 days ago
JSON representation
Algorithms in JavaScript
- Host: GitHub
- URL: https://github.com/jesselpalmer/jalgo
- Owner: jesselpalmer
- License: mit
- Created: 2017-06-17T18:58:20.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-03-01T13:57:22.000Z (over 1 year ago)
- Last Synced: 2024-10-12T04:23:35.142Z (25 days ago)
- Topics: algorithms, computer-science, cs, cs-algorithms
- Language: JavaScript
- Homepage:
- Size: 1.5 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
![jalgo action](https://github.com/jesselpalmer/jalgo/workflows/jalgo%20action/badge.svg)
[![codecov](https://codecov.io/gh/jesselpalmer/jalgo/branch/master/graph/badge.svg)](https://codecov.io/gh/jesselpalmer/jalgo)# jalgo
Algorithms in JavaScript
## Installation
```
npm install cs.js
```## Usage
The only data structure that is available right now is `Stack`. Avaiable methods are `clear()`, `isEmpty()`, `peek()`, `push()`, `size()`, `toString()`. More will added in time.
```javascript
// es5
const Stack = require('cs.js');// es6
import Stack from 'cs.js';const stack = new Stack();
stack.isEmpty(); // will return true
```## Tests
```
npm test
```## Contributing
Pull requests are welcome! Please make sure that any new or changed functionality need to have unit tests accompanied with the PR. Make sure that you lint (`npm run lint`) and test your code (`npm test`).