Skip to content
This repository was archived by the owner on Dec 28, 2019. It is now read-only.

Commit f8e4d66

Browse files
committed
Changed separator prefix from _ to -
1 parent a4ea1a7 commit f8e4d66

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dop-router",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "Router for dop",
55
"main": "index.js",
66
"repository": {

src/react/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const locationProperty = 'location'
22
const groupProperty = 'group'
3-
const separatorChar = '_'
3+
const separatorChar = '-'
44

55
export function Router(props) {
66
let children = props.children

test/react.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,39 +175,39 @@ test('<Router location={}> regexp fail </Router>', function(t) {
175175

176176
test('<Router location={}> sub </Router>', function(t) {
177177
const component = e(Router, { location: { a: { b: true } } }, [
178-
e(Route, { a_b: false }, element)
178+
e(Route, { 'a-b': false }, element)
179179
])
180180
t.equal(render(component), htmlEmpty)
181181
t.end()
182182
})
183183

184184
test('<Router location={}> sub </Router>', function(t) {
185185
const component = e(Router, { location: { a: { b: true } } }, [
186-
e(Route, { a_c: true }, element)
186+
e(Route, { 'a-c': true }, element)
187187
])
188188
t.equal(render(component), html)
189189
t.end()
190190
})
191191

192192
test('<Router location={}> sub </Router>', function(t) {
193193
const component = e(Router, { location: { a: { b: true } } }, [
194-
e(Route, { a_: true }, element)
194+
e(Route, { 'a-': true }, element)
195195
])
196196
t.equal(render(component), html)
197197
t.end()
198198
})
199199

200200
test('<Router location={}> sub double </Router>', function(t) {
201201
const component = e(Router, { location: { a: { b: true, c: true } } }, [
202-
e(Route, { a_b: true, a_c: true }, element)
202+
e(Route, { 'a-b': true, 'a-c': true }, element)
203203
])
204204
t.equal(render(component), html)
205205
t.end()
206206
})
207207

208208
test('<Router location={}> sub double 2 </Router>', function(t) {
209209
const component = e(Router, { location: { a: { b: true, c: true } } }, [
210-
e(Route, { a_b: true, a_c: false }, element)
210+
e(Route, { 'a-b': true, 'a-c': false }, element)
211211
])
212212
t.equal(render(component), htmlEmpty)
213213
t.end()

0 commit comments

Comments
 (0)