Defined in: packages/megadoc-plugin-markdown/lib/utils/findCommonPrefix.js
Given a list of strings, find the common substring they all start with. Very useful for extracting relative paths from a list of paths.
array | Array.<String> Your list of some-what related strings. |
delim | String If specified, the prefix will span until the last occurrence of this delimiter, like a '/' in a file-path so that any common characters after that last '/' don't get trimmed. Defaults to: |
String The common prefix. |
Made with ♥ using megadoc.
Contents