Skip to content

Commit

Permalink
added note
Browse files Browse the repository at this point in the history
  • Loading branch information
twoojoo committed Feb 10, 2024
1 parent 3c847bb commit 6b4535f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ jsjq '.data.compact()' '{ "data": [1, 2, 2, 3] }'
# output: [ 1, 2, 3 ]
```

> NOTE: custom methods are not available for transformed object and array
```bash
jsjq '.data.map(x => x).compact()' '{ "data": [1, 2, 2, 3] }'
# will throw an error
```

Options:

- **-m, --disable-custom-methods** disable the usage of custom methods (prevents fields override);
Expand Down
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ if (json !== "") {
}
})();



function runJSJQ(query, json) {
const isJsonFile = isValidFilePath(json)

Expand Down

0 comments on commit 6b4535f

Please sign in to comment.