UNPKG

mining-utils

Version:

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/Oracy/mining-utils/blob/master/LICENSE) [![version](https://badge.fury.io/js/mining-utils.svg)](https://badge.fury.io/js/mining-utils) [![Coverage Status](https://co

1 lines 861 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const removeLinks_1=require("./removeLinks"),removePunctuation_1=require("./removePunctuation"),removeRT=e=>{const r=new RegExp(/(RT|via).*?:/,"g");return e.replace(r,"")};exports.removeRT=removeRT;const removeHashtag=e=>{const r=new RegExp(/(#\S.[^\s]*)/,"g");return e.replace(r,"")};exports.removeHashtag=removeHashtag;const removeTag=e=>{const r=new RegExp(/(@\w*.[\s])/,"g");return e.replace(r,"")};exports.removeTag=removeTag;const removeNumber=e=>{const r=new RegExp(/(\d)/,"g");return e.replace(r,"")};exports.removeNumber=removeNumber;const clearTweets=e=>{let r;return r=removeLinks_1.removeLinks(e),r=removeRT(r),r=removeHashtag(r),r=removeTag(r),r=removePunctuation_1.removePunctuation(r),r=removeNumber(r),r=removePunctuation_1.removeBlankSpace(r)};exports.clearTweets=clearTweets;