Skip to content

Commit

Permalink
Shifting to module support
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Cox authored and Dan Cox committed Jan 3, 2024
1 parent 6281d44 commit 3c6b0e3
Show file tree
Hide file tree
Showing 12 changed files with 11,055 additions and 4,480 deletions.
34 changes: 0 additions & 34 deletions .eslintrc.js

This file was deleted.

21 changes: 21 additions & 0 deletions .eslintrc.json
@@ -0,0 +1,21 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"standard",
"plugin:mocha/recommended"
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"semi": ["error", "always"]
},
"plugins": [
"mocha"
]
}
13 changes: 4 additions & 9 deletions README.md
@@ -1,6 +1,6 @@
# Quis

*Lightweight (~11 KiB) story sorting DSL.*
*Lightweight (~12 KiB) data sorting DSL.*

Based on the Latin word *quis*, this project, like its origin, implies a question of existing complex data. Quis provides a domain specific language (DSL) for performing comparisons on values within a collection using string-based comparisons.

Expand All @@ -24,18 +24,18 @@ To be as lightweight as possible, Quis does not contain state or database functi
Based on the underlining PEG compilation process, Quis expects a *values()* callback function returning values based on the passed-in variable name. For example, a simple collection returning specific values based on labels might be the following:

```javascript
const values = (label) => {
const values = (name) => {

// Establish a default value.
let result = null;

// Return value based on 'example'.
if (label === 'example') {
if (name === 'example') {
result = 2;
}

// Return value based on 'example2'.
if (label === 'example2') {
if (name === 'example2') {
result = 5;
}

Expand All @@ -44,11 +44,6 @@ const values = (label) => {
};
```

## Build

- `build/quis.js (40.1 KiB)`
- `build/quis.min.js (10.8 KiB)`

## Example

```js
Expand Down
File renamed without changes.
8 changes: 7 additions & 1 deletion build/quis.min.js

Large diffs are not rendered by default.

30 changes: 0 additions & 30 deletions index.js

This file was deleted.

0 comments on commit 3c6b0e3

Please sign in to comment.