Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-12-19 17:39:54 +03:00
parent 2e81b0407e
commit a47556b991

View File

@ -51,8 +51,23 @@ var util = require('lib/util')
// Normalize a split that contains either multiple values or a list to
// a list enabling the following method signature:
//
// .someMethod(arg, ..)
// .someMethod([arg, ..])
// Example:
//
// // func(arg, ..)
// // func([arg, ..])
// // -> args
// //
// var func = function(...args){
// return normalizeSplit(args) }
//
// func(123) // -> [123]
// func(1, 2, 3) // -> [1, 2, 3]
//
//
// func([1, 2, 3]) // -> [1, 2, 3]
//
// // a more complex case...
// func([1], [2], 3) // -> [[1], [2], 3]
//
//
// XXX better docs -- signature...