liquid-labs / liquid-labs/condition-eval

Implement 'default values' in expressions.

Open
#27 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

## Overview

It's useful to be able to provide default values for non-defined parameters. How about:

- If a parameter ends in a 't', it defaults to `true`.
- If a parameter ends in an 'f', it defaults to `false`.
- If a parameter ends in an 'n' followed by a number, it defaults to that number.

Because we'd have to deal with quoting and such, we're not going to deal with default strings just yet.

## Deliverables

- [ ] Implement t/f defaults.
- [ ] Implement numeric default support.
- [ ] Ensure that the default appears in the square brackets (or cap Y or N in 'y/n' for bools).
- [ ] Ensure that hitting enter accepts the default and sets the parameter to that value.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or entry points are named. Start by locating expression parameter parsing and the prompt that renders square-bracket defaults, then trace how accepted input sets parameter values. Done means boolean and numeric suffix defaults are displayed correctly and pressing Enter stores the displayed default.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.