falso
falso copied to clipboard
Quick falso access from ide
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/ngneat/falso/blob/master/CONTRIBUTING.md#commit
- [x] Tests for the changes have been added (for bug fixes / features)
- [x] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
When falso
is typed in IDE in any file typescript recognize a variable from this package and import it automatically.
When you start writing access path to variable function list of availabel functions is displayed.
[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:
What is the current behavior?
All falso functions must be imported by its own name. If I want to use a falso function I need to know what is the name of it.
What is the new behavior?
All falso function may be imported in one falso
variable.
If I want to use a falso function I can pick one accessable from falso
variable.
Does this PR introduce a breaking change?
[ ] Yes
[x] No
Other information
This is a feature that increase developer experience.
If you look at the alternative solution faker
you will see that in original package https://www.npmjs.com/package/faker/v/5.5.3 did not include this feature but a fork of it https://www.npmjs.com/package/@faker-js/faker do.
To do the workaround I created a file like below in my project. However to avoid garbage files I belive this feature should be included in this package.
// falso.ts
export * as falso from "@ngneat/falso";
It breaks tree shaking.
@NetanelBasal Support for tree shaking restored :)
@NetanelBasal What about this?
@NetanelBasal you should close this PR