jantimon / jantimon/css-variable

createVars

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
91
Forks
7
PR merge metrics
No merged PRs in 30d

Description

declaring multiple vars at once is quite repetitive right now e.g.:

```js
const a = createVar()
const b = createVar()
const c = createVar()
```

maybe we could create a new helper `createVars` which would allow to use the spread operator to declare multiple vars at the same time:

```ts
export function* createVars () { while(1) { yield createVar() }}
```

```js
const [a,b,c] = createVars();
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the existing createVar entry point and review how it is exported and used. Add the proposed createVars helper so destructuring can produce multiple variables, then verify that the documented const [a,b,c] = createVars() usage works with the project's existing checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript, typescript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.