使用javascript和amp;删除数组中的类似推文下划线

时间:2017-11-08 11:38:23

标签: javascript arrays underscore.js

我正在开发一个简单的Twitter机器人,需要在搜索结果中删除类似的推文。 如何在数组中删除类似的结果?我可以使用下划线字符串相似性模块执行此操作吗? 我正在清理结果,如下例所示。

const tweets = [
  "32 Things You're Doing Wrong With Your Website Design https://t.co/**** #Webdesign #WebsiteDesign… https://t.co/***",
  "How to Deal With Image Heavy Website Design https://t.co/*** #WebDesign #WebsiteDesign #PageLoadSpeed https://t.co/***",
  "How to Score a Perfect 100% on Google PageSpeed #Insights https://t.co/*** #Google #PageSpeed #Webdesign https://t.co/***",
  "How to Score a Perfect 100% on Google #PageSpeed Insights https://t.co/*** #Google #WebDesign https://t.co/***",
  "How to Score a Perfect 100% on #Google PageSpeed Insights https://t.co/*** #PageSpeed #WebApp https://t.co/***",
  "Hello Web Design launches today! Learn design fundamentals and shortcuts aimed at non-designers.… https://t.co/***",
  "How to Deal With Image Heavy Website Design https://t.co/*** #WebDesign #WebsiteDesign #PageLoadSpeed https://t.co/***",
  "#Drupal 8’s new upgrade path is a major reason organizations should consider migrating sooner rather than later”… https://t.co/***",
];

0 个答案:

没有答案