index.js
function metriclcs(s1, s2) {
  if (typeof s1 !== "string" || typeof s1 !== "string") return NaN;
  if (s1 === s2) return 1;

  const mlen = Math.max(s1.length, s2.length);
  if (mlen === 0) return 1;
  return lcsLength(s1, s2) / mlen;
}
function metriclcs(s1, s2) {
  if (typeof s1 !== "string" || typeof s1 !== "string") return NaN;
  if (s1 === s2) return 1;

  const mlen = Math.max(s1.length, s2.length);
  if (mlen === 0) return 1;
  return lcsLength(s1, s2) / mlen;
}
function metriclcs ( s1 , s2 ) { if ( typeof s1 !== "string" || typeof s1 !== "string" ) return NaN ; if ( s1 === s2 ) return 1 ; const mlen = Math . max ( s1 . length , s2 . length ) ; if ( mlen === 0 ) return 1 ; return lcsLength ( s1 , s2 ) / mlen ; }
Returns a number between 1 and 0, where 1 means they are exactly the same and 0 means no common subsequences.
If either string is not a string, returns NaN
@param {string} s1
@param {string} s2
@returns {number}
Returns a number between 1 and 0 where 1 means they are exactly the same and 0 means no common subsequences . If either string is not a string returns NaN