@applicaster/zapp-react-native-utils
Version:
Applicaster Zapp React Native utilities package
30 lines (20 loc) • 1.05 kB
Markdown
### ramda replacement utils
See contribution guide below
## Reference
Prefer non-fp variant as it more performant - if refactoring assumes you need more efforts rewrite ramda sample to lodash and it can be easily replaced with lodash-fp - use lodash-fp.
### Ramda alternatives:
Custom
- `splitEvery` => `chunk`
- `times` => `times`
From `lodash`
- `clone` => `clone`
- `flatten` => `flatten`
- `drop` => `drop`
- `length` => `size`
## Contribution
To add new helper function as ramda replacement
1. Search for replacement ( you can use lodash or pure JS solution), arguments should match with Ramda definition (for easier transition).
2. Add new file if needed, add test, update exports in index file. 2.1. Make sure it's well-typed.
3. If the function can-be reexported from other 3rd party lib - update index.ts to re-export it.
4. Make sure README is updated and contains reference for newly added function.
5. You can use AI's help. Use query like 'lodash & lodash/fp equivalent of Ramda's R.clone function' to get an options you can use.