Skip to content

Commit 11b38f2

Browse files
committed
test: class API
1 parent cf90e3c commit 11b38f2

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

test/create.js

+18-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,21 @@ function camelize (str) {
22
return str.replace(/-(\w)/g, (_, c) => c ? c.toUpperCase() : '')
33
}
44

5-
console.log(camelize('user-name'))
5+
// console.log(camelize('user-name'))
6+
7+
const cli = cli=> {
8+
cli.say('vue cli')
9+
}
10+
11+
class API {
12+
constructor() {
13+
14+
}
15+
say(msg) {
16+
console.log(msg)
17+
}
18+
}
19+
20+
const api = new API()
21+
console.log(cli(api))
22+
// cli(api)

0 commit comments

Comments
 (0)