https://github.com/TKSS-Software/rodash
Lodash inspired Brightscript/ROPM utility for Roku apps
https://github.com/TKSS-Software/rodash
brightscript roku roku-development
Last synced: 7 months ago
JSON representation
Lodash inspired Brightscript/ROPM utility for Roku apps
- Host: GitHub
- URL: https://github.com/TKSS-Software/rodash
- Owner: TKSS-Software
- License: mit
- Created: 2021-03-08T18:51:42.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T00:13:33.000Z (over 1 year ago)
- Last Synced: 2024-10-24T14:12:46.505Z (over 1 year ago)
- Topics: brightscript, roku, roku-development
- Language: BrighterScript
- Homepage:
- Size: 1.56 MB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://github.com/TKSS-Software/rodash/actions?query=branch%3Amaster+workflow%3Abuild)
[](https://npmcharts.com/compare/@tkss/rodash?minimal=true)
[](https://www.npmjs.com/package/@tkss/rodash)
[](LICENSE)
[](https://join.slack.com/t/rokudevelopers/shared_invite/zt-4vw7rg6v-NH46oY7hTktpRIBM_zGvwA)
---
Rodash is a [Lodash](https://lodash.com/docs/4.17.15) inspired [Brightscript](https://developer.roku.com/en-ca/docs/references/brightscript/language/brightscript-language-reference.md)/[ROPM](https://www.npmjs.com/package/ropm) utility for Roku apps. Currently supporting over 200 utility functions!
_This project is not affiliated with Lodash or the Tubitv/rodash project._
---
## Installation
### Using [ropm](https://www.npmjs.com/package/ropm)
```bash
ropm install rodash@npm:@tkss/rodash
```
## API Documentation (In Progress)
[https://tkss-software.github.io/rodash/index.html](https://tkss-software.github.io/rodash/index.html)
## Usage Examples
### Chunk
#### Brightscript
```brightscript
rodash_chunk(["a", "b", "c", "d"], 2)
```
#### Brighterscript
```brighterscript
rodash.chunk(["a", "b", "c", "d"], 2)
```
Returns: `[["a", "b"], ["c", "d"]]`
### Compact
#### Brightscript
```brightscript
rodash_compact([0, 1, false, 2, "", 3])
```
#### Brighterscript
```brighterscript
rodash.compact([0, 1, false, 2, "", 3])
```
Returns: `[1, 2, 3]`
### Shuffle & Slice
#### Brightscript
```brightscript
rodash_slice(rodash_shuffle([1,2,3,4,5,6,7,8,9,10]), 0, 4)
```
#### Brighterscript
```brighterscript
rodash.slice(rodash.shuffle([1,2,3,4,5,6,7,8,9,10]), 0, 4)
```
Returns: `[8, 3, 7, 5]`
### XOR
#### Brightscript
```brightscript
rodash_xor([[3, 10, 100], [100, 10, 2], [10, 500, 3]])
```
#### Brighterscript
```brighterscript
rodash.xor([[3, 10, 100], [100, 10, 2], [10, 500, 3]])
```
Returns: `[2, 500]`
## Brighterscript Support
If imported into a project that leverages the Brighterscript compiler, you can use rodash. lookups with auto-complete.

## Development
Currently in development