New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tiktok-stats

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tiktok-stats - npm Package Compare versions

Comparing version 1.7.1 to 1.7.2

1

index.js
const fetch = require('node-fetch');
const entities = require("entities");
module.exports.Stats = require('./src/stats');

5

package.json
{
"name": "tiktok-stats",
"version": "1.7.1",
"version": "1.7.2",
"description": "This package gives you the statistics of which user tiktok !",

@@ -17,4 +17,5 @@ "main": "index.js",

"dependencies": {
"node-fetch": "^2.6.1"
"node-fetch": "^2.6.1",
"entities": "^2.2.0"
}
}

@@ -62,2 +62,5 @@ # tiktok-stats

● **Patch the bug with html entities.**
## Credits

@@ -64,0 +67,0 @@ Made by Pioupia with ❤️

const fetch = require('node-fetch');
const entities = require("entities");

@@ -32,17 +33,2 @@ module.exports = class Greeting {

const entities = {
" ": "",
"&lt;": "<",
"&gt;": ">",
"&amp;": "&",
"&quot;": '"',
"&apos;": "'",
"&cent;": "¢",
"&pound;": "£",
"&yen;": "¥",
"&euro;": "€",
"&copy;": "©",
"&reg;": "®"
}
fetch(`https://www.tiktok.com/@${this.user}?lang=fr`).then(res => res.text()).then(data => {

@@ -116,21 +102,4 @@ if (!data || data == " ") {

function entitiesDetect(data) {
const entities = {
"&nbsp;": "",
"&lt;": "<",
"&gt;": ">",
"&amp;": "&",
"&quot;": '"',
"&apos;": "'",
"&cent;": "¢",
"&pound;": "£",
"&yen;": "¥",
"&euro;": "€",
"&copy;": "©",
"&reg;": "®"
}
data = entities.decodeHTML(data);
for (const res in entities) {
if (data.includes(res)) data = data.replace(res, entities[res]);
}
return data;

@@ -137,0 +106,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc