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

get-movie-extra-name

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-movie-extra-name - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

5

lib/get-movie-extra-name.js

@@ -7,2 +7,3 @@ const request = require('request');

const removeStartDash = str => str.replace(/^-+\s*/, '').trim();
const difference = (x, y) => Math.abs(x - y);

@@ -53,2 +54,4 @@ async function getMovieExtraName(param, inputTime) {

console.log(extras);
for (let i = 0; i < extras.length; i += 1) {

@@ -63,3 +66,3 @@ if (extras[i].time === time) {

for (let i = 0; i < extras.length; i += 1) {
if (Math.abs(extras[i].time - time) <= 1) {
if (difference(extras[i].time, time) <= 2) {
output = extras[i].title;

@@ -66,0 +69,0 @@ break;

2

package.json
{
"name": "get-movie-extra-name",
"version": "1.0.3",
"version": "1.0.4",
"description": "Pass the title of a movie and the length of an extra and get back the title of that extra",

@@ -5,0 +5,0 @@ "main": "./lib/get-movie-extra-name.js",

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