mathiasbynens / mathiasbynens/jsesc

use minimal form for property names when possible

Open
#54 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
800
Forks
54
PR merge metrics
No merged PRs in 30d

Description

Feature request:

// Current behavior
> jsesc({ key: 'value' }, { minimal: true })
'{\'key\':\'value\'}'
// Preferred behavior
> jsesc({ key: 'value' }, { minimal: true })
'{key:\'value\'}'

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

Start at the jsesc entry point that handles object serialization with the { minimal: true } option, then trace how property names are emitted. Verify the change against the example in this issue: valid identifier-like keys should omit quotes while other property names retain the required quoting, and existing behavior should remain covered by the test suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.