UNPKG

promisesql

Version:

A [node-sqlite3](https://www.npmjs.com/package/sqlite3) wrapper for running simple, promise-based database queries in Node.js. It works best in smaller projects with a lot of asynchronous development, e.g., a Discord bot that implements slash commands.

15 lines (12 loc) 399 B
const booleanExpressions = new Object(); const fnData = [ { name: 'eq', sign: '='}, { name: 'lt', sign: '<' }, { name: 'gt', sign: '>' }, { name: 'leq', sign: '<=' }, { name: 'geq', sign: '>=' } ]; fnData.forEach(expr => { booleanExpressions[expr.name] = (lhs, rhs) => new Object({ lhs, operator: expr.sign, rhs }); }); module.exports = booleanExpressions;