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

imdb-api

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imdb-api - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

test/data/james-bond.json

6

lib/imdb.js

@@ -52,4 +52,4 @@ "use strict";

this["_year_data"] = obj[attr];
if (obj[attr].match(/\d{4}[\-–](?:\d{4})/)) {
this[attr] = parseInt(obj[attr]);
if (!obj[attr].match(/\d{4}[\-–]\d{4}/)) {
this[attr.toLowerCase()] = parseInt(obj[attr]);
}

@@ -135,3 +135,3 @@ }

throw new TypeError("cb must be a function");
var qs = { plot: "full", r: "json" };
var qs = { plot: "full", r: "json", y: req.year };
if (req.name) {

@@ -138,0 +138,0 @@ qs["t"] = req.name;

@@ -5,3 +5,3 @@ {

"description": "Queries unofficial imdb APIs to get movie and television information from imdb",
"version": "2.0.0",
"version": "2.1.0",
"main": "lib/imdb.js",

@@ -26,3 +26,3 @@ "homepage": "https://github.com/worr/node-imdb-api",

"tslint": "^3.15.1",
"typescript": "1.8.x"
"typescript": "^2.0.0"
},

@@ -29,0 +29,0 @@ "optionalDependencies": {},

@@ -27,4 +27,5 @@ /// <reference path="../typings/index.d.ts"/>

export interface MovieRequest {
name: string;
id: string;
name?: string;
id?: string;
year?: number;
}

@@ -98,4 +99,4 @@

this["_year_data"] = obj[attr];
if (obj[attr].match(/\d{4}[\-–](?:\d{4})/)) {
this[attr] = parseInt(obj[attr]);
if (! obj[attr].match(/\d{4}[\-–]\d{4}/)) {
this[attr.toLowerCase()] = parseInt(obj[attr]);
}

@@ -184,3 +185,3 @@ } else if (attr === "Released") {

let qs = {plot: "full", r: "json"};
let qs = {plot: "full", r: "json", y: req.year};

@@ -187,0 +188,0 @@ if (req.name) {

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