Retrieve the common prefix across multiple strings.
str = common(strings)
var common = require('common-prefix') common([ 'hello world' , 'hello again' , 'hello once again']) === 'hello '
MIT. See LICENSE.md for details.
Selectively mirror the npm registry inside your firewall. Filter packages based on security, licensing, code quality and more. Build awesome stuff faster. Try npm Enterprise for free…
how? learn more