@@ -33,7 +33,7 @@ var defaultFormat = formats['default'];
3333var defaults = {
3434 addQueryPrefix : false ,
3535 allowDots : false ,
36- allowDotsForIndices : false ,
36+ allowDotsForNumbers : false ,
3737 allowEmptyArrays : false ,
3838 arrayFormat : 'indices' ,
3939 charset : 'utf-8' ,
@@ -79,7 +79,7 @@ var stringify = function stringify(
7979 filter ,
8080 sort ,
8181 allowDots ,
82- allowDotsForIndices ,
82+ allowDotsForNumbers ,
8383 serializeDate ,
8484 format ,
8585 formatter ,
@@ -196,7 +196,7 @@ var stringify = function stringify(
196196 filter ,
197197 sort ,
198198 allowDots ,
199- allowDotsForIndices ,
199+ allowDotsForNumbers ,
200200 serializeDate ,
201201 format ,
202202 formatter ,
@@ -226,8 +226,8 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
226226 throw new TypeError ( 'Encoder has to be a function.' ) ;
227227 }
228228
229- if ( 'allowDots' in opts && opts . allowDots === false && opts . allowDotsForIndices ) {
230- throw new TypeError ( 'allowDots cannot be false and allowDotsForIndices true at the same time' ) ;
229+ if ( 'allowDots' in opts && opts . allowDots === false && opts . allowDotsForNumbers ) {
230+ throw new TypeError ( 'allowDots cannot be false and allowDotsForNumbers true at the same time' ) ;
231231 }
232232
233233 var charset = opts . charset || defaults . charset ;
@@ -254,7 +254,7 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
254254 arrayFormat = opts . arrayFormat ;
255255 } else if ( 'indices' in opts ) {
256256 arrayFormat = opts . indices ? 'indices' : 'repeat' ;
257- } else if ( opts . allowDotsForIndices ) {
257+ } else if ( opts . allowDotsForNumbers ) {
258258 arrayFormat = 'dots' ;
259259 } else {
260260 arrayFormat = defaults . arrayFormat ;
@@ -265,12 +265,12 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
265265 }
266266
267267 var allowDots = typeof opts . allowDots === 'undefined' ? opts . encodeDotInKeys === true ? true : defaults . allowDots : ! ! opts . allowDots ;
268- var allowDotsForIndices = ! ! opts . allowDotsForIndices ;
268+ var allowDotsForNumbers = ! ! opts . allowDotsForNumbers ;
269269
270270 return {
271271 addQueryPrefix : typeof opts . addQueryPrefix === 'boolean' ? opts . addQueryPrefix : defaults . addQueryPrefix ,
272272 allowDots : allowDots ,
273- allowDotsForIndices : allowDotsForIndices ,
273+ allowDotsForNumbers : allowDotsForNumbers ,
274274 allowEmptyArrays : typeof opts . allowEmptyArrays === 'boolean' ? ! ! opts . allowEmptyArrays : defaults . allowEmptyArrays ,
275275 arrayFormat : arrayFormat ,
276276 charset : charset ,
@@ -344,7 +344,7 @@ module.exports = function (object, opts) {
344344 options . filter ,
345345 options . sort ,
346346 options . allowDots ,
347- options . allowDotsForIndices ,
347+ options . allowDotsForNumbers ,
348348 options . serializeDate ,
349349 options . format ,
350350 options . formatter ,
0 commit comments