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

twitter-openapi-typescript

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitter-openapi-typescript - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

14

dist/src/utils/api.js

@@ -6,5 +6,13 @@ "use strict";

var instructionToEntry = function (item) {
return item
.map(function (e) { return (e.type == i.InstructionType.TimelineAddEntries ? e : null); })
.find(function (e) { return e; }).entries;
return item.flatMap(function (e) {
if (e.type == i.InstructionType.TimelineAddEntries) {
return e.entries;
}
else if (e.type == i.InstructionType.TimelineReplaceEntry) {
return [e.entry];
}
else {
return null;
}
});
};

@@ -11,0 +19,0 @@ exports.instructionToEntry = instructionToEntry;

{
"name": "twitter-openapi-typescript",
"version": "0.0.10",
"version": "0.0.11",
"description": "Implementation of Twitter internal API in TypeScript",

@@ -5,0 +5,0 @@ "scripts": {

@@ -5,5 +5,11 @@ import * as i from 'twitter-openapi-typescript-generated';

export const instructionToEntry = (item: i.InstructionUnion[]): i.TimelineAddEntry[] => {
return item
.map((e) => (e.type == i.InstructionType.TimelineAddEntries ? (e as i.TimelineAddEntries) : null))
.find((e) => e).entries;
return item.flatMap((e) => {
if (e.type == i.InstructionType.TimelineAddEntries) {
return (e as i.TimelineAddEntries).entries;
} else if (e.type == i.InstructionType.TimelineReplaceEntry) {
return [(e as i.TimelineReplaceEntry).entry];
} else {
return null;
}
});
};

@@ -10,0 +16,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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