Skip to content
This repository has been archived by the owner on Aug 11, 2019. It is now read-only.

Suggestion: let Deep access methods accept array as key path #19

Open
akihikodaki opened this issue Apr 19, 2018 · 0 comments
Open

Suggestion: let Deep access methods accept array as key path #19

akihikodaki opened this issue Apr 19, 2018 · 0 comments

Comments

@akihikodaki
Copy link

Think you have host-to-address map created with Object.create(null):

const store = new Store({
  hostToAddress: Object.create(null)
});

Now, you store IPv address of a domain. If setDeep method accepts an array as a key path:

import { setDeep } from 'svelte-extras';
setDeep.call(store, ['hostToAddress', 'example.com'], '128.66.0.0');

So an array as a key path can include an arbitrary key, and so useful when a key is not sanitized or known to include .. I'd like to see this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant