Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

socialblade-com-api

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socialblade-com-api - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

12

functions.js

@@ -66,3 +66,3 @@

return {
date: new Date(col1).toLocaleDateString('en-GB'),
date: getDate(col1),
followersDelta: +col2 || 0,

@@ -77,3 +77,3 @@ followers: +col3 || 0,

return {
date: new Date(col1).toLocaleDateString('en-GB'),
date: getDate(col1),
likesDelta: +col2 || 0,

@@ -86,3 +86,3 @@ likes: +col3 || 0,

return {
date: new Date(col1).toLocaleDateString('en-GB'),
date: getDate(col1),
subscribersDelta: +(convertUnit(col2)) || 0,

@@ -96,3 +96,3 @@ subscribers: +(convertUnit(col3)) || 0,

// [[Timestamp, Number], [...], ...]
parsed = parsed.map(item => ({ date: new Date(item[0]).toLocaleDateString('en-GB'), value: item[1] }))
parsed = parsed.map(item => ({ date: getDate(item[0]), value: item[1] }))
return {

@@ -107,2 +107,6 @@ id: generateId(col1),

function getDate (str) {
return new Date(str).toISOString().split('T')[0].replace(/-/g, '/')
}
function generateId (str) {

@@ -109,0 +113,0 @@ const splitted = str.split(/ for |\(/)

{
"name": "socialblade-com-api",
"version": "2.0.0",
"version": "2.0.1",
"description": "Unofficial APIs for Socialblade.com website.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -100,3 +100,3 @@ const assert = require('assert')

assert.strictEqual(tableConvertedArray.length, 3)
assert.strictEqual(tableConvertedArray[0].date, '4/27/2020')
assert.strictEqual(tableConvertedArray[0].date, '2020/04/27')
assert.strictEqual(tableConvertedArray[0].followersDelta, 0)

@@ -108,3 +108,3 @@ assert.strictEqual(tableConvertedArray[0].followers, 116620154)

assert.strictEqual(tableConvertedArray[0].posts, 1)
assert.strictEqual(tableConvertedArray[1].date, '4/28/2020')
assert.strictEqual(tableConvertedArray[1].date, '2020/04/28')
assert.strictEqual(tableConvertedArray[1].followersDelta, 0)

@@ -116,3 +116,3 @@ assert.strictEqual(tableConvertedArray[1].followers, 116720154)

assert.strictEqual(tableConvertedArray[1].posts, -1)
assert.strictEqual(tableConvertedArray[2].date, '4/29/2020')
assert.strictEqual(tableConvertedArray[2].date, '2020/04/29')
assert.strictEqual(tableConvertedArray[2].followersDelta, 0)

@@ -128,3 +128,3 @@ assert.strictEqual(tableConvertedArray[2].followers, 116820154)

assert.strictEqual(chartsConvertedArray[0].data.length, 5)
assert.strictEqual(chartsConvertedArray[0].data[0].date, '6/21/2016')
assert.strictEqual(chartsConvertedArray[0].data[0].date, '2016/06/21')
assert.strictEqual(chartsConvertedArray[0].data[0].value, 11962)

@@ -134,5 +134,5 @@ assert.strictEqual(chartsConvertedArray[1].id, 'weekly-following-gained')

assert.strictEqual(chartsConvertedArray[1].data.length, 5)
assert.strictEqual(chartsConvertedArray[1].data[0].date, '6/21/2016')
assert.strictEqual(chartsConvertedArray[1].data[0].date, '2016/06/21')
assert.strictEqual(chartsConvertedArray[1].data[0].value, 1196)
})
})
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