File tree 3 files changed +17
-13
lines changed
3 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vuejs-logger" ,
3
3
"author" : " Justin Kames" ,
4
- "version" : " 1.3.2 " ,
4
+ "version" : " 1.3.3 " ,
5
5
"description" : " Vuejs-logger, provides customizable logging functionality for Vue.js." ,
6
6
"main" : " dist/index.js" ,
7
7
"repository" : {
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ export default (function () {
3
3
const defaultOptions = {
4
4
logLevel : 'debug' ,
5
5
separator : '|' ,
6
- stringifyByDefault : false ,
6
+ stringifyArguments : false ,
7
7
showLogLevel : false ,
8
8
showMethodName : false ,
9
9
showConsoleColors : false ,
@@ -53,7 +53,7 @@ export default (function () {
53
53
if ( options . showConsoleColors && typeof options . showConsoleColors !== 'boolean' ) {
54
54
return false
55
55
}
56
- if ( options . separator && ( typeof options . separator === 'string' && options . separator . length > 3 ) ) {
56
+ if ( options . separator && ( typeof options . separator !== 'string' || ( typeof options . separator === 'string' && options . separator . length > 3 ) ) ) {
57
57
return false
58
58
}
59
59
return ! ( options . showMethodName && typeof options . showMethodName !== 'boolean' )
Original file line number Diff line number Diff line change @@ -151,16 +151,14 @@ describe('Logger.js', () => {
151
151
152
152
it ( 'isValidOptions() should fail with incorrect options.' , ( ) => {
153
153
154
- it ( 'isValidOptions() should pass with correct options.' , ( ) => {
155
- expect ( isValidOptions ( {
156
- logLevel : 'debug' ,
157
- stringifyByDefault : false ,
158
- showLogLevel : false ,
159
- showMethodName : true ,
160
- separator : '|||||' ,
161
- showConsoleColors : false ,
162
- } , logLevels ) ) . to . equal ( true )
163
- } )
154
+ expect ( isValidOptions ( {
155
+ logLevel : 'debug' ,
156
+ stringifyByDefault : false ,
157
+ showLogLevel : false ,
158
+ showMethodName : true ,
159
+ separator : '|||||' ,
160
+ showConsoleColors : false ,
161
+ } , logLevels ) ) . to . equal ( false )
164
162
165
163
expect ( isValidOptions ( {
166
164
logLevel : 'debug' ,
@@ -210,6 +208,12 @@ describe('Logger.js', () => {
210
208
expect ( isValidOptions ( {
211
209
logLevel : 'debug' ,
212
210
} , logLevels ) ) . to . equal ( true )
211
+
212
+ expect ( isValidOptions ( {
213
+ logLevel : 'debug' ,
214
+ separator : '1234' ,
215
+ } , logLevels ) ) . to . equal ( false )
216
+
213
217
} )
214
218
} )
215
219
You can’t perform that action at this time.
0 commit comments