Skip to content

Commit

Permalink
Support open txt (#83)
Browse files Browse the repository at this point in the history
* in CliCoreBase

* bump version 0.1.37
  • Loading branch information
geoffhendrey authored Oct 1, 2024
1 parent 0bb26f5 commit c572d49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stated-js",
"version": "0.1.36",
"version": "0.1.37",
"license": "Apache-2.0",
"description": "JSONata embedded in JSON",
"main": "./dist/src/index.js",
Expand Down
4 changes: 3 additions & 1 deletion src/CliCoreBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ export class CliCoreBase {

if (fileExtension === 'yaml' || fileExtension === 'yml') {
return yaml.load(fileContent);
} else {
}else if (fileExtension === 'text' || fileExtension === 'txt') {
return fileContent;
}else {
return JSON.parse(fileContent);
}
}
Expand Down

0 comments on commit c572d49

Please sign in to comment.