case-uniquify

1.0.0 • Public • Published

case-uniquify

Given a name, make a unique name even on case-folding filesystems.

If the name is all lower-case, return it unchanged.

If the name contains upper-case characters, append "_xxxxxxxx" where the x's are the first 8 characters of the SHA-1 hash of the name.

USAGE

var cu = require('case-uniquify')
console.log(cu('jsonstream'))
// output: jsonstream

console.log(cu('JSONStream'))
// output: JSONStream_50850eed

LICENSE

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i case-uniquify

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • isaacs
  • othiym23
  • smikes