common-prefix

Retrieve the common prefix across multiple strings

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
common-prefix
1401.1.07 years ago8 years agoMinified + gzip package size for common-prefix in KB

Readme

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.