Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for Symbol properties #463

Open
dalefrancis88 opened this issue Mar 14, 2020 · 1 comment
Open

Adding support for Symbol properties #463

dalefrancis88 opened this issue Mar 14, 2020 · 1 comment

Comments

@dalefrancis88
Copy link
Collaborator

Describe the bug
Symbols are valid keys for 'names' of properties on JavaScript objects. We should support it

Symbol Documentation

To Reproduce
Steps to reproduce the behavior:

  1. Use hasProp with a Symbol property
  2. Pass in an object with a Symbol property on it
  3. Wait....
  4. See error

Expected behavior
Should allow property accessors to be symbols

@benhormann
Copy link
Contributor

I have made a start at implementing this.

There are many files to update.

So far:
Maybe/getPath.js
Maybe/getPath.spec.js
Maybe/getProp.js
Maybe/getProp.spec.js
Maybe/prop.spec.js
Maybe/propPath.spec.js
helpers/assoc.spec.js
helpers/dissoc.spec.js
helpers/getPathOr.js
helpers/getPathOr.spec.js
helpers/getPropOr.js
helpers/getPropOr.spec.js
helpers/propOr.spec.js
helpers/propPathOr.spec.js
helpers/setPath.js
helpers/setPath.spec.js
helpers/setProp.js
helpers/setProp.spec.js
helpers/unsetPath.js
helpers/unsetPath.spec.js
helpers/unsetProp.js
helpers/unsetProp.spec.js
predicates/hasProp.js
predicates/hasProp.spec.js
predicates/hasPropPath.js
predicates/hasPropPath.spec.js
predicates/hasProps.js
predicates/hasProps.spec.js
predicates/pathEq.js
predicates/pathEq.spec.js
predicates/pathSatisfies.js
predicates/pathSatisfies.spec.js
predicates/propEq.js
predicates/propEq.spec.js
predicates/propPathEq.spec.js
predicates/propPathSatisfies.spec.js
predicates/propSatisfies.js
predicates/propSatisfies.spec.js

For paths I have put this wording (affects related test):
Non-empty Array of Non-empty Strings, Positive Integers and/or Symbols required ...

@evilsoft
Is this fine, also is it worth making an isValidKey helper?

There is also objOf, fromPairs, defineUnion & pick. Should omit vaildate keys?
Anything I missed?

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

No branches or pull requests

2 participants