Skip to content

Commit

Permalink
added import support
Browse files Browse the repository at this point in the history
  • Loading branch information
shahrul committed Sep 29, 2023
1 parent 45e6982 commit fb56f53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion libs/executor.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ const catcher = (e) => e(this)
* @param {QueryOptions} opts - Options for query execution.
* @returns {Promise<object>} A promise that resolves to the result object.
*/
module.exports = (query, opts) => {
const rq = (query, opts) => {
try {
return executeQuery(query, null, opts).then(arrayToObject)
} catch (error) {
return catcher.bind(error)
}
}

exports.rq = rq
module.exports = rq
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@syarul/requrse",
"version": "0.1.8",
"version": "0.1.9",
"description": "Lightweight driven query language",
"main": "libs/executor.js",
"scripts": {
Expand Down

0 comments on commit fb56f53

Please sign in to comment.