npm.io
1.1.0 • Published 10 years ago

common-prefix

Licence
MIT
Version
1.1.0
Deps
0
Vulns
0
Weekly
0
Stars
14

common-prefix stable

Retrieve the common prefix across multiple strings.

Usage

NPM

str = common(strings)

For example:

var common = require('common-prefix')

common([
    'hello world'
  , 'hello again'
  , 'hello once again'
]) === 'hello '

License

MIT. See LICENSE.md for details.

Keywords