Skip to content

serapath/djoin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

djoin

join array into string with default delimiter '/'

usage

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

Related

About

join array into string with default delimiter `'/'`

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published