join array into string with default delimiter '/'
npm install djoin
var djoin = require('djoin')
console.log(djoin(['a', 'b', 'c'], '.')) // => 'a.b.c'
console.log(djoin(['a', 'b', 'c'])) // => 'a/b/c'
console.log(djoin(['', 'a', 'b', '', 'c', ''])) // => '/a/b//c/'
console.log(djoin(['a', 'b','',''])) // => 'a/b//'
console.log(djoin(['','','a', 'b'])) // => '//a/b'
console.log(djoin(['','',''])) // => '//'
console.log(djoin(['',''])) // => '/'
console.log(djoin([''])) // => ''
console.log(djoin([])) // => undefined
console.log(djoin('')) // => undefined
console.log(djoin(undefined)) // => undefined
- see dsplit