UNPKG

hexo-related-posts

Version:

Hexo plugin that generates related posts list with TF/IDF algorithm

4 lines (2 loc) 169 B
const matrixHasValue = (matrix, key1, key2) => Boolean((matrix[key1] && matrix[key1][key2]) || (matrix[key2] && matrix[key2][key1] )); module.exports = matrixHasValue;