facebook / facebook/jscodeshift
Missing simple examples for new users
- Dominant language
- JavaScript
- Stars
- 10k
- Forks
- 498
- PR merge metrics
- No merged PRs in 30d
Description
I have never used jscodeshift, but have identified it as being potentially useful for a couple of simple use cases.
For example, I would like to change an object literal in code.
Before:
```js
// Some code ...
const someObj = {
x: {
foo: 3
}
};
// Some more code ...
```
After:
```js
// Some code ...
const someObj = {
x: {
foo: 4,
bar: '5'
}
};
// Some more code ...
```
But there are no examples of changing values. In general, this repo is very thin on examples. Google and Stackoverflow don't seem to point to any relevant information. None of the linked examples are helpful. [jscodeshift-helper](https://www.npmjs.com/package/jscodeshift-helper) doesn't help. Every example I have found so far is for complex use cases rather than something simple like changing the literal value of something.
Contributor guide
Assessment
This issue has not been assessed yet.