Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.uniq = function(str) {
return _.uniq(jieba.tag(str).sort())
.filter(function(item) {
return !item.match(/\s/);
})
.map(function(item) {
item = item.split(':');
return {
name: item[0],
type: item[1]
}
});
};