2 * to-object-path <https://github.com/jonschlinkert/to-object-path>
4 * Copyright (c) 2015, Jon Schlinkert.
5 * Licensed under the MIT License.
10 var typeOf = require('kind-of');
12 module.exports = function toPath(args) {
13 if (typeOf(args) !== 'arguments') {
16 return filter(args).join('.');
19 function filter(arr) {
26 if (typeOf(ele) === 'arguments' || Array.isArray(ele)) {
27 res.push.apply(res, filter(ele));
28 } else if (typeof ele === 'string') {