luisherranz / deepsignal

DeepSignal 🧶 - Preact signals, but using regular JavaScript objects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Enhancement] allow object properties named "$"

rozek opened this issue · comments

$ is a common name for object properties, particularly in browser environments (the best-known example should be jQuery)

While it is a nice idea to access object property signals using $name or array element signals using $[index], it should remain possible to use $ by itself as the name of an object (not an array) property - and $$ as the name for its related signal.

The required changes should be trivial (see my own fork of your repository)

I've been thinking about this and for the moment I'm not going to add it. It increases the bundle size to solve a very rare case that is not common and can be easily avoided by the user.