-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support numeric keys on objects (#124)
* Add check in setValue() to only change key to index if target is an Array * Fix bug when creating new objects when path specifies indices * Linting fixes * Update tests * Update version * Update changelog
- Loading branch information
1 parent
5ee7a07
commit 454d1ee
Showing
15 changed files
with
191 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "vuex-pathify", | ||
"version": "1.4.4", | ||
"version": "1.4.5", | ||
"description": "Ridiculously simple Vuex setup + wiring", | ||
"main": "dist/vuex-pathify.js", | ||
"module": "dist/vuex-pathify.esm.js", | ||
|
@@ -14,7 +14,7 @@ | |
"dev": "rollup -c build/rollup.js -w", | ||
"build": "rollup -c build/rollup.js", | ||
"docs": "node-sass docs/assets/scss -o docs/assets/css -w docs/assets/scss/**/*.scss & docsify serve docs", | ||
"test": "jest tests/", | ||
"test": "jest tests/ --verbose", | ||
"test:types": "tsc -p types/test" | ||
}, | ||
"author": "Dave Stewart <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Vue from 'vue'; | ||
import Vuex from 'vuex' | ||
import { make } from '../../src/main' | ||
import pathify from './pathify' | ||
|
||
Vue.use(Vuex) | ||
|
||
export function makeStore (store) { | ||
if (!store.mutations) { | ||
store.mutations = make.mutations(store.state) | ||
} | ||
return new Vuex.Store({ | ||
plugins: [pathify.plugin], | ||
...store | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import pathify from '../../src/main' | ||
|
||
// options | ||
pathify.options.mapping = 'simple' | ||
pathify.options.deep = 2 | ||
|
||
// export | ||
export default pathify |
Oops, something went wrong.