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

name-to-imdb

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

name-to-imdb - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

9

helpers.js

@@ -106,2 +106,11 @@ var helpers = {}

helpers.parseSearchTerm = function(searchTerm) {
if (!searchTerm || typeof searchTerm !== 'string') return null;
var diacritics = require('diacritics').remove;
var res = searchTerm.replace(/[^\u0000-\u036F][ \t]*/gm, '');
return diacritics(res);
}
module.exports = helpers

9

index.js

@@ -1,3 +0,3 @@

var namedQueue = require('named-queue');
var helpers = require('./helpers')
const namedQueue = require('named-queue');
const helpers = require('./helpers');

@@ -26,3 +26,3 @@ var providers = {

var q = { name: args.name }
var q = { name: helpers.parseSearchTerm(args.name) }
if (args.year) q.year = args.year

@@ -41,4 +41,3 @@ if (args.type) q.type = args.type

return cb(null, null) // no match for other types
var key = new Buffer(args.hintUrl || Object.values(q).join(':')).toString('ascii') // convert to ASCII since EventEmitter bugs with UTF8
var key = new Buffer.from(args.hintUrl || Object.values(q).join(':')).toString('ascii') // convert to ASCII since EventEmitter bugs with UTF8

@@ -45,0 +44,0 @@ if (cache.hasOwnProperty(key) && Date.now()-cacheLastSet[key] < CACHE_TTL) {

{
"name": "name-to-imdb",
"version": "3.0.1",
"version": "3.0.2",
"description": "Finds IMDB ID by movie/series name (fuzzily) and optionally year and type",

@@ -26,2 +26,3 @@ "main": "index.js",

"dependencies": {
"diacritics": "~1.3.0",
"named-queue": "^2.1.0",

@@ -28,0 +29,0 @@ "needle": "^1.1.2",

@@ -1,2 +0,1 @@

var needle = require("needle")

@@ -3,0 +2,0 @@ var helpers = require("../helpers")

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