common-prefix
v1.1.0
Published
Retrieve the common prefix across multiple strings
Downloads
120,518
Maintainers
Readme
common-prefix
Retrieve the common prefix across multiple strings.
Usage
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.