Skip to content

Conversation

gaurav10gg
Copy link

This PR simplifies the getKey function in the HKDF example by using object property shorthand for salt.

Before:
salt: salt

After:
salt

This change improves readability and follows modern JavaScript best practices, while keeping the code functionally identical.

### Summary
This PR updates the `hkdf.js` example in `web-crypto/derive-key/` to use JavaScript object property shorthand for `salt`.

### Before
```js
salt: salt
@gaurav10gg gaurav10gg requested a review from a team as a code owner September 11, 2025 15:35
@gaurav10gg gaurav10gg requested review from pepelsbey and removed request for a team September 11, 2025 15:35
@pepelsbey
Copy link
Member

Hey! Thank you for the suggestion, but I still think that expanded syntax helps readability, given that the rest of the entries follow the same key: value format.

@pepelsbey pepelsbey closed this Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants