package
Retrieve the common prefix across multiple strings
npm install common-prefixGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Retrieve the common prefix across multiple strings.
str = common(strings)For example:
var common = require('common-prefix')
common([
'hello world'
, 'hello again'
, 'hello once again'
]) === 'hello 'MIT. See LICENSE.md for details.