Implementations for the Longest Common Substring algorithm [O(nm) time]
npm install node-lcsCommon dynamic programming implementations for the Longest Common Substring algorithm runs in O(nm) time.
Reference implementation at WikiBooks
Add the latest version of node-lcs to your package.json:
```
npm install node-lcs
`javascript
var lcs = require('node-lcs')
var result = lcs('Longest common substring', 'Compare with this common string')
console.log(result)
`
`javascript``
{ length: 9, sequence: ' common s', offset: 7 }