From 64a265acb2393d27da8eb0ff82d2c344942d9388 Mon Sep 17 00:00:00 2001 From: hansemannn Date: Wed, 25 Jul 2018 12:06:10 +0200 Subject: [PATCH 1/3] Move to ESLint & Grunt --- .eslintrc | 6 + Gruntfile.js | 21 + LICENSE | 2 +- app/alloy.jmk | 46 +- app/alloy.js | 145 +- app/controllers/about.js | 4 +- app/controllers/home.js | 175 +- app/controllers/index.js | 23 +- app/controllers/intro.js | 27 +- app/controllers/movie.js | 102 +- app/controllers/movies_list.js | 107 +- app/controllers/settings.js | 15 +- app/controllers/views/list_cell.js | 14 +- app/controllers/views/list_static_cell.js | 2 +- app/controllers/views/movies_list_cell.js | 4 +- app/controllers/views/navbar.js | 2 +- app/lib/animation.js | 14 +- app/lib/data.js | 44 +- app/lib/navigation.js | 140 +- app/lib/tests/should.js | 4747 ++++++------ app/lib/tests/specs/app_tests.js | 44 +- app/lib/tests/tests_runner.js | 13 +- app/lib/tests/ti-mocha.js | 8496 ++++++++++----------- app/lib/themoviedb.js | 3077 ++++---- app/lib/youtube.js | 271 +- manifest | 8 - package-lock.json | 2516 ++++++ package.json | 31 + tiapp.xml | 6 +- 29 files changed, 11281 insertions(+), 8821 deletions(-) create mode 100644 .eslintrc create mode 100644 Gruntfile.js delete mode 100644 manifest create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..72c822e --- /dev/null +++ b/.eslintrc @@ -0,0 +1,6 @@ +{ + "extends": [ "axway/env-alloy" ], + "rules": { + "import/no-absolute-path": "off" + } +} \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..5adc607 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,21 @@ +module.exports = function (grunt) { + + // Project configuration. + grunt.initConfig({ + appcJs: { + src: [ + 'app/' + ] + } + }); + grunt.loadNpmTasks('grunt-appc-js'); + + // linting: run eslint against js, standard appc checks, check ios/android format via clang, run doc validation script + grunt.registerTask('lint', [ 'appcJs' ]); + + // Tasks for formatting the source code according to our clang/eslint rules + grunt.registerTask('format:js', [ 'appcJs:src:lint:fix' ]); + + // By default, run linting + grunt.registerTask('default', [ 'lint' ]); +}; \ No newline at end of file diff --git a/LICENSE b/LICENSE index a633b21..679338c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ ====================================== Appcelerator Movies App - Copyright 2008-2015 Appcelerator, Inc. + Copyright 2008-present Appcelerator, Inc. ====================================== Apache License diff --git a/app/alloy.jmk b/app/alloy.jmk index daa8aaf..cb6a42c 100644 --- a/app/alloy.jmk +++ b/app/alloy.jmk @@ -1,6 +1,6 @@ /** * Movies - * + * * @copyright * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. * @@ -11,30 +11,30 @@ /** * pre compile callback - * + * * - removes tests directory from production builds and when config.run_logic_tests is false */ -task("pre:compile", function(event, logger) { - +task('pre:compile', function (event, logger) { + var env = event.alloyConfig.deploytype; - logger.info("Pre compile (" + env + ")"); - - var fs = require("fs"); - var config = JSON.parse(fs.readFileSync(event.dir.config + ".json", "utf8")); - - logger.info(JSON.stringify(config["env:" + env])); - - if ("production" === env - || !config["env:" + env].run_logic_tests) { - - logger.info("*** Excluding tests from build"); - logger.info(event.alloyConfig.platform) + logger.info('Pre compile (' + env + ')'); + + var fs = require('fs'); + var config = JSON.parse(fs.readFileSync(event.dir.config + '.json', 'utf8')); + + logger.info(JSON.stringify(config['env:' + env])); + + if (env === 'production' + || !config['env:' + env].run_logic_tests) { + + logger.info('*** Excluding tests from build'); + logger.info(event.alloyConfig.platform); var path = (event.alloyConfig.platform === 'ios') ? 'iphone' : event.alloyConfig.platform; - var tests_dir = event.dir.resources + "/" + path + "/tests"; - var fs = require("fs-extra"); + var tests_dir = event.dir.resources + '/' + path + '/tests'; + var fs = require('fs-extra'); fs.removeSync(tests_dir); - - } else { - logger.info("*** Including tests in build"); - } -}); \ No newline at end of file + + } else { + logger.info('*** Including tests in build'); + } +}); diff --git a/app/alloy.js b/app/alloy.js index efb14fb..6b2fe48 100644 --- a/app/alloy.js +++ b/app/alloy.js @@ -1,6 +1,6 @@ /** * Movies - * + * * @copyright * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. * @@ -9,11 +9,11 @@ * Please see the LICENSE included with this distribution for details. */ -/////////////////////////////////////////////////////////////////////////////// +// ///////////////////////////////////////////////////////////////////////////// // // Constants // -/////////////////////////////////////////////////////////////////////////////// +// ///////////////////////////////////////////////////////////////////////////// // properties Alloy.Globals.PROPERTY_ENABLE_MOTION_ANIMATION = 'PROPERTY_ENABLE_MOTION_ANIMATION'; @@ -25,19 +25,17 @@ if (!Ti.App.Properties.hasProperty(Alloy.Globals.PROPERTY_ENABLE_MOTION_ANIMATIO } if (!Ti.App.Properties.hasProperty(Alloy.Globals.PROPERTY_ENABLE_LIST_ANIMATION)) { Ti.App.Properties.setBool(Alloy.Globals.PROPERTY_ENABLE_LIST_ANIMATION, true); -}; +} // events Alloy.Globals.EVENT_PROPERTY_ENABLE_MOTION_ANIMATION_DID_CHANGE = 'EVENT_PROPERTY_ENABLE_MOTION_ANIMATION_DID_CHANGE'; Alloy.Globals.EVENT_PROPERTY_ENABLE_LIST_ANIMATION_DID_CHANGE = 'EVENT_PROPERTY_ENABLE_LIST_ANIMATION_DID_CHANGE'; - - -/////////////////////////////////////////////////////////////////////////////// +// ///////////////////////////////////////////////////////////////////////////// // // Navigation singleton // -/////////////////////////////////////////////////////////////////////////////// +// ///////////////////////////////////////////////////////////////////////////// /** * The navigator object which handles all navigation @@ -49,20 +47,18 @@ Alloy.Globals.Navigator = {}; * Init navigation * Called from index controller once intro animation is complete */ -Alloy.Globals.initNavigation = function() { +Alloy.Globals.initNavigation = function () { // Require in the navigation module - Alloy.Globals.Navigator = require("/navigation")({ - parent: Alloy.Globals.navigationWindow || null - }); + Alloy.Globals.Navigator = require('/navigation')({ + parent: Alloy.Globals.navigationWindow || null + }); }; - - -/////////////////////////////////////////////////////////////////////////////// +// ///////////////////////////////////////////////////////////////////////////// // // Device singleton // -/////////////////////////////////////////////////////////////////////////////// +// ///////////////////////////////////////////////////////////////////////////// /** * Device information, some come from the Ti API calls and can be referenced @@ -81,33 +77,32 @@ Alloy.Globals.initNavigation = function() { */ Alloy.Globals.Device = { version: Ti.Platform.version, - versionMajor: parseInt(Ti.Platform.version.split(".")[0], 10), - versionMinor: parseInt(Ti.Platform.version.split(".")[1], 10), + versionMajor: parseInt(Ti.Platform.version.split('.')[0], 10), + versionMinor: parseInt(Ti.Platform.version.split('.')[1], 10), width: (Ti.Platform.displayCaps.platformWidth > Ti.Platform.displayCaps.platformHeight) ? Ti.Platform.displayCaps.platformHeight : Ti.Platform.displayCaps.platformWidth, height: (Ti.Platform.displayCaps.platformWidth > Ti.Platform.displayCaps.platformHeight) ? Ti.Platform.displayCaps.platformWidth : Ti.Platform.displayCaps.platformHeight, dpi: Ti.Platform.displayCaps.dpi, - orientation: Ti.Gesture.orientation == Ti.UI.LANDSCAPE_LEFT || Ti.Gesture.orientation == Ti.UI.LANDSCAPE_RIGHT ? "landscape" : "portrait" + orientation: Ti.Gesture.orientation == Ti.UI.LANDSCAPE_LEFT || Ti.Gesture.orientation == Ti.UI.LANDSCAPE_RIGHT ? 'landscape' : 'portrait' }; -if(OS_ANDROID) { +if (OS_ANDROID) { Alloy.Globals.Device.width = (Alloy.Globals.Device.width / (Alloy.Globals.Device.dpi / 160)); Alloy.Globals.Device.height = (Alloy.Globals.Device.height / (Alloy.Globals.Device.dpi / 160)); } -Alloy.Globals.dpToPx = function(dp) { +Alloy.Globals.dpToPx = function (dp) { return dp * (Ti.Platform.displayCaps.platformHeight / Alloy.Globals.Device.height); }; -Alloy.Globals.pxToDp = function(px) { +Alloy.Globals.pxToDp = function (px) { return px * (Alloy.Globals.Device.height / Ti.Platform.displayCaps.platformHeight); }; - -/////////////////////////////////////////////////////////////////////////////// +// ///////////////////////////////////////////////////////////////////////////// // // Orientation helpers // -/////////////////////////////////////////////////////////////////////////////// +// ///////////////////////////////////////////////////////////////////////////// /** * Helper to bind the orientation events to a controller. @@ -122,19 +117,19 @@ Alloy.Globals.pxToDp = function(px) { * * @param {Controllers} _controller The controller to bind the orientation events */ -Alloy.Globals.bindOrientationEvents = function(_controller) { - _controller.window.addEventListener("close", function() { - if(_controller.handleOrientation) { - Ti.App.removeEventListener("orientationChange", _controller.handleOrientation); +Alloy.Globals.bindOrientationEvents = function (_controller) { + _controller.window.addEventListener('close', function () { + if (_controller.handleOrientation) { + Ti.App.removeEventListener('orientationChange', _controller.handleOrientation); } }); - - _controller.window.addEventListener("open", function() { - Ti.App.addEventListener("orientationChange", function(_event) { - if(_controller.handleOrientation) { + + _controller.window.addEventListener('open', function () { + Ti.App.addEventListener('orientationChange', function (_event) { + if (_controller.handleOrientation) { _controller.handleOrientation(_event); } - + setViewsForOrientation(_controller); }); }); @@ -146,21 +141,21 @@ Alloy.Globals.bindOrientationEvents = function(_controller) { */ function orientationChange(_event) { // Ignore face-up, face-down and unknown orientation - if(_event.orientation === Titanium.UI.FACE_UP || _event.orientation === Titanium.UI.FACE_DOWN || _event.orientation === Titanium.UI.UNKNOWN) { + if (_event.orientation === Titanium.UI.FACE_UP || _event.orientation === Titanium.UI.FACE_DOWN || _event.orientation === Titanium.UI.UNKNOWN) { return; } - Alloy.Globals.Device.orientation = _event.source.landscape ? "landscape" : "portrait"; + Alloy.Globals.Device.orientation = _event.source.landscape ? 'landscape' : 'portrait'; /** * Fires an event for orientation change handling throughout the app * @event orientationChange */ - Ti.App.fireEvent("orientationChange", { + Ti.App.fireEvent('orientationChange', { orientation: Alloy.Globals.Device.orientation }); } -Ti.Gesture.addEventListener("orientationchange", orientationChange); +Ti.Gesture.addEventListener('orientationchange', orientationChange); /** * Update views for current orientation helper @@ -181,55 +176,53 @@ Ti.Gesture.addEventListener("orientationchange", orientationChange); * @param {Controllers} _controller */ function setViewsForOrientation(_controller) { - if(!Alloy.Globals.Device.orientation) { + if (!Alloy.Globals.Device.orientation) { return; } - + // Restricted the UI for portrait and landscape orientation - if(Alloy.Globals.Device.orientation == "portrait" || Alloy.Globals.Device.orientation == "landscape") { - for(var view in _controller.__views) { - if(_controller.__views[view][Alloy.Globals.Device.orientation] && typeof _controller.__views[view].applyProperties == "function") { + if (Alloy.Globals.Device.orientation == 'portrait' || Alloy.Globals.Device.orientation == 'landscape') { + for (var view in _controller.__views) { + if (_controller.__views[view][Alloy.Globals.Device.orientation] && typeof _controller.__views[view].applyProperties === 'function') { _controller.__views[view].applyProperties(_controller.__views[view][Alloy.Globals.Device.orientation]); - } else if(_controller.__views[view].wrapper && _controller.__views[view].wrapper[Alloy.Globals.Device.orientation] && typeof _controller.__views[view].applyProperties == "function") { + } else if (_controller.__views[view].wrapper && _controller.__views[view].wrapper[Alloy.Globals.Device.orientation] && typeof _controller.__views[view].applyProperties === 'function') { _controller.__views[view].applyProperties(_controller.__views[view].wrapper[Alloy.Globals.Device.orientation]); } } } } - - -/////////////////////////////////////////////////////////////////////////////// +// ///////////////////////////////////////////////////////////////////////////// // // Layout // -/////////////////////////////////////////////////////////////////////////////// +// ///////////////////////////////////////////////////////////////////////////// /** * Calculate element dimensions for given screen size * @param {Object} size containing width and height properties */ -Alloy.Globals.calculateElementDimensions = function(size) { - +Alloy.Globals.calculateElementDimensions = function (size) { + var layout = {}; - + // intro layout.intro = {}; - layout.intro.clapperTopContainerTop = size.height/2 - 43; - layout.intro.clapperTopContainerLeft = size.width/2 - 150; + layout.intro.clapperTopContainerTop = size.height / 2 - 43; + layout.intro.clapperTopContainerLeft = size.width / 2 - 150; layout.intro.clapperBottomTop = layout.intro.clapperTopContainerTop + 31; - layout.intro.clapperBottomLeft = size.width/2 - 50; + layout.intro.clapperBottomLeft = size.width / 2 - 50; layout.intro.activityViewTop = layout.intro.clapperTopContainerTop + 130; - + // options buttons layout.optionButtons = {}; layout.optionButtons.width = size.width / 3; - layout.optionButtons.height = layout.optionButtons.width * 0.3; - + layout.optionButtons.height = layout.optionButtons.width * 0.3; + // form layout.overlay = {}; layout.overlay.width = (size.width > 400) ? 360 : (size.width - 40); - + // lists layout.lists = {}; layout.lists.userCell = {}; @@ -237,7 +230,7 @@ Alloy.Globals.calculateElementDimensions = function(size) { layout.lists.userCell.imageLeft = -layout.lists.userCell.width / 6; layout.lists.userCell.imageWidth = Math.abs(layout.lists.userCell.imageLeft * 2) + layout.lists.userCell.width; layout.lists.userCell.imageHeight = Math.ceil(layout.lists.userCell.imageWidth * 9) / 16; - + layout.lists.cell = {}; layout.lists.cell.width = (size.width - 30) / 2; layout.lists.cell.height = layout.lists.cell.width; @@ -245,45 +238,45 @@ Alloy.Globals.calculateElementDimensions = function(size) { layout.lists.cell.imageLeft = -layout.lists.cell.width; layout.lists.cell.imageWidth = Math.abs(layout.lists.cell.imageLeft * 2) + layout.lists.cell.width; layout.lists.cell.imageHeight = Math.ceil(layout.lists.cell.imageWidth * 9) / 16; - + // movies list layout.list = {}; layout.list.row = {}; layout.list.row.width = size.width; layout.list.row.height = Math.ceil(size.width / 2.5); layout.list.row.imageHeight = Math.ceil((size.width * 9) / 16); - + // movie layout.movie = {}; layout.movie.backdropImageLeft = -size.width * 0.15; layout.movie.backdropImageWidth = size.width * 1.3; layout.movie.backdropImageHeight = Math.ceil((layout.movie.backdropImageWidth * 9) / 16); layout.movie.titleTop = layout.movie.backdropImageHeight * 0.5; - layout.movie.detailsTop = 15; + layout.movie.detailsTop = 15; layout.movie.posterWidth = Math.ceil(size.width / 3); - layout.movie.posterHeight = layout.movie.posterWidth * 1.5; - layout.movie.infoLeft = layout.movie.posterWidth + 15; + layout.movie.posterHeight = layout.movie.posterWidth * 1.5; + layout.movie.infoLeft = layout.movie.posterWidth + 15; layout.movie.infoWidth = size.width - layout.movie.infoLeft - 20; layout.movie.linkButtonTop = 40; layout.movie.linkButtonWidth = (layout.movie.infoWidth - 10) / 2; - if (OS_ANDROID) layout.movie.linkButtonWidth -= 1; - layout.movie.imdbButtonLeft = layout.movie.infoLeft + layout.movie.linkButtonWidth + 10; + if (OS_ANDROID) { layout.movie.linkButtonWidth -= 1; } + layout.movie.imdbButtonLeft = layout.movie.infoLeft + layout.movie.linkButtonWidth + 10; layout.movie.synopsisTop = 20; - + return layout; }; // Calculate element dimentsions Alloy.Globals.layout = Alloy.Globals.calculateElementDimensions(Alloy.Globals.Device); - + /** * Backdrop image size * Calculate best size image based on config */ Alloy.Globals.backdropImageSize = 'original'; -Alloy.Globals.setBackdropImageSize = function(sizes) { +Alloy.Globals.setBackdropImageSize = function (sizes) { Alloy.Globals.backdropImageSize = getBestImageSize(sizes, Alloy.Globals.Device.width); - Ti.API.info("Backdrop size for " + Alloy.Globals.Device.width + ": " + Alloy.Globals.backdropImageSize); + Ti.API.info('Backdrop size for ' + Alloy.Globals.Device.width + ': ' + Alloy.Globals.backdropImageSize); }; /** @@ -291,9 +284,9 @@ Alloy.Globals.setBackdropImageSize = function(sizes) { * Calculate best size image based on config */ Alloy.Globals.posterImageSize = 'original'; -Alloy.Globals.setPosterImageSize = function(sizes) { +Alloy.Globals.setPosterImageSize = function (sizes) { Alloy.Globals.posterImageSize = getBestImageSize(sizes, Alloy.Globals.layout.movie.posterWidth); - Ti.API.info("Poster size for " + Alloy.Globals.layout.movie.posterWidth + ": " + Alloy.Globals.posterImageSize); + Ti.API.info('Poster size for ' + Alloy.Globals.layout.movie.posterWidth + ': ' + Alloy.Globals.posterImageSize); }; /** @@ -304,7 +297,7 @@ Alloy.Globals.setPosterImageSize = function(sizes) { function getBestImageSize(sizes, target) { var bestSizeValue = 999999; var bestSize = 'original'; - for (var i=0; i 0 && !image_animation_interval) { @@ -218,15 +218,15 @@ function stopAnimatingImages() { } function animateImages() { - _.each(cells, function(cell, index){ - setTimeout(function() { + _.each(cells, function (cell, index) { + setTimeout(function () { animateCellImages(cell); - }, index*100); + }, index * 100); }); } function animateCellImages(cell) { - + var cellTop = cell.getView().rect.y; var cellBottom = cell.getView().rect.y + cell.getView().rect.height; var visibleTop = $.lists_container.contentOffset.y; @@ -234,9 +234,9 @@ function animateCellImages(cell) { visibleTop = Alloy.Globals.pxToDp(visibleTop); } var visibleBottom = visibleTop + $.lists_container.rect.height; - + var isVisible = (cellTop < visibleBottom) && (cellBottom > visibleTop); - + if (isVisible) { cell.animateImages(); } @@ -259,15 +259,15 @@ function addCellSeparator(offset) { /** * animate in view */ -$.animateIn = function() { +$.animateIn = function () { $.activity_indicator.hide(); var offset = cellOffset + Alloy.Globals.layout.lists.cell.height; if (OS_ANDROID) { offset = Alloy.Globals.dpToPx(offset + 20); } - $.lists_container.setContentOffset({x: 0, y: offset}, false); - + $.lists_container.setContentOffset({ x: 0, y: offset }, false); + $.lists_container.animate(Ti.UI.createAnimation({ opacity: 1, duration: 1000 @@ -282,22 +282,22 @@ $.animateIn = function() { * open list */ function openList(list) { - Alloy.Globals.Navigator.push("movies_list", - { - type: 'list', - id: list.id - }); + Alloy.Globals.Navigator.push('movies_list', + { + type: 'list', + id: list.id + }); } /** * open genre */ function openGenre(genre) { - Alloy.Globals.Navigator.push("movies_list", - { - type: 'genre', - id: genre.id - }); + Alloy.Globals.Navigator.push('movies_list', + { + type: 'genre', + id: genre.id + }); } /** @@ -306,11 +306,11 @@ function openGenre(genre) { function showOverlay(controller, options) { overlay_controller = Alloy.createController('/' + controller, options); var view = overlay_controller.getView(); - if (OS_IOS) view.transform = Ti.UI.create2DMatrix({scale: 2.0}); + if (OS_IOS) { view.transform = Ti.UI.create2DMatrix({ scale: 2.0 }); } $.window.add(view); var cells_animation = Ti.UI.createAnimation({ - transform: Ti.UI.create2DMatrix({scale: 0.7}), + transform: Ti.UI.create2DMatrix({ scale: 0.7 }), opacity: 0.5, curve: Ti.UI.ANIMATION_CURVE_EASE_OUT, duration: 500 @@ -318,7 +318,7 @@ function showOverlay(controller, options) { $.lists_container.animate(cells_animation); var view_animation = Ti.UI.createAnimation({ - transform: Ti.UI.create2DMatrix({scale: 1}), + transform: Ti.UI.create2DMatrix({ scale: 1 }), opacity: 1, curve: Ti.UI.ANIMATION_CURVE_EASE_OUT, duration: 500, @@ -326,12 +326,12 @@ function showOverlay(controller, options) { }); view.animate(view_animation); - overlay_controller.getView().addEventListener("click", hideOverlay); + overlay_controller.getView().addEventListener('click', hideOverlay); displaying_overlay = true; if (OS_ANDROID) { - android_back_event_listener = function(e) { + android_back_event_listener = function (e) { hideOverlay(); }; @@ -345,22 +345,22 @@ function showOverlay(controller, options) { function hideOverlay() { var view = overlay_controller.getView(); - view.removeEventListener("click", hideOverlay); + view.removeEventListener('click', hideOverlay); var view_animation = Ti.UI.createAnimation({ - transform: Ti.UI.create2DMatrix({scale: 2.0}), + transform: Ti.UI.create2DMatrix({ scale: 2.0 }), opacity: 0, curve: Ti.UI.ANIMATION_CURVE_EASE_OUT, duration: 500 }); view.animate(view_animation); - view_animation.addEventListener('complete', function(e) { + view_animation.addEventListener('complete', function (e) { $.window.remove(view); overlay_controller.destroy(); overlay_controller = null; }); var animation = Ti.UI.createAnimation({ - transform: Ti.UI.create2DMatrix({scale: 1.0}), + transform: Ti.UI.create2DMatrix({ scale: 1.0 }), opacity: 1, curve: Ti.UI.ANIMATION_CURVE_EASE_OUT, duration: 500, @@ -379,13 +379,13 @@ function displaySearch() { if (OS_ANDROID) { $.search_textfield.show(); } - + displaying_search = true; $.lists_container.scrollEnabled = false; - $.lists_container.contentOffset = {x: 0, y: 0}; + $.lists_container.contentOffset = { x: 0, y: 0 }; $.search_overlay.zIndex = 101; $.search_textfield.focus(); - + $.container.animate({ top: 0, duration: 250 @@ -407,25 +407,24 @@ function hideSearch() { duration: 250 }); if (OS_ANDROID) { - animation.addEventListener('complete', function(e){ - $.search_textfield.hide(); + animation.addEventListener('complete', function (e) { + $.search_textfield.hide(); }); } $.container.animate(animation); } - -/////////////////////////////////////////////////////////////////////////////// +// ///////////////////////////////////////////////////////////////////////////// // // event handlers // -/////////////////////////////////////////////////////////////////////////////// +// ///////////////////////////////////////////////////////////////////////////// /** * scrollview scroll event handler */ if (OS_IOS) { - $.lists_container.addEventListener('scroll', function(e){ + $.lists_container.addEventListener('scroll', function (e) { var offset = e.y; $.navbar.background_view.opacity = Math.max(Math.min(offset / (cellOffset / 2), 1), 0); }); @@ -434,30 +433,30 @@ if (OS_IOS) { /** * search overlay click event handler */ -$.search_overlay.addEventListener('click', function(e){ +$.search_overlay.addEventListener('click', function (e) { hideSearch(); }); /** * search textfield return event handler */ -$.search_textfield.addEventListener('return', function(e){ - Alloy.Globals.Navigator.push("movies_list", { +$.search_textfield.addEventListener('return', function (e) { + Alloy.Globals.Navigator.push('movies_list', { type: 'search', query: e.value }); - setTimeout(function(){ + setTimeout(function () { hideSearch(); }, 1000); }); -$.searchCell.getView().addEventListener("click", function(e){ +$.searchCell.getView().addEventListener('click', function (e) { $.lists_container.touchEnabled = false; - $.searchCell.animateClick(function() { + $.searchCell.animateClick(function () { Ti.Analytics.featureEvent('display:search'); displaySearch(); - setTimeout(function() { + setTimeout(function () { $.lists_container.touchEnabled = true; }, 1000); @@ -466,18 +465,18 @@ $.searchCell.getView().addEventListener("click", function(e){ function handleStaticCellClick(cell, overlay) { $.lists_container.touchEnabled = false; - cell.animateClick(function() { + cell.animateClick(function () { Ti.Analytics.featureEvent('display:' + overlay); showOverlay(overlay); - setTimeout(function() { + setTimeout(function () { $.lists_container.touchEnabled = true; }, 1000); }); } -$.aboutCell.getView().addEventListener("click", function(e) { +$.aboutCell.getView().addEventListener('click', function (e) { handleStaticCellClick($.aboutCell, 'about'); }); @@ -485,7 +484,7 @@ $.aboutCell.getView().addEventListener("click", function(e) { * iOS only: settings button click event handler */ if (OS_IOS) { - $.settingsCell.getView().addEventListener("click", function(e) { + $.settingsCell.getView().addEventListener('click', function (e) { handleStaticCellClick($.settingsCell, 'settings'); }); } @@ -501,14 +500,14 @@ if (OS_IOS) { Ti.App.addEventListener(Alloy.Globals.EVENT_PROPERTY_ENABLE_MOTION_ANIMATION_DID_CHANGE, registerForMotionUpdates); - $.window.addEventListener('focus', function(e){ + $.window.addEventListener('focus', function (e) { startAnimatingImages(); registerForMotionUpdates(); Ti.App.addEventListener('resume', registerForMotionUpdates); Ti.App.addEventListener('pause', unregisterForMotionUpdates); }); - $.window.addEventListener('blur', function(e){ + $.window.addEventListener('blur', function (e) { stopAnimatingImages(); unregisterForMotionUpdates(); Ti.App.removeEventListener('resume', registerForMotionUpdates); @@ -516,7 +515,7 @@ if (OS_IOS) { }); function registerForMotionUpdates() { - + if (!Ti.App.Properties.getBool(Alloy.Globals.PROPERTY_ENABLE_MOTION_ANIMATION)) { unregisterForMotionUpdates(); return; @@ -524,7 +523,7 @@ if (OS_IOS) { if (DeviceMotion.isDeviceMotionAvailable() && !DeviceMotion.isDeviceMotionActive()) { DeviceMotion.setDeviceMotionUpdateInterval(50); - DeviceMotion.startDeviceMotionUpdates(function(e) { + DeviceMotion.startDeviceMotionUpdates(function (e) { if (e.success) { // Ti.API.info("picth: " + e.attitude.pitch); // Ti.API.info("roll: " + e.attitude.roll); @@ -533,11 +532,11 @@ if (OS_IOS) { var imageTop = Alloy.Globals.layout.lists.cell.imageTop + (15 * e.attitude.pitch); var imageLeft = Alloy.Globals.layout.lists.cell.imageLeft + (15 * e.attitude.roll); - for (var i=0, num_cells=cells.length; i 0) ? hours + "h " : ""; - duration += (minutes > 9) ? minutes + "m" : "0" + minutes + "m"; + + var hours = Math.floor(minutes / 60); + minutes -= (hours * 60); + var duration = (hours > 0) ? hours + 'h ' : ''; + duration += (minutes > 9) ? minutes + 'm' : '0' + minutes + 'm'; return duration; } @@ -133,17 +133,17 @@ function durationString(minutes) { */ function animateIn() { images_loaded++; - if (images_loaded < 2) return; - + if (images_loaded < 2) { return; } + $.activity_indicator.hide(); - + var background_animation = Ti.UI.createAnimation({ opacity: 1, duration: 1000, curve: Titanium.UI.ANIMATION_CURVE_EASE_OUT }); $.background_imageview.animate(background_animation); - + var details_animation = Ti.UI.createAnimation({ opacity: 1, duration: 500, @@ -153,23 +153,21 @@ function animateIn() { $.details_scrollview.animate(details_animation); } - - -/////////////////////////////////////////////////////////////////////////////// +// ///////////////////////////////////////////////////////////////////////////// // // event handlers // -/////////////////////////////////////////////////////////////////////////////// +// ///////////////////////////////////////////////////////////////////////////// /** * window open */ -$.window.addEventListener("open", init); +$.window.addEventListener('open', init); /** * background imageview load */ -$.background_imageview.addEventListener('load', function(e) { +$.background_imageview.addEventListener('load', function (e) { $.background_gradient_view.height = e.source.rect.height + 2; // hacky :( animateIn(); }); @@ -182,26 +180,26 @@ $.poster_imageview.addEventListener('load', animateIn); /** * scrollview scroll */ -$.details_scrollview.addEventListener('scroll', function(e) { - +$.details_scrollview.addEventListener('scroll', function (e) { + var opacity = 1.0; var offset = e.y; - + if (offset <= 0) { - + var height = Alloy.Globals.layout.movie.backdropImageHeight - offset; var scale = height / Alloy.Globals.layout.movie.backdropImageHeight; - - var transform = Ti.UI.create2DMatrix({scale: scale}); - transform = transform.translate(0, -offset/(2*scale)); - + + var transform = Ti.UI.create2DMatrix({ scale: scale }); + transform = transform.translate(0, -offset / (2 * scale)); + $.background_imageview.transform = $.background_gradient_view.transform = transform; $.background_imageview.opacity = 1; - + } else if (offset > 0) { - + opacity = Math.max(1 - (offset / 200), 0.5); - $.background_imageview.opacity = opacity; + $.background_imageview.opacity = opacity; } }); @@ -209,13 +207,13 @@ $.details_scrollview.addEventListener('scroll', function(e) { /** * play button click */ -$.play_button.addEventListener('click', function(e){ +$.play_button.addEventListener('click', function (e) { if (can_play_trailer) { Ti.Analytics.featureEvent('view:trailer'); $.play_button.touchEnabled = false; - animation.flash($.poster_overlay_view, function(){ + animation.flash($.poster_overlay_view, function () { yt.play(movie.trailer.source); - setTimeout(function(){ + setTimeout(function () { $.play_button.touchEnabled = true; }, 2000); }); @@ -225,7 +223,7 @@ $.play_button.addEventListener('click', function(e){ /** * website button click */ -$.website_button.addEventListener('click', function(e){ +$.website_button.addEventListener('click', function (e) { if (movie.homepage) { Ti.Analytics.featureEvent('open:movie.website'); Ti.Platform.openURL(movie.homepage); @@ -235,7 +233,7 @@ $.website_button.addEventListener('click', function(e){ /** * IMDB button click */ -$.imdb_button.addEventListener('click', function(e){ +$.imdb_button.addEventListener('click', function (e) { if (movie.imdb_id) { Ti.Analytics.featureEvent('open:movie.imdb'); Ti.Platform.openURL(IMDB_BASE_URL + movie.imdb_id); diff --git a/app/controllers/movies_list.js b/app/controllers/movies_list.js index c9cc17a..4f5b11d 100644 --- a/app/controllers/movies_list.js +++ b/app/controllers/movies_list.js @@ -1,6 +1,6 @@ /** * Movies - * + * * @copyright * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. * @@ -21,38 +21,35 @@ var tableview_cell_offset = 0; var that = this; - /** * init */ function init() { - - $.window.removeEventListener("open", init); - + + $.window.removeEventListener('open', init); + // not required when loading local data // $.activity_indicator.show(); - + var diff = Alloy.Globals.layout.list.row.imageHeight - Alloy.Globals.layout.list.row.height; tableview_offset_per_px = diff / $.tableview.rect.height; tableview_cell_offset = tableview_offset_per_px * Alloy.Globals.layout.list.row.height; - + if (args.type == 'search') { Ti.Analytics.featureEvent('view:search_results'); Ti.Analytics.featureEvent('view:search_results.' + args.query); - search(args.query); + search(args.query); } else { Ti.Analytics.featureEvent('view:' + args.type); Ti.Analytics.featureEvent('view:' + args.type + '.' + args.id); fetchCollection(args.type, args.id); } - + if (OS_IOS) { $.navbar.background_view.opacity = 0; } - - -} +} /** * fetch collection @@ -60,14 +57,14 @@ function init() { * @param {String} id */ function fetchCollection(type, id) { - - Data['movies_get_' + type](function(error, e){ - if (!error) { + + Data['movies_get_' + type](function (error, e) { + if (!error) { $.navbar.title_label.text = e.title.toUpperCase(); movies = e.movies; populateMovies(movies); } else { - Ti.API.error("Error: " + JSON.stringify(JSON.parse(e), null, 4)); + Ti.API.error('Error: ' + JSON.stringify(JSON.parse(e), null, 4)); } }); } @@ -77,9 +74,9 @@ function fetchCollection(type, id) { * @param {String} query */ function search(query) { - - $.navbar.title_label.text = "Results for '" + query + "'"; - Data.movies_search(query, function(error, e){ + + $.navbar.title_label.text = 'Results for \'' + query + '\''; + Data.movies_search(query, function (error, e) { if (!error) { movies = e; populateMovies(movies); @@ -94,20 +91,20 @@ function search(query) { * @param {Array} movies */ function populateMovies(movies) { - + tableView_data = []; var tableView_rows = []; - - for (var i=0; i 0 && height <= Alloy.Globals.deviceHeight) { - + var diff = Alloy.Globals.layout.list.row.imageHeight - Alloy.Globals.layout.list.row.height; tableview_offset_per_px = diff / height; tableview_cell_offset = tableview_offset_per_px * Alloy.Globals.layout.list.row.height; - + $.tableview.removeEventListener('postlayout', tableviewPostLayout); } }); - + /** * tableview scroll */ - $.tableview.addEventListener('scroll', function(e) { + $.tableview.addEventListener('scroll', function (e) { var offset = e.contentOffset.y; updateTableView(offset); }); - - })(); - + + }()); + /** * updateTableView - * + * * @param {Number} offset */ function updateTableView(offset) { - for (var i=0, num_rows=tableView_data.length; i= _images.length - 1) ? 0 : _currentImageIndex + 1; var nextImageView = (_currentImageView == 'imageview') ? 'imageview1' : 'imageview'; @@ -39,19 +39,19 @@ $.animateImages = function() { _currentImageView = nextImageView; }; -$.animateClick = function(callback) { +$.animateClick = function (callback) { animation.flash($.overlay_view, callback); }; if (OS_ANDROID) { - $.imageview.addEventListener('load', function(e){ + $.imageview.addEventListener('load', function (e) { $.imageview.animate({ opacity: 1, duration: 1000 }); }); - - $.imageview1.addEventListener('load', function(e){ + + $.imageview1.addEventListener('load', function (e) { $.imageview1.animate({ opacity: 1, duration: 1000 @@ -59,7 +59,7 @@ if (OS_ANDROID) { }); } -$.title_label.addEventListener('postlayout', function(e){ +$.title_label.addEventListener('postlayout', function (e) { if ($.title_label.text.indexOf(' ') == -1) { if (OS_IOS) { $.title_label.minimumFontSize = $.title_label.font.size; diff --git a/app/controllers/views/list_static_cell.js b/app/controllers/views/list_static_cell.js index ffbcfe3..3afa426 100644 --- a/app/controllers/views/list_static_cell.js +++ b/app/controllers/views/list_static_cell.js @@ -2,6 +2,6 @@ var animation = require('/animation'); var args = arguments[0] || {}; -$.animateClick = function(callback) { +$.animateClick = function (callback) { animation.flash($.overlay_view, callback); }; diff --git a/app/controllers/views/movies_list_cell.js b/app/controllers/views/movies_list_cell.js index ab58588..4ca7265 100644 --- a/app/controllers/views/movies_list_cell.js +++ b/app/controllers/views/movies_list_cell.js @@ -1,5 +1,5 @@ var animation = require('/animation'); -exports.animateClick = function(callback) { - animation.flash($.overlay_view, callback); +exports.animateClick = function (callback) { + animation.flash($.overlay_view, callback); }; diff --git a/app/controllers/views/navbar.js b/app/controllers/views/navbar.js index fde1223..6fb4fab 100644 --- a/app/controllers/views/navbar.js +++ b/app/controllers/views/navbar.js @@ -1,6 +1,6 @@ if (OS_IOS) { - $.back_button.addEventListener('click', function(e) { + $.back_button.addEventListener('click', function (e) { Alloy.Globals.Navigator.pop(); }); } diff --git a/app/lib/animation.js b/app/lib/animation.js index 7d27e6d..9a68046 100644 --- a/app/lib/animation.js +++ b/app/lib/animation.js @@ -1,6 +1,6 @@ /** * Movies - * + * * @copyright * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. * @@ -9,24 +9,24 @@ * Please see the LICENSE included with this distribution for details. */ -exports.flash = function(view, callback) { +exports.flash = function (view, callback) { var in_animation = Ti.UI.createAnimation({ opacity: 0.7, curve: Ti.UI.ANIMATION_CURVE_EASE_IN, duration: 100 }); - in_animation.addEventListener('complete', function(e){ + in_animation.addEventListener('complete', function () { var out_animation = Ti.UI.createAnimation({ opacity: 0, curve: Ti.UI.ANIMATION_CURVE_EASE_OUT, - duration: 300 + duration: 300 }); - out_animation.addEventListener('complete', function(e){ + out_animation.addEventListener('complete', function () { callback(); }); view.animate(out_animation); }); view.animate(in_animation); - -}; \ No newline at end of file + +}; diff --git a/app/lib/data.js b/app/lib/data.js index 69a2853..d41031c 100644 --- a/app/lib/data.js +++ b/app/lib/data.js @@ -1,6 +1,6 @@ /** * Movies - * + * * @copyright * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. * @@ -11,8 +11,8 @@ /** * Load JSON file - * @param {String} name - * @param {Function} callback + * @param {String} name The name of the JSON file + * @param {Function} callback The callback invoked once parse */ function loadJsonFile(name, callback) { var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, '/data/' + name + '.json'); @@ -21,41 +21,41 @@ function loadJsonFile(name, callback) { var dataSrc = file.read(); var data = JSON.parse(dataSrc); callback(null, data); - return; + return; } - callback("Error loading JSON file '" + name + "'"); + callback('Error loading JSON file \'' + name + '\''); } /** - * Data + * Data */ var Data = { - - get_config: function(callback) { + + get_config: function (callback) { loadJsonFile('config', callback); }, - - movies_get_lists: function(callback) { + + movies_get_lists: function (callback) { loadJsonFile('lists', callback); }, - - movies_get_list: function(callback) { + + movies_get_list: function (callback) { loadJsonFile('list', callback); }, - - movies_get_genres: function(callback) { + + movies_get_genres: function (callback) { loadJsonFile('genres', callback); }, - - movies_get_genre: function(callback) { + + movies_get_genre: function (callback) { loadJsonFile('genre', callback); }, - - movies_search: function(query, callback) { - loadJsonFile('list', function(error, e){ + + movies_search: function (query, callback) { + loadJsonFile('list', function (error, e) { if (!error) { - var results = _.filter(e.movies, function(movie){ + var results = _.filter(e.movies, function (movie) { return (new RegExp(query, 'i')).test(movie.title); }); callback(null, results); @@ -64,8 +64,8 @@ var Data = { } }); }, - - movies_get_movie: function(callback) { + + movies_get_movie: function (callback) { loadJsonFile('movie', callback); } }; diff --git a/app/lib/navigation.js b/app/lib/navigation.js index e823a0d..9517646 100644 --- a/app/lib/navigation.js +++ b/app/lib/navigation.js @@ -1,6 +1,6 @@ /** * Movies - * + * * @copyright * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. * @@ -27,96 +27,96 @@ * @constructor */ function Navigation(_args) { - var that = this; + var that = this; - _args = _args || {}; + _args = _args || {}; - /** + /** * The parent navigation window (iOS only) * @type {Object} */ - this.parent = _args.parent; - - this.controllers = [], - this.currentController = null; - this.currentControllerArguments = {}; + this.parent = _args.parent; + + this.controllers = [], + this.currentController = null; + this.currentControllerArguments = {}; - /** + /** * Open a screen controller * @param {String} _controller * @param {Object} _controllerArguments The arguments for the controller (optional) * @return {Controllers} Returns the new controller */ - this.push = function(_controller, _controllerArguments) { - if (typeof _controller == "string") { + this.push = function (_controller, _controllerArguments) { + if (typeof _controller === 'string') { var controller = Alloy.createController('/' + _controller, _controllerArguments); } else { var controller = _controller; } - that.currentController = controller; - that.currentControllerArguments = _controllerArguments; + that.currentController = controller; + that.currentControllerArguments = _controllerArguments; that.controllers.push(controller); - - if(OS_IOS) { - that.parent.openWindow(controller.window); - } else { - controller.window.open(); - } - - return controller; - }, - - this.pop = function() { - + + if (OS_IOS) { + that.parent.openWindow(controller.window); + } else { + controller.window.open(); + } + + return controller; + }, + + this.pop = function () { + var controller = that.controllers.pop(); var window = controller.window; - - if(OS_IOS) { - that.parent.closeWindow(window); - } else { + + if (OS_IOS) { + that.parent.closeWindow(window); + } else { window.close(); - } - - controller.destroy(); - }, - - this.openModal = function(_controller, _controllerArguments) { - var controller = Alloy.createController('/' + _controller, _controllerArguments); - that.currentController = controller; - that.currentControllerArguments = _controllerArguments; - - if(OS_IOS) { - controller.window.open({ - modal : true, - animated: false - }); - } else { - controller.window.addEventListener('open', function(e) { - that.setActionBarStyle(controller.window); - }); - controller.window.open(); - } - - return controller; - }, - - this.closeModal = function(_controller) { - - if(OS_IOS) { - _controller.window.close(); - _controller.window = null; - } else { - _controller.window.close(); - _controller.window = null; - } - - _controller.destroy(); - _controller = null; - }; + } + + controller.destroy(); + }, + + this.openModal = function (_controller, _controllerArguments) { + var controller = Alloy.createController('/' + _controller, _controllerArguments); + that.currentController = controller; + that.currentControllerArguments = _controllerArguments; + + if (OS_IOS) { + controller.window.open({ + modal: true, + animated: false + }); + } else { + controller.window.addEventListener('open', function (e) { + that.setActionBarStyle(controller.window); + }); + controller.window.open(); + } + + return controller; + }, + + this.closeModal = function (_controller) { + + if (OS_IOS) { + _controller.window.close(); + _controller.window = null; + } else { + _controller.window.close(); + _controller.window = null; + } + + _controller.destroy(); + _controller = null; + }; } // Calling this module function returns a new navigation instance -module.exports = function(_args) { - return new Navigation(_args); +module.exports = function (_args) { + return new Navigation(_args); }; diff --git a/app/lib/tests/should.js b/app/lib/tests/should.js index 571b763..5160f18 100644 --- a/app/lib/tests/should.js +++ b/app/lib/tests/should.js @@ -1,3 +1,5 @@ +/* eslint-disable */ + /** * should - test framework agnostic BDD-style assertions * @version v4.0.4 @@ -5,125 +7,122 @@ * @link https://github.com/shouldjs/should.js * @license MIT */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Should=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o * MIT Licensed */ -// Taken from node's assert module, because it sucks -// and exposes next to nothing useful. -var util = _dereq_('./util'); - -module.exports = _deepEqual; - -var pSlice = Array.prototype.slice; - -function _deepEqual(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - - } else if (util.isBuffer(actual) && util.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (util.isDate(actual) && util.isDate(expected)) { - return actual.getTime() === expected.getTime(); - - // 7.3 If the expected value is a RegExp object, the actual value is - // equivalent if it is also a RegExp object with the same source and - // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). - } else if (util.isRegExp(actual) && util.isRegExp(expected)) { - return actual.source === expected.source && - actual.global === expected.global && - actual.multiline === expected.multiline && - actual.lastIndex === expected.lastIndex && - actual.ignoreCase === expected.ignoreCase; - - // 7.4. Other pairs that do not both pass typeof value == 'object', - // equivalence is determined by ==. - } else if (!util.isObject(actual) && !util.isObject(expected)) { - return actual == expected; - - // 7.5 For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical 'prototype' property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } -} - - -function objEquiv (a, b) { - if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) - return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; - //~~~I've managed to break Object.keys through screwy arguments passing. - // Converting to array solves the problem. - if (util.isArguments(a)) { - if (!util.isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return _deepEqual(a, b); - } - try{ - var ka = Object.keys(a), - kb = Object.keys(b), - key, i; - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - // having the same number of owned properties (keys incorporates - // hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!_deepEqual(a[key], b[key])) return false; - } - return true; -} - -},{"./util":15}],2:[function(_dereq_,module,exports){ -/*! + // Taken from node's assert module, because it sucks + // and exposes next to nothing useful. + var util = _dereq_('./util'); + + module.exports = _deepEqual; + + var pSlice = Array.prototype.slice; + + function _deepEqual(actual, expected) { + // 7.1. All identical values are equivalent, as determined by ===. + if (actual === expected) { + return true; + + } else if (util.isBuffer(actual) && util.isBuffer(expected)) { + if (actual.length != expected.length) { return false; } + + for (var i = 0; i < actual.length; i++) { + if (actual[i] !== expected[i]) { return false; } + } + + return true; + + // 7.2. If the expected value is a Date object, the actual value is + // equivalent if it is also a Date object that refers to the same time. + } else if (util.isDate(actual) && util.isDate(expected)) { + return actual.getTime() === expected.getTime(); + + // 7.3 If the expected value is a RegExp object, the actual value is + // equivalent if it is also a RegExp object with the same source and + // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). + } else if (util.isRegExp(actual) && util.isRegExp(expected)) { + return actual.source === expected.source + && actual.global === expected.global + && actual.multiline === expected.multiline + && actual.lastIndex === expected.lastIndex + && actual.ignoreCase === expected.ignoreCase; + + // 7.4. Other pairs that do not both pass typeof value == 'object', + // equivalence is determined by ==. + } else if (!util.isObject(actual) && !util.isObject(expected)) { + return actual == expected; + + // 7.5 For all other Object pairs, including Array objects, equivalence is + // determined by having the same number of owned properties (as verified + // with Object.prototype.hasOwnProperty.call), the same set of keys + // (although not necessarily the same order), equivalent values for every + // corresponding key, and an identical 'prototype' property. Note: this + // accounts for both named and indexed properties on Arrays. + } else { + return objEquiv(actual, expected); + } + } + + function objEquiv (a, b) { + if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) { return false; } + // an identical 'prototype' property. + if (a.prototype !== b.prototype) { return false; } + // ~~~I've managed to break Object.keys through screwy arguments passing. + // Converting to array solves the problem. + if (util.isArguments(a)) { + if (!util.isArguments(b)) { + return false; + } + a = pSlice.call(a); + b = pSlice.call(b); + return _deepEqual(a, b); + } + try { + var ka = Object.keys(a), + kb = Object.keys(b), + key, i; + } catch (e) { // happens when one is a string literal and the other isn't + return false; + } + // having the same number of owned properties (keys incorporates + // hasOwnProperty) + if (ka.length != kb.length) { return false; } + // the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + // ~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) { return false; } + } + // equivalent values for every corresponding key, and + // ~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!_deepEqual(a[key], b[key])) { return false; } + } + return true; + } + + }, { './util': 15 } ], 2: [ function (_dereq_, module, exports) { + /* ! * Should * Copyright(c) 2010-2014 TJ Holowaychuk * MIT Licensed */ -var util = _dereq_('../util') - , assert = _dereq_('assert') - , AssertionError = assert.AssertionError; + var util = _dereq_('../util'), + assert = _dereq_('assert'), + AssertionError = assert.AssertionError; -module.exports = function(should) { - var i = should.format; + module.exports = function (should) { + var i = should.format; - /** + /** * Expose assert to should * * This allows you to do things like below @@ -132,24 +131,24 @@ module.exports = function(should) { * should.equal(foo.bar, undefined); * */ - util.merge(should, assert); + util.merge(should, assert); - /** + /** * Assert _obj_ exists, with optional message. * * @param {*} obj * @param {String} [msg] * @api public */ - should.exist = should.exists = function(obj, msg) { - if(null == obj) { - throw new AssertionError({ - message: msg || ('expected ' + i(obj) + ' to exist'), stackStartFunction: should.exist - }); - } - }; - - /** + should.exist = should.exists = function (obj, msg) { + if (obj == null) { + throw new AssertionError({ + message: msg || ('expected ' + i(obj) + ' to exist'), stackStartFunction: should.exist + }); + } + }; + + /** * Asserts _obj_ does not exist, with optional message. * * @param {*} obj @@ -157,1406 +156,1376 @@ module.exports = function(should) { * @api public */ - should.not = {}; - should.not.exist = should.not.exists = function(obj, msg) { - if(null != obj) { - throw new AssertionError({ - message: msg || ('expected ' + i(obj) + ' to not exist'), stackStartFunction: should.not.exist - }); - } - }; -}; -},{"../util":15,"assert":16}],3:[function(_dereq_,module,exports){ -/*! + should.not = {}; + should.not.exist = should.not.exists = function (obj, msg) { + if (obj != null) { + throw new AssertionError({ + message: msg || ('expected ' + i(obj) + ' to not exist'), stackStartFunction: should.not.exist + }); + } + }; + }; + }, { '../util': 15, assert: 16 } ], 3: [ function (_dereq_, module, exports) { + /* ! * Should * Copyright(c) 2010-2014 TJ Holowaychuk * MIT Licensed */ -module.exports = function(should, Assertion) { - Assertion.add('true', function() { - this.is.exactly(true); - }, true); + module.exports = function (should, Assertion) { + Assertion.add('true', function () { + this.is.exactly(true); + }, true); - Assertion.alias('true', 'True'); + Assertion.alias('true', 'True'); - Assertion.add('false', function() { - this.is.exactly(false); - }, true); + Assertion.add('false', function () { + this.is.exactly(false); + }, true); - Assertion.alias('false', 'False'); + Assertion.alias('false', 'False'); - Assertion.add('ok', function() { - this.params = { operator: 'to be truthy' }; + Assertion.add('ok', function () { + this.params = { operator: 'to be truthy' }; - this.assert(this.obj); - }, true); -}; -},{}],4:[function(_dereq_,module,exports){ -/*! + this.assert(this.obj); + }, true); + }; + }, {} ], 4: [ function (_dereq_, module, exports) { + /* ! * Should * Copyright(c) 2010-2014 TJ Holowaychuk * MIT Licensed */ -module.exports = function(should, Assertion) { - - function addLink(name) { - Object.defineProperty(Assertion.prototype, name, { - get: function() { - return this; - }, - enumerable: true - }); - } - - ['an', 'of', 'a', 'and', 'be', 'have', 'with', 'is', 'which', 'the'].forEach(addLink); -}; -},{}],5:[function(_dereq_,module,exports){ -/*! + module.exports = function (should, Assertion) { + + function addLink(name) { + Object.defineProperty(Assertion.prototype, name, { + get: function () { + return this; + }, + enumerable: true + }); + } + + [ 'an', 'of', 'a', 'and', 'be', 'have', 'with', 'is', 'which', 'the' ].forEach(addLink); + }; + }, {} ], 5: [ function (_dereq_, module, exports) { + /* ! * Should * Copyright(c) 2010-2014 TJ Holowaychuk * MIT Licensed */ -var util = _dereq_('../util'), - eql = _dereq_('../eql'); - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('containEql', function(other) { - this.params = { operator: 'to contain ' + i(other) }; - var obj = this.obj; - if(util.isArray(obj)) { - this.assert(obj.some(function(item) { - return eql(item, other); - })); - } else if(util.isString(obj)) { - // expect obj to be string - this.assert(obj.indexOf(String(other)) >= 0); - } else if(util.isObject(obj)) { - // object contains object case - util.forOwn(other, function(value, key) { - obj.should.have.property(key, value); - }); - } else { - //other uncovered cases - this.assert(false); - } - }); - - Assertion.add('containDeepOrdered', function(other) { - this.params = { operator: 'to contain ' + i(other) }; - - var obj = this.obj; - if(util.isArray(obj)) { - if(util.isArray(other)) { - var otherIdx = 0; - obj.forEach(function(item) { - try { - should(item).not.be.Null.and.containDeep(other[otherIdx]); - otherIdx++; - } catch(e) { - if(e instanceof should.AssertionError) { - return; - } - throw e; - } - }, this); - - this.assert(otherIdx == other.length); - //search array contain other as sub sequence - } else { - this.assert(false); - } - } else if(util.isString(obj)) {// expect other to be string - this.assert(obj.indexOf(String(other)) >= 0); - } else if(util.isObject(obj)) {// object contains object case - if(util.isObject(other)) { - util.forOwn(other, function(value, key) { - should(obj[key]).not.be.Null.and.containDeep(value); - }); - } else {//one of the properties contain value - this.assert(false); - } - } else { - this.eql(other); - } - }); - - Assertion.add('containDeep', function(other) { - this.params = { operator: 'to contain ' + i(other) }; - - var obj = this.obj; - if(util.isArray(obj)) { - if(util.isArray(other)) { - var usedKeys = {}; - other.forEach(function(otherItem) { - this.assert(obj.some(function(item, index) { - if(index in usedKeys) return false; - - try { - should(item).not.be.Null.and.containDeep(otherItem); - usedKeys[index] = true; - return true; - } catch(e) { - if(e instanceof should.AssertionError) { - return false; - } - throw e; - } - })); - }, this); - - } else { - this.assert(false); - } - } else if(util.isString(obj)) {// expect other to be string - this.assert(obj.indexOf(String(other)) >= 0); - } else if(util.isObject(obj)) {// object contains object case - if(util.isObject(other)) { - util.forOwn(other, function(value, key) { - should(obj[key]).not.be.Null.and.containDeep(value); - }); - } else {//one of the properties contain value - this.assert(false); - } - } else { - this.eql(other); - } - }); - -}; - -},{"../eql":1,"../util":15}],6:[function(_dereq_,module,exports){ -/*! + var util = _dereq_('../util'), + eql = _dereq_('../eql'); + + module.exports = function (should, Assertion) { + var i = should.format; + + Assertion.add('containEql', function (other) { + this.params = { operator: 'to contain ' + i(other) }; + var obj = this.obj; + if (util.isArray(obj)) { + this.assert(obj.some(function (item) { + return eql(item, other); + })); + } else if (util.isString(obj)) { + // expect obj to be string + this.assert(obj.indexOf(String(other)) >= 0); + } else if (util.isObject(obj)) { + // object contains object case + util.forOwn(other, function (value, key) { + obj.should.have.property(key, value); + }); + } else { + // other uncovered cases + this.assert(false); + } + }); + + Assertion.add('containDeepOrdered', function (other) { + this.params = { operator: 'to contain ' + i(other) }; + + var obj = this.obj; + if (util.isArray(obj)) { + if (util.isArray(other)) { + var otherIdx = 0; + obj.forEach(function (item) { + try { + should(item).not.be.Null.and.containDeep(other[otherIdx]); + otherIdx++; + } catch (e) { + if (e instanceof should.AssertionError) { + return; + } + throw e; + } + }, this); + + this.assert(otherIdx == other.length); + // search array contain other as sub sequence + } else { + this.assert(false); + } + } else if (util.isString(obj)) { // expect other to be string + this.assert(obj.indexOf(String(other)) >= 0); + } else if (util.isObject(obj)) { // object contains object case + if (util.isObject(other)) { + util.forOwn(other, function (value, key) { + should(obj[key]).not.be.Null.and.containDeep(value); + }); + } else { // one of the properties contain value + this.assert(false); + } + } else { + this.eql(other); + } + }); + + Assertion.add('containDeep', function (other) { + this.params = { operator: 'to contain ' + i(other) }; + + var obj = this.obj; + if (util.isArray(obj)) { + if (util.isArray(other)) { + var usedKeys = {}; + other.forEach(function (otherItem) { + this.assert(obj.some(function (item, index) { + if (index in usedKeys) { return false; } + + try { + should(item).not.be.Null.and.containDeep(otherItem); + usedKeys[index] = true; + return true; + } catch (e) { + if (e instanceof should.AssertionError) { + return false; + } + throw e; + } + })); + }, this); + + } else { + this.assert(false); + } + } else if (util.isString(obj)) { // expect other to be string + this.assert(obj.indexOf(String(other)) >= 0); + } else if (util.isObject(obj)) { // object contains object case + if (util.isObject(other)) { + util.forOwn(other, function (value, key) { + should(obj[key]).not.be.Null.and.containDeep(value); + }); + } else { // one of the properties contain value + this.assert(false); + } + } else { + this.eql(other); + } + }); + + }; + + }, { '../eql': 1, '../util': 15 } ], 6: [ function (_dereq_, module, exports) { + /* ! * Should * Copyright(c) 2010-2014 TJ Holowaychuk * MIT Licensed */ -var eql = _dereq_('../eql'); + var eql = _dereq_('../eql'); -module.exports = function(should, Assertion) { - Assertion.add('eql', function(val, description) { - this.params = { operator: 'to equal', expected: val, showDiff: true, message: description }; + module.exports = function (should, Assertion) { + Assertion.add('eql', function (val, description) { + this.params = { operator: 'to equal', expected: val, showDiff: true, message: description }; - this.assert(eql(val, this.obj)); - }); + this.assert(eql(val, this.obj)); + }); - Assertion.add('equal', function(val, description) { - this.params = { operator: 'to be', expected: val, showDiff: true, message: description }; + Assertion.add('equal', function (val, description) { + this.params = { operator: 'to be', expected: val, showDiff: true, message: description }; - this.assert(val === this.obj); - }); + this.assert(val === this.obj); + }); - Assertion.alias('equal', 'exactly'); -}; -},{"../eql":1}],7:[function(_dereq_,module,exports){ -/*! + Assertion.alias('equal', 'exactly'); + }; + }, { '../eql': 1 } ], 7: [ function (_dereq_, module, exports) { + /* ! * Should * Copyright(c) 2010-2014 TJ Holowaychuk * MIT Licensed */ -var util = _dereq_('../util'); - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('throw', function(message, properties) { - var fn = this.obj - , err = {} - , errorInfo = '' - , thrown = false; - - var errorMatched = true; - - try { - fn(); - } catch(e) { - thrown = true; - err = e; - } - - if(thrown) { - if(message) { - if('string' == typeof message) { - errorMatched = message == err.message; - } else if(message instanceof RegExp) { - errorMatched = message.test(err.message); - } else if('function' == typeof message) { - errorMatched = err instanceof message; - } else if(util.isObject(message)) { - try { - err.should.match(message); - } catch(e) { - if(e instanceof should.AssertionError) { - errorInfo = ": " + e.message; - errorMatched = false; - } else { - throw e; - } - } - } - - if(!errorMatched) { - if('string' == typeof message || message instanceof RegExp) { - errorInfo = " with a message matching " + i(message) + ", but got '" + err.message + "'"; - } else if('function' == typeof message) { - errorInfo = " of type " + util.functionName(message) + ", but got " + util.functionName(err.constructor); - } - } else if('function' == typeof message && properties) { - try { - err.should.match(properties); - } catch(e) { - if(e instanceof should.AssertionError) { - errorInfo = ": " + e.message; - errorMatched = false; - } else { - throw e; - } - } - } - } else { - errorInfo = " (got " + i(err) + ")"; - } - } - - this.params = { operator: 'to throw exception' + errorInfo }; - - this.assert(thrown); - this.assert(errorMatched); - }); - - Assertion.alias('throw', 'throwError'); -}; -},{"../util":15}],8:[function(_dereq_,module,exports){ -/*! + var util = _dereq_('../util'); + + module.exports = function (should, Assertion) { + var i = should.format; + + Assertion.add('throw', function (message, properties) { + var fn = this.obj, + err = {}, + errorInfo = '', + thrown = false; + + var errorMatched = true; + + try { + fn(); + } catch (e) { + thrown = true; + err = e; + } + + if (thrown) { + if (message) { + if (typeof message === 'string') { + errorMatched = message == err.message; + } else if (message instanceof RegExp) { + errorMatched = message.test(err.message); + } else if (typeof message === 'function') { + errorMatched = err instanceof message; + } else if (util.isObject(message)) { + try { + err.should.match(message); + } catch (e) { + if (e instanceof should.AssertionError) { + errorInfo = ': ' + e.message; + errorMatched = false; + } else { + throw e; + } + } + } + + if (!errorMatched) { + if (typeof message === 'string' || message instanceof RegExp) { + errorInfo = ' with a message matching ' + i(message) + ', but got \'' + err.message + '\''; + } else if (typeof message === 'function') { + errorInfo = ' of type ' + util.functionName(message) + ', but got ' + util.functionName(err.constructor); + } + } else if (typeof message === 'function' && properties) { + try { + err.should.match(properties); + } catch (e) { + if (e instanceof should.AssertionError) { + errorInfo = ': ' + e.message; + errorMatched = false; + } else { + throw e; + } + } + } + } else { + errorInfo = ' (got ' + i(err) + ')'; + } + } + + this.params = { operator: 'to throw exception' + errorInfo }; + + this.assert(thrown); + this.assert(errorMatched); + }); + + Assertion.alias('throw', 'throwError'); + }; + }, { '../util': 15 } ], 8: [ function (_dereq_, module, exports) { + /* ! * Should * Copyright(c) 2010-2014 TJ Holowaychuk * MIT Licensed */ -var util = _dereq_('../util'), - eql = _dereq_('../eql'); - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('match', function(other, description) { - this.params = { operator: 'to match ' + i(other), message: description }; - - if(!eql(this.obj, other)) { - if(util.isRegExp(other)) { // something - regex - - if(util.isString(this.obj)) { - - this.assert(other.exec(this.obj)); - } else if(util.isArray(this.obj)) { - - this.obj.forEach(function(item) { - this.assert(other.exec(item));// should we try to convert to String and exec? - }, this); - } else if(util.isObject(this.obj)) { - - var notMatchedProps = [], matchedProps = []; - util.forOwn(this.obj, function(value, name) { - if(other.exec(value)) matchedProps.push(util.formatProp(name)); - else notMatchedProps.push(util.formatProp(name) + ' (' + i(value) +')'); - }, this); - - if(notMatchedProps.length) - this.params.operator += '\n\tnot matched properties: ' + notMatchedProps.join(', '); - if(matchedProps.length) - this.params.operator += '\n\tmatched properties: ' + matchedProps.join(', '); - - this.assert(notMatchedProps.length == 0); - } // should we try to convert to String and exec? - } else if(util.isFunction(other)) { - var res; - try { - res = other(this.obj); - } catch(e) { - if(e instanceof should.AssertionError) { - this.params.operator += '\n\t' + e.message; - } - throw e; - } - - if(res instanceof Assertion) { - this.params.operator += '\n\t' + res.getMessage(); - } - - //if we throw exception ok - it is used .should inside - if(util.isBoolean(res)) { - this.assert(res); // if it is just boolean function assert on it - } - } else if(util.isObject(other)) { // try to match properties (for Object and Array) - notMatchedProps = []; matchedProps = []; - - util.forOwn(other, function(value, key) { - try { - should(this.obj[key]).match(value); - matchedProps.push(util.formatProp(key)); - } catch(e) { - if(e instanceof should.AssertionError) { - notMatchedProps.push(util.formatProp(key) + ' (' + i(this.obj[key]) + ')'); - } else { - throw e; - } - } - }, this); - - if(notMatchedProps.length) - this.params.operator += '\n\tnot matched properties: ' + notMatchedProps.join(', '); - if(matchedProps.length) - this.params.operator += '\n\tmatched properties: ' + matchedProps.join(', '); - - this.assert(notMatchedProps.length == 0); - } else { - this.assert(false); - } - } - }); - - Assertion.add('matchEach', function(other, description) { - this.params = { operator: 'to match each ' + i(other), message: description }; - - var f = other; - - if(util.isRegExp(other)) - f = function(it) { - return !!other.exec(it); - }; - else if(!util.isFunction(other)) - f = function(it) { - return eql(it, other); - }; - - util.forOwn(this.obj, function(value, key) { - var res = f(value, key); - - //if we throw exception ok - it is used .should inside - if(util.isBoolean(res)) { - this.assert(res); // if it is just boolean function assert on it - } - }, this); - }); -}; -},{"../eql":1,"../util":15}],9:[function(_dereq_,module,exports){ -/*! + var util = _dereq_('../util'), + eql = _dereq_('../eql'); + + module.exports = function (should, Assertion) { + var i = should.format; + + Assertion.add('match', function (other, description) { + this.params = { operator: 'to match ' + i(other), message: description }; + + if (!eql(this.obj, other)) { + if (util.isRegExp(other)) { // something - regex + + if (util.isString(this.obj)) { + + this.assert(other.exec(this.obj)); + } else if (util.isArray(this.obj)) { + + this.obj.forEach(function (item) { + this.assert(other.exec(item));// should we try to convert to String and exec? + }, this); + } else if (util.isObject(this.obj)) { + + var notMatchedProps = [], + matchedProps = []; + util.forOwn(this.obj, function (value, name) { + if (other.exec(value)) { matchedProps.push(util.formatProp(name)); } else { notMatchedProps.push(util.formatProp(name) + ' (' + i(value) + ')'); } + }, this); + + if (notMatchedProps.length) { this.params.operator += '\n\tnot matched properties: ' + notMatchedProps.join(', '); } + if (matchedProps.length) { this.params.operator += '\n\tmatched properties: ' + matchedProps.join(', '); } + + this.assert(notMatchedProps.length == 0); + } // should we try to convert to String and exec? + } else if (util.isFunction(other)) { + var res; + try { + res = other(this.obj); + } catch (e) { + if (e instanceof should.AssertionError) { + this.params.operator += '\n\t' + e.message; + } + throw e; + } + + if (res instanceof Assertion) { + this.params.operator += '\n\t' + res.getMessage(); + } + + // if we throw exception ok - it is used .should inside + if (util.isBoolean(res)) { + this.assert(res); // if it is just boolean function assert on it + } + } else if (util.isObject(other)) { // try to match properties (for Object and Array) + notMatchedProps = []; matchedProps = []; + + util.forOwn(other, function (value, key) { + try { + should(this.obj[key]).match(value); + matchedProps.push(util.formatProp(key)); + } catch (e) { + if (e instanceof should.AssertionError) { + notMatchedProps.push(util.formatProp(key) + ' (' + i(this.obj[key]) + ')'); + } else { + throw e; + } + } + }, this); + + if (notMatchedProps.length) { this.params.operator += '\n\tnot matched properties: ' + notMatchedProps.join(', '); } + if (matchedProps.length) { this.params.operator += '\n\tmatched properties: ' + matchedProps.join(', '); } + + this.assert(notMatchedProps.length == 0); + } else { + this.assert(false); + } + } + }); + + Assertion.add('matchEach', function (other, description) { + this.params = { operator: 'to match each ' + i(other), message: description }; + + var f = other; + + if (util.isRegExp(other)) { + f = function (it) { + return !!other.exec(it); + }; + } else if (!util.isFunction(other)) { + f = function (it) { + return eql(it, other); + }; + } + + util.forOwn(this.obj, function (value, key) { + var res = f(value, key); + + // if we throw exception ok - it is used .should inside + if (util.isBoolean(res)) { + this.assert(res); // if it is just boolean function assert on it + } + }, this); + }); + }; + }, { '../eql': 1, '../util': 15 } ], 9: [ function (_dereq_, module, exports) { + /* ! * Should * Copyright(c) 2010-2014 TJ Holowaychuk * MIT Licensed */ -module.exports = function(should, Assertion) { - Assertion.add('NaN', function() { - this.params = { operator: 'to be NaN' }; + module.exports = function (should, Assertion) { + Assertion.add('NaN', function () { + this.params = { operator: 'to be NaN' }; - this.assert(this.obj !== this.obj); - }, true); + this.assert(this.obj !== this.obj); + }, true); - Assertion.add('Infinity', function() { - this.params = { operator: 'to be Infinity' }; + Assertion.add('Infinity', function () { + this.params = { operator: 'to be Infinity' }; - this.is.a.Number - .and.not.a.NaN - .and.assert(!isFinite(this.obj)); - }, true); + this.is.a.Number + .and.not.a.NaN + .and.assert(!isFinite(this.obj)); + }, true); - Assertion.add('within', function(start, finish, description) { - this.params = { operator: 'to be within ' + start + '..' + finish, message: description }; + Assertion.add('within', function (start, finish, description) { + this.params = { operator: 'to be within ' + start + '..' + finish, message: description }; - this.assert(this.obj >= start && this.obj <= finish); - }); + this.assert(this.obj >= start && this.obj <= finish); + }); - Assertion.add('approximately', function(value, delta, description) { - this.params = { operator: 'to be approximately ' + value + " ±" + delta, message: description }; + Assertion.add('approximately', function (value, delta, description) { + this.params = { operator: 'to be approximately ' + value + ' ±' + delta, message: description }; - this.assert(Math.abs(this.obj - value) <= delta); - }); + this.assert(Math.abs(this.obj - value) <= delta); + }); - Assertion.add('above', function(n, description) { - this.params = { operator: 'to be above ' + n, message: description }; + Assertion.add('above', function (n, description) { + this.params = { operator: 'to be above ' + n, message: description }; - this.assert(this.obj > n); - }); + this.assert(this.obj > n); + }); - Assertion.add('below', function(n, description) { - this.params = { operator: 'to be below ' + n, message: description }; + Assertion.add('below', function (n, description) { + this.params = { operator: 'to be below ' + n, message: description }; - this.assert(this.obj < n); - }); + this.assert(this.obj < n); + }); - Assertion.alias('above', 'greaterThan'); - Assertion.alias('below', 'lessThan'); + Assertion.alias('above', 'greaterThan'); + Assertion.alias('below', 'lessThan'); -}; + }; -},{}],10:[function(_dereq_,module,exports){ -/*! + }, {} ], 10: [ function (_dereq_, module, exports) { + /* ! * Should * Copyright(c) 2010-2014 TJ Holowaychuk * MIT Licensed */ -var util = _dereq_('../util'), - eql = _dereq_('../eql'); - -var aSlice = Array.prototype.slice; - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('enumerable', function(name, val) { - name = String(name); - - this.params = { - operator:"to have enumerable property " + util.formatProp(name) - }; - - this.assert(this.obj.propertyIsEnumerable(name)); - - if(arguments.length > 1){ - this.params.operator += " equal to "+i(val); - this.assert(eql(val, this.obj[name])); - } - }); - - Assertion.add('property', function(name, val) { - name = String(name); - if(arguments.length > 1) { - var p = {}; - p[name] = val; - this.have.properties(p); - } else { - this.have.properties(name); - } - this.obj = this.obj[name]; - }); - - Assertion.add('properties', function(names) { - var values = {}; - if(arguments.length > 1) { - names = aSlice.call(arguments); - } else if(!util.isArray(names)) { - if(util.isString(names)) { - names = [names]; - } else { - values = names; - names = Object.keys(names); - } - } - - var obj = Object(this.obj), missingProperties = []; - - //just enumerate properties and check if they all present - names.forEach(function(name) { - if(!(name in obj)) missingProperties.push(util.formatProp(name)); - }); - - var props = missingProperties; - if(props.length === 0) { - props = names.map(util.formatProp); - } else if(this.anyOne) { - props = names.filter(function(name) { - return missingProperties.indexOf(util.formatProp(name)) < 0; - }).map(util.formatProp); - } - - var operator = (props.length === 1 ? - 'to have property ' : 'to have '+(this.anyOne? 'any of ' : '')+'properties ') + props.join(', '); - - this.params = { operator: operator }; - - //check that all properties presented - //or if we request one of them that at least one them presented - this.assert(missingProperties.length === 0 || (this.anyOne && missingProperties.length != names.length)); - - // check if values in object matched expected - var valueCheckNames = Object.keys(values); - if(valueCheckNames.length) { - var wrongValues = []; - props = []; - - // now check values, as there we have all properties - valueCheckNames.forEach(function(name) { - var value = values[name]; - if(!eql(obj[name], value)) { - wrongValues.push(util.formatProp(name) + ' of ' + i(value) + ' (got ' + i(obj[name]) + ')'); - } else { - props.push(util.formatProp(name) + ' of ' + i(value)); - } - }); + var util = _dereq_('../util'), + eql = _dereq_('../eql'); + + var aSlice = Array.prototype.slice; + + module.exports = function (should, Assertion) { + var i = should.format; + + Assertion.add('enumerable', function (name, val) { + name = String(name); + + this.params = { + operator: 'to have enumerable property ' + util.formatProp(name) + }; + + this.assert(this.obj.propertyIsEnumerable(name)); + + if (arguments.length > 1) { + this.params.operator += ' equal to ' + i(val); + this.assert(eql(val, this.obj[name])); + } + }); + + Assertion.add('property', function (name, val) { + name = String(name); + if (arguments.length > 1) { + var p = {}; + p[name] = val; + this.have.properties(p); + } else { + this.have.properties(name); + } + this.obj = this.obj[name]; + }); + + Assertion.add('properties', function (names) { + var values = {}; + if (arguments.length > 1) { + names = aSlice.call(arguments); + } else if (!util.isArray(names)) { + if (util.isString(names)) { + names = [ names ]; + } else { + values = names; + names = Object.keys(names); + } + } + + var obj = Object(this.obj), + missingProperties = []; + + // just enumerate properties and check if they all present + names.forEach(function (name) { + if (!(name in obj)) { missingProperties.push(util.formatProp(name)); } + }); + + var props = missingProperties; + if (props.length === 0) { + props = names.map(util.formatProp); + } else if (this.anyOne) { + props = names.filter(function (name) { + return missingProperties.indexOf(util.formatProp(name)) < 0; + }).map(util.formatProp); + } + + var operator = (props.length === 1 + ? 'to have property ' : 'to have ' + (this.anyOne ? 'any of ' : '') + 'properties ') + props.join(', '); + + this.params = { operator: operator }; + + // check that all properties presented + // or if we request one of them that at least one them presented + this.assert(missingProperties.length === 0 || (this.anyOne && missingProperties.length != names.length)); + + // check if values in object matched expected + var valueCheckNames = Object.keys(values); + if (valueCheckNames.length) { + var wrongValues = []; + props = []; + + // now check values, as there we have all properties + valueCheckNames.forEach(function (name) { + var value = values[name]; + if (!eql(obj[name], value)) { + wrongValues.push(util.formatProp(name) + ' of ' + i(value) + ' (got ' + i(obj[name]) + ')'); + } else { + props.push(util.formatProp(name) + ' of ' + i(value)); + } + }); + + if ((wrongValues.length !== 0 && !this.anyOne) || (this.anyOne && props.length === 0)) { + props = wrongValues; + } + + operator = (props.length === 1 + ? 'to have property ' : 'to have ' + (this.anyOne ? 'any of ' : '') + 'properties ') + props.join(', '); - if((wrongValues.length !== 0 && !this.anyOne) || (this.anyOne && props.length === 0)) { - props = wrongValues; - } - - operator = (props.length === 1 ? - 'to have property ' : 'to have '+(this.anyOne? 'any of ' : '')+'properties ') + props.join(', '); - - this.params = { operator: operator }; + this.params = { operator: operator }; - //if there is no not matched values - //or there is at least one matched - this.assert(wrongValues.length === 0 || (this.anyOne && wrongValues.length != valueCheckNames.length)); - } - }); - - Assertion.add('length', function(n, description) { - this.have.property('length', n, description); - }); - - Assertion.alias('length', 'lengthOf'); - - var hasOwnProperty = Object.prototype.hasOwnProperty; - - Assertion.add('ownProperty', function(name, description) { - name = String(name); - this.params = { operator: 'to have own property ' + util.formatProp(name), message: description }; - - this.assert(hasOwnProperty.call(this.obj, name)); - - this.obj = this.obj[name]; - }); - - Assertion.alias('ownProperty', 'hasOwnProperty'); - - Assertion.add('empty', function() { - this.params = { operator: 'to be empty' }; - - if(util.isString(this.obj) || util.isArray(this.obj) || util.isArguments(this.obj)) { - this.have.property('length', 0); - } else { - var obj = Object(this.obj); // wrap to reference for booleans and numbers - for(var prop in obj) { - this.have.not.ownProperty(prop); - } - } - }, true); - - Assertion.add('keys', function(keys) { - if(arguments.length > 1) keys = aSlice.call(arguments); - else if(arguments.length === 1 && util.isString(keys)) keys = [ keys ]; - else if(arguments.length === 0) keys = []; + // if there is no not matched values + // or there is at least one matched + this.assert(wrongValues.length === 0 || (this.anyOne && wrongValues.length != valueCheckNames.length)); + } + }); - keys = keys.map(String); + Assertion.add('length', function (n, description) { + this.have.property('length', n, description); + }); + + Assertion.alias('length', 'lengthOf'); + + var hasOwnProperty = Object.prototype.hasOwnProperty; + + Assertion.add('ownProperty', function (name, description) { + name = String(name); + this.params = { operator: 'to have own property ' + util.formatProp(name), message: description }; + + this.assert(hasOwnProperty.call(this.obj, name)); + + this.obj = this.obj[name]; + }); + + Assertion.alias('ownProperty', 'hasOwnProperty'); + + Assertion.add('empty', function () { + this.params = { operator: 'to be empty' }; + + if (util.isString(this.obj) || util.isArray(this.obj) || util.isArguments(this.obj)) { + this.have.property('length', 0); + } else { + var obj = Object(this.obj); // wrap to reference for booleans and numbers + for (var prop in obj) { + this.have.not.ownProperty(prop); + } + } + }, true); - var obj = Object(this.obj); + Assertion.add('keys', function (keys) { + if (arguments.length > 1) { keys = aSlice.call(arguments); } else if (arguments.length === 1 && util.isString(keys)) { keys = [ keys ]; } else if (arguments.length === 0) { keys = []; } - // first check if some keys are missing - var missingKeys = []; - keys.forEach(function(key) { - if(!hasOwnProperty.call(this.obj, key)) - missingKeys.push(util.formatProp(key)); - }, this); + keys = keys.map(String); - // second check for extra keys - var extraKeys = []; - Object.keys(obj).forEach(function(key) { - if(keys.indexOf(key) < 0) { - extraKeys.push(util.formatProp(key)); - } - }); + var obj = Object(this.obj); - var verb = keys.length === 0 ? 'to be empty' : - 'to have ' + (keys.length === 1 ? 'key ' : 'keys '); + // first check if some keys are missing + var missingKeys = []; + keys.forEach(function (key) { + if (!hasOwnProperty.call(this.obj, key)) { missingKeys.push(util.formatProp(key)); } + }, this); - this.params = { operator: verb + keys.map(util.formatProp).join(', ')}; + // second check for extra keys + var extraKeys = []; + Object.keys(obj).forEach(function (key) { + if (keys.indexOf(key) < 0) { + extraKeys.push(util.formatProp(key)); + } + }); - if(missingKeys.length > 0) - this.params.operator += '\n\tmissing keys: ' + missingKeys.join(', '); + var verb = keys.length === 0 ? 'to be empty' + : 'to have ' + (keys.length === 1 ? 'key ' : 'keys '); - if(extraKeys.length > 0) - this.params.operator += '\n\textra keys: ' + extraKeys.join(', '); + this.params = { operator: verb + keys.map(util.formatProp).join(', ') }; - this.assert(missingKeys.length === 0 && extraKeys.length === 0); - }); + if (missingKeys.length > 0) { this.params.operator += '\n\tmissing keys: ' + missingKeys.join(', '); } - Assertion.alias("keys", "key"); + if (extraKeys.length > 0) { this.params.operator += '\n\textra keys: ' + extraKeys.join(', '); } - Assertion.add('propertyByPath', function(properties) { - if(arguments.length > 1) properties = aSlice.call(arguments); - else if(arguments.length === 1 && util.isString(properties)) properties = [ properties ]; - else if(arguments.length === 0) properties = []; + this.assert(missingKeys.length === 0 && extraKeys.length === 0); + }); - var allProps = properties.map(util.formatProp); + Assertion.alias('keys', 'key'); - properties = properties.map(String); + Assertion.add('propertyByPath', function (properties) { + if (arguments.length > 1) { properties = aSlice.call(arguments); } else if (arguments.length === 1 && util.isString(properties)) { properties = [ properties ]; } else if (arguments.length === 0) { properties = []; } - var obj = should(Object(this.obj)); + var allProps = properties.map(util.formatProp); - var foundProperties = []; + properties = properties.map(String); - var currentProperty; - while(currentProperty = properties.shift()) { - this.params = { operator: 'to have property by path ' + allProps.join(', ') + ' - failed on ' + util.formatProp(currentProperty) }; - obj = obj.have.property(currentProperty); - foundProperties.push(currentProperty); - } + var obj = should(Object(this.obj)); - this.params = { operator: 'to have property by path ' + allProps.join(', ') }; + var foundProperties = []; - this.obj = obj.obj; - }); -}; + var currentProperty; + while (currentProperty = properties.shift()) { + this.params = { operator: 'to have property by path ' + allProps.join(', ') + ' - failed on ' + util.formatProp(currentProperty) }; + obj = obj.have.property(currentProperty); + foundProperties.push(currentProperty); + } -},{"../eql":1,"../util":15}],11:[function(_dereq_,module,exports){ -/*! + this.params = { operator: 'to have property by path ' + allProps.join(', ') }; + + this.obj = obj.obj; + }); + }; + + }, { '../eql': 1, '../util': 15 } ], 11: [ function (_dereq_, module, exports) { + /* ! * Should * Copyright(c) 2010-2014 TJ Holowaychuk * MIT Licensed */ -module.exports = function(should, Assertion) { - Assertion.add('startWith', function(str, description) { - this.params = { operator: 'to start with ' + should.format(str), message: description }; + module.exports = function (should, Assertion) { + Assertion.add('startWith', function (str, description) { + this.params = { operator: 'to start with ' + should.format(str), message: description }; - this.assert(0 === this.obj.indexOf(str)); - }); + this.assert(this.obj.indexOf(str) === 0); + }); - Assertion.add('endWith', function(str, description) { - this.params = { operator: 'to end with ' + should.format(str), message: description }; + Assertion.add('endWith', function (str, description) { + this.params = { operator: 'to end with ' + should.format(str), message: description }; - this.assert(this.obj.indexOf(str, this.obj.length - str.length) >= 0); - }); -}; -},{}],12:[function(_dereq_,module,exports){ -/*! + this.assert(this.obj.indexOf(str, this.obj.length - str.length) >= 0); + }); + }; + }, {} ], 12: [ function (_dereq_, module, exports) { + /* ! * Should * Copyright(c) 2010-2014 TJ Holowaychuk * MIT Licensed */ -var util = _dereq_('../util'); + var util = _dereq_('../util'); -module.exports = function(should, Assertion) { - Assertion.add('Number', function() { - this.params = { operator: 'to be a number' }; + module.exports = function (should, Assertion) { + Assertion.add('Number', function () { + this.params = { operator: 'to be a number' }; - this.assert(util.isNumber(this.obj)); - }, true); + this.assert(util.isNumber(this.obj)); + }, true); - Assertion.add('arguments', function() { - this.params = { operator: 'to be arguments' }; + Assertion.add('arguments', function () { + this.params = { operator: 'to be arguments' }; - this.assert(util.isArguments(this.obj)); - }, true); + this.assert(util.isArguments(this.obj)); + }, true); - Assertion.add('type', function(type, description) { - this.params = { operator: 'to have type ' + type, message: description }; + Assertion.add('type', function (type, description) { + this.params = { operator: 'to have type ' + type, message: description }; - (typeof this.obj).should.be.exactly(type, description); - }); + (typeof this.obj).should.be.exactly(type, description); + }); - Assertion.add('instanceof', function(constructor, description) { - this.params = { operator: 'to be an instance of ' + util.functionName(constructor), message: description }; + Assertion.add('instanceof', function (constructor, description) { + this.params = { operator: 'to be an instance of ' + util.functionName(constructor), message: description }; - this.assert(Object(this.obj) instanceof constructor); - }); + this.assert(Object(this.obj) instanceof constructor); + }); - Assertion.add('Function', function() { - this.params = { operator: 'to be a function' }; + Assertion.add('Function', function () { + this.params = { operator: 'to be a function' }; - this.assert(util.isFunction(this.obj)); - }, true); + this.assert(util.isFunction(this.obj)); + }, true); - Assertion.add('Object', function() { - this.params = { operator: 'to be an object' }; + Assertion.add('Object', function () { + this.params = { operator: 'to be an object' }; - this.assert(util.isObject(this.obj)); - }, true); + this.assert(util.isObject(this.obj)); + }, true); - Assertion.add('String', function() { - this.params = { operator: 'to be a string' }; + Assertion.add('String', function () { + this.params = { operator: 'to be a string' }; - this.assert(util.isString(this.obj)); - }, true); + this.assert(util.isString(this.obj)); + }, true); - Assertion.add('Array', function() { - this.params = { operator: 'to be an array' }; + Assertion.add('Array', function () { + this.params = { operator: 'to be an array' }; - this.assert(util.isArray(this.obj)); - }, true); + this.assert(util.isArray(this.obj)); + }, true); - Assertion.add('Boolean', function() { - this.params = { operator: 'to be a boolean' }; + Assertion.add('Boolean', function () { + this.params = { operator: 'to be a boolean' }; - this.assert(util.isBoolean(this.obj)); - }, true); + this.assert(util.isBoolean(this.obj)); + }, true); - Assertion.add('Error', function() { - this.params = { operator: 'to be an error' }; + Assertion.add('Error', function () { + this.params = { operator: 'to be an error' }; - this.assert(util.isError(this.obj)); - }, true); + this.assert(util.isError(this.obj)); + }, true); - Assertion.add('null', function() { - this.params = { operator: 'to be null' }; + Assertion.add('null', function () { + this.params = { operator: 'to be null' }; - this.assert(this.obj === null); - }, true); + this.assert(this.obj === null); + }, true); - Assertion.alias('null', 'Null'); + Assertion.alias('null', 'Null'); - Assertion.alias('instanceof', 'instanceOf'); -}; + Assertion.alias('instanceof', 'instanceOf'); + }; -},{"../util":15}],13:[function(_dereq_,module,exports){ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. + }, { '../util': 15 } ], 13: [ function (_dereq_, module, exports) { + // Copyright Joyent, Inc. and other Node contributors. + // + // Permission is hereby granted, free of charge, to any person obtaining a + // copy of this software and associated documentation files (the + // "Software"), to deal in the Software without restriction, including + // without limitation the rights to use, copy, modify, merge, publish, + // distribute, sublicense, and/or sell copies of the Software, and to permit + // persons to whom the Software is furnished to do so, subject to the + // following conditions: + // + // The above copyright notice and this permission notice shall be included + // in all copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. -var util = _dereq_('./util'); -var isBoolean = util.isBoolean; -var isObject = util.isObject; -var isUndefined = util.isUndefined; -var isFunction = util.isFunction; -var isString = util.isString; -var isNumber = util.isNumber; -var isNull = util.isNull; -var isRegExp = util.isRegExp; -var isDate = util.isDate; -var isError = util.isError; -var isArray = util.isArray; + var util = _dereq_('./util'); + var isBoolean = util.isBoolean; + var isObject = util.isObject; + var isUndefined = util.isUndefined; + var isFunction = util.isFunction; + var isString = util.isString; + var isNumber = util.isNumber; + var isNull = util.isNull; + var isRegExp = util.isRegExp; + var isDate = util.isDate; + var isError = util.isError; + var isArray = util.isArray; -/** + /** * Echos the value of a value. Trys to print the value out * in the best way possible given the different types. * * @param {Object} obj The object to print out. * @param {Object} opts Optional options object that alters the output. */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; - - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && + /* legacy: obj, showHidden, depth, colors*/ + function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) { ctx.depth = arguments[2]; } + if (arguments.length >= 4) { ctx.colors = arguments[3]; } + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + exports._extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) { ctx.showHidden = false; } + if (isUndefined(ctx.depth)) { ctx.depth = 2; } + if (isUndefined(ctx.colors)) { ctx.colors = false; } + if (isUndefined(ctx.customInspect)) { ctx.customInspect = true; } + if (ctx.colors) { ctx.stylize = stylizeWithColor; } + return formatValue(ctx, obj, ctx.depth); + } + exports.inspect = inspect; + + // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics + inspect.colors = { + bold: [ 1, 22 ], + italic: [ 3, 23 ], + underline: [ 4, 24 ], + inverse: [ 7, 27 ], + white: [ 37, 39 ], + grey: [ 90, 39 ], + black: [ 30, 39 ], + blue: [ 34, 39 ], + cyan: [ 36, 39 ], + green: [ 32, 39 ], + magenta: [ 35, 39 ], + red: [ 31, 39 ], + yellow: [ 33, 39 ] + }; + + // Don't use 'blue' not visible on cmd.exe + inspect.styles = { + special: 'cyan', + number: 'yellow', + boolean: 'yellow', + undefined: 'grey', + null: 'bold', + string: 'green', + date: 'magenta', + // "name": intentionally not styling + regexp: 'red' + }; + + function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } + } + + function stylizeNoColor(str, styleType) { + return str; + } + + function arrayToHash(array) { + var hash = {}; + + array.forEach(function (val, idx) { + hash[val] = true; + }); + + return hash; + } + + function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect + && value + && isFunction(value.inspect) // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && + && value.inspect !== exports.inspect // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // This could be a boxed primitive (new String(), etc.), check valueOf() - // NOTE: Avoid calling `valueOf` on `Date` instance because it will return - // a number which, when object has some additional user-stored `keys`, - // will be printed out. - var formatted; - var raw = value; - try { - // the .valueOf() call can fail for a multitude of reasons - if (!isDate(value)) - raw = value.valueOf(); - } catch (e) { - // ignore... - } - - if (isString(raw)) { - // for boxed Strings, we have to remove the 0-n indexed entries, - // since they just noisey up the output and are redundant - keys = keys.filter(function(key) { - return !(key >= 0 && key < raw.length); - }); - } - - if (isError(value)) { - return formatError(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - // now check the `raw` value to handle boxed primitives - if (isString(raw)) { - formatted = formatPrimitiveNoColor(ctx, raw); - return ctx.stylize('[String: ' + formatted + ']', 'string'); - } - if (isNumber(raw)) { - formatted = formatPrimitiveNoColor(ctx, raw); - return ctx.stylize('[Number: ' + formatted + ']', 'number'); - } - if (isBoolean(raw)) { - formatted = formatPrimitiveNoColor(ctx, raw); - return ctx.stylize('[Boolean: ' + formatted + ']', 'boolean'); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - // Make boxed primitive Strings look like such - if (isString(raw)) { - formatted = formatPrimitiveNoColor(ctx, raw); - base = ' ' + '[String: ' + formatted + ']'; - } - - // Make boxed primitive Numbers look like such - if (isNumber(raw)) { - formatted = formatPrimitiveNoColor(ctx, raw); - base = ' ' + '[Number: ' + formatted + ']'; - } - - // Make boxed primitive Booleans look like such - if (isBoolean(raw)) { - formatted = formatPrimitiveNoColor(ctx, raw); - base = ' ' + '[Boolean: ' + formatted + ']'; - } - - if (keys.length === 0 && (!array || value.length === 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) { - // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, - // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . - if (value === 0 && 1 / value < 0) - return ctx.stylize('-0', 'number'); - return ctx.stylize('' + value, 'number'); - } - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatPrimitiveNoColor(ctx, value) { - var stylize = ctx.stylize; - ctx.stylize = stylizeNoColor; - var str = formatPrimitive(ctx, value); - ctx.stylize = stylize; - return str; -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'") - .replace(/\\\\/g, '\\'); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var length = output.reduce(function(prev, cur) { - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - -exports._extend = function _extend(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -},{"./util":15}],14:[function(_dereq_,module,exports){ -/*! + && !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // This could be a boxed primitive (new String(), etc.), check valueOf() + // NOTE: Avoid calling `valueOf` on `Date` instance because it will return + // a number which, when object has some additional user-stored `keys`, + // will be printed out. + var formatted; + var raw = value; + try { + // the .valueOf() call can fail for a multitude of reasons + if (!isDate(value)) { raw = value.valueOf(); } + } catch (e) { + // ignore... + } + + if (isString(raw)) { + // for boxed Strings, we have to remove the 0-n indexed entries, + // since they just noisey up the output and are redundant + keys = keys.filter(function (key) { + return !(key >= 0 && key < raw.length); + }); + } + + if (isError(value)) { + return formatError(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + // now check the `raw` value to handle boxed primitives + if (isString(raw)) { + formatted = formatPrimitiveNoColor(ctx, raw); + return ctx.stylize('[String: ' + formatted + ']', 'string'); + } + if (isNumber(raw)) { + formatted = formatPrimitiveNoColor(ctx, raw); + return ctx.stylize('[Number: ' + formatted + ']', 'number'); + } + if (isBoolean(raw)) { + formatted = formatPrimitiveNoColor(ctx, raw); + return ctx.stylize('[Boolean: ' + formatted + ']', 'boolean'); + } + } + + var base = '', + array = false, + braces = [ '{', '}' ]; + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = [ '[', ']' ]; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + + // Make boxed primitive Strings look like such + if (isString(raw)) { + formatted = formatPrimitiveNoColor(ctx, raw); + base = ' ' + '[String: ' + formatted + ']'; + } + + // Make boxed primitive Numbers look like such + if (isNumber(raw)) { + formatted = formatPrimitiveNoColor(ctx, raw); + base = ' ' + '[Number: ' + formatted + ']'; + } + + // Make boxed primitive Booleans look like such + if (isBoolean(raw)) { + formatted = formatPrimitiveNoColor(ctx, raw); + base = ' ' + '[Boolean: ' + formatted + ']'; + } + + if (keys.length === 0 && (!array || value.length === 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function (key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); + } + + function formatPrimitive(ctx, value) { + if (isUndefined(value)) { return ctx.stylize('undefined', 'undefined'); } + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, '\\\'') + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) { + // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, + // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . + if (value === 0 && 1 / value < 0) { return ctx.stylize('-0', 'number'); } + return ctx.stylize('' + value, 'number'); + } + if (isBoolean(value)) { return ctx.stylize('' + value, 'boolean'); } + // For some reason typeof null is "object", so special case here. + if (isNull(value)) { return ctx.stylize('null', 'null'); } + } + + function formatPrimitiveNoColor(ctx, value) { + var stylize = ctx.stylize; + ctx.stylize = stylizeNoColor; + var str = formatPrimitive(ctx, value); + ctx.stylize = stylize; + return str; + } + + function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; + } + + function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function (key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; + } + + function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function (line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function (line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, '\\\'') + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, '\'') + .replace(/\\\\/g, '\\'); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; + } + + function reduceToSingleString(output, base, braces) { + var length = output.reduce(function (prev, cur) { + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; + } + + exports._extend = function _extend(origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject(add)) { return origin; } + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; + }; + + function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + + }, { './util': 15 } ], 14: [ function (_dereq_, module, exports) { + /* ! * Should * Copyright(c) 2010-2014 TJ Holowaychuk * MIT Licensed */ + var util = _dereq_('./util'), + AssertionError = util.AssertionError, + inspect = util.inspect; -var util = _dereq_('./util'), - AssertionError = util.AssertionError, - inspect = util.inspect; - -/** + /** * Our function should * @param obj * @returns {Assertion} */ -var should = function(obj) { - return new Assertion(util.isWrapperType(obj) ? obj.valueOf() : obj); -}; + var should = function (obj) { + return new Assertion(util.isWrapperType(obj) ? obj.valueOf() : obj); + }; -/** + /** * Initialize a new `Assertion` with the given _obj_. * * @param {*} obj * @api private */ -var Assertion = should.Assertion = function Assertion(obj) { - this.obj = obj; -}; - + var Assertion = should.Assertion = function Assertion(obj) { + this.obj = obj; + }; -/** + /** Way to extend Assertion function. It uses some logic to define only positive assertions and itself rule with negative assertion. All actions happen in subcontext and this method take care about negation. Potentially we can add some more modifiers that does not depends from state of assertion. */ -Assertion.add = function(name, f, isGetter) { - var prop = { enumerable: true }; - prop[isGetter ? 'get' : 'value'] = function() { - var context = new Assertion(this.obj); - context.copy = context.copyIfMissing; - context.anyOne = this.anyOne; - - try { - f.apply(context, arguments); - } catch(e) { - //copy data from sub context to this - this.copy(context); - - //check for fail - if(e instanceof should.AssertionError) { - //negative fail - if(this.negate) { - this.obj = context.obj; - this.negate = false; - return this; - } - this.assert(false); - } - // throw if it is another exception - throw e; - } - //copy data from sub context to this - this.copy(context); - if(this.negate) { - this.assert(false); - } - - this.obj = context.obj; - this.negate = false; - return this; - }; - - Object.defineProperty(Assertion.prototype, name, prop); -}; - -Assertion.alias = function(from, to) { - var desc = Object.getOwnPropertyDescriptor(Assertion.prototype, from); - if(!desc) throw new Error('Alias ' + from + ' -> ' + to + ' could not be created as ' + from + ' not defined'); - Object.defineProperty(Assertion.prototype, to, desc); -}; - -should.AssertionError = AssertionError; -should.format = function (value) { - if(util.isDate(value) && typeof value.inspect !== 'function') return value.toISOString(); //show millis in dates - return inspect(value, { depth: null }); -}; - -should.use = function(f) { - f(this, Assertion); - return this; -}; - - -/** + Assertion.add = function (name, f, isGetter) { + var prop = { enumerable: true }; + prop[isGetter ? 'get' : 'value'] = function () { + var context = new Assertion(this.obj); + context.copy = context.copyIfMissing; + context.anyOne = this.anyOne; + + try { + f.apply(context, arguments); + } catch (e) { + // copy data from sub context to this + this.copy(context); + + // check for fail + if (e instanceof should.AssertionError) { + // negative fail + if (this.negate) { + this.obj = context.obj; + this.negate = false; + return this; + } + this.assert(false); + } + // throw if it is another exception + throw e; + } + // copy data from sub context to this + this.copy(context); + if (this.negate) { + this.assert(false); + } + + this.obj = context.obj; + this.negate = false; + return this; + }; + + Object.defineProperty(Assertion.prototype, name, prop); + }; + + Assertion.alias = function (from, to) { + var desc = Object.getOwnPropertyDescriptor(Assertion.prototype, from); + if (!desc) { throw new Error('Alias ' + from + ' -> ' + to + ' could not be created as ' + from + ' not defined'); } + Object.defineProperty(Assertion.prototype, to, desc); + }; + + should.AssertionError = AssertionError; + should.format = function (value) { + if (util.isDate(value) && typeof value.inspect !== 'function') { return value.toISOString(); } // show millis in dates + return inspect(value, { depth: null }); + }; + + should.use = function (f) { + f(this, Assertion); + return this; + }; + + /** * Expose should to external world. */ -exports = module.exports = should; - + exports = module.exports = should; -/** + /** * Expose api via `Object#should`. * * @api public */ -Object.defineProperty(Object.prototype, 'should', { - set: function() { - }, - get: function() { - return should(this); - }, - configurable: true -}); - + Object.defineProperty(Object.prototype, 'should', { + set: function () { + }, + get: function () { + return should(this); + }, + configurable: true + }); -Assertion.prototype = { - constructor: Assertion, + Assertion.prototype = { + constructor: Assertion, - assert: function(expr) { - if(expr) return this; + assert: function (expr) { + if (expr) { return this; } - var params = this.params; + var params = this.params; - var msg = params.message, generatedMessage = false; - if(!msg) { - msg = this.getMessage(); - generatedMessage = true; - } + var msg = params.message, + generatedMessage = false; + if (!msg) { + msg = this.getMessage(); + generatedMessage = true; + } - var err = new AssertionError({ - message: msg, actual: this.obj, expected: params.expected, stackStartFunction: this.assert - }); + var err = new AssertionError({ + message: msg, actual: this.obj, expected: params.expected, stackStartFunction: this.assert + }); - err.showDiff = params.showDiff; - err.operator = params.operator; - err.generatedMessage = generatedMessage; + err.showDiff = params.showDiff; + err.operator = params.operator; + err.generatedMessage = generatedMessage; - throw err; - }, + throw err; + }, - getMessage: function() { - return 'expected ' + ('obj' in this.params ? this.params.obj: should.format(this.obj)) + (this.negate ? ' not ': ' ') + - this.params.operator + ('expected' in this.params ? ' ' + should.format(this.params.expected) : ''); - }, + getMessage: function () { + return 'expected ' + ('obj' in this.params ? this.params.obj : should.format(this.obj)) + (this.negate ? ' not ' : ' ') + + this.params.operator + ('expected' in this.params ? ' ' + should.format(this.params.expected) : ''); + }, - copy: function(other) { - this.params = other.params; - }, + copy: function (other) { + this.params = other.params; + }, - copyIfMissing: function(other) { - if(!this.params) this.params = other.params; - }, + copyIfMissing: function (other) { + if (!this.params) { this.params = other.params; } + }, - - /** + /** * Negation modifier. * * @api public */ - get not() { - this.negate = !this.negate; - return this; - }, + get not() { + this.negate = !this.negate; + return this; + }, - /** + /** * Any modifier - it affect on execution of sequenced assertion to do not check all, but any of * * @api public */ - get any() { - this.anyOne = true; - return this; - } -}; - -should - .use(_dereq_('./ext/assert')) - .use(_dereq_('./ext/chain')) - .use(_dereq_('./ext/bool')) - .use(_dereq_('./ext/number')) - .use(_dereq_('./ext/eql')) - .use(_dereq_('./ext/type')) - .use(_dereq_('./ext/string')) - .use(_dereq_('./ext/property')) - .use(_dereq_('./ext/error')) - .use(_dereq_('./ext/match')) - .use(_dereq_('./ext/contain')); - -},{"./ext/assert":2,"./ext/bool":3,"./ext/chain":4,"./ext/contain":5,"./ext/eql":6,"./ext/error":7,"./ext/match":8,"./ext/number":9,"./ext/property":10,"./ext/string":11,"./ext/type":12,"./util":15}],15:[function(_dereq_,module,exports){ -/*! + get any() { + this.anyOne = true; + return this; + } + }; + + should + .use(_dereq_('./ext/assert')) + .use(_dereq_('./ext/chain')) + .use(_dereq_('./ext/bool')) + .use(_dereq_('./ext/number')) + .use(_dereq_('./ext/eql')) + .use(_dereq_('./ext/type')) + .use(_dereq_('./ext/string')) + .use(_dereq_('./ext/property')) + .use(_dereq_('./ext/error')) + .use(_dereq_('./ext/match')) + .use(_dereq_('./ext/contain')); + + }, { './ext/assert': 2, './ext/bool': 3, './ext/chain': 4, './ext/contain': 5, './ext/eql': 6, './ext/error': 7, './ext/match': 8, './ext/number': 9, './ext/property': 10, './ext/string': 11, './ext/type': 12, './util': 15 } ], 15: [ function (_dereq_, module, exports) { + /* ! * Should * Copyright(c) 2010-2014 TJ Holowaychuk * MIT Licensed */ -/** + /** * Check if given obj just a primitive type wrapper * @param {Object} obj * @returns {boolean} * @api private */ -exports.isWrapperType = function(obj) { - return isNumber(obj) || isString(obj) || isBoolean(obj); -}; + exports.isWrapperType = function (obj) { + return isNumber(obj) || isString(obj) || isBoolean(obj); + }; -/** + /** * Merge object b with object a. * * var a = { foo: 'bar' } @@ -1571,1061 +1540,1034 @@ exports.isWrapperType = function(obj) { * @api private */ -exports.merge = function(a, b){ - if (a && b) { - for (var key in b) { - a[key] = b[key]; - } - } - return a; -}; + exports.merge = function (a, b) { + if (a && b) { + for (var key in b) { + a[key] = b[key]; + } + } + return a; + }; -function isArray(arr) { - return isObject(arr) && (arr.__ArrayLike || Array.isArray(arr)); -} + function isArray(arr) { + return isObject(arr) && (arr.__ArrayLike || Array.isArray(arr)); + } -exports.isArray = isArray; + exports.isArray = isArray; -function isNumber(arg) { - return typeof arg === 'number' || arg instanceof Number; -} + function isNumber(arg) { + return typeof arg === 'number' || arg instanceof Number; + } -exports.isNumber = isNumber; + exports.isNumber = isNumber; -function isString(arg) { - return typeof arg === 'string' || arg instanceof String; -} + function isString(arg) { + return typeof arg === 'string' || arg instanceof String; + } -function isBoolean(arg) { - return typeof arg === 'boolean' || arg instanceof Boolean; -} -exports.isBoolean = isBoolean; + function isBoolean(arg) { + return typeof arg === 'boolean' || arg instanceof Boolean; + } + exports.isBoolean = isBoolean; -exports.isString = isString; + exports.isString = isString; -function isBuffer(arg) { - return typeof Buffer !== 'undefined' && arg instanceof Buffer; -} - -exports.isBuffer = isBuffer; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} - -exports.isDate = isDate; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} - -exports.isObject = isObject; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} - -exports.isRegExp = isRegExp; - -function isNullOrUndefined(arg) { - return arg == null; -} - -exports.isNullOrUndefined = isNullOrUndefined; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isArguments(object) { - return objectToString(object) === '[object Arguments]'; -} - -exports.isArguments = isArguments; - -exports.isFunction = function(arg) { - return typeof arg === 'function' || arg instanceof Function; -}; - -function isError(e) { - return (isObject(e) && objectToString(e) === '[object Error]') || (e instanceof Error); -} -exports.isError = isError; - -function isUndefined(arg) { - return arg === void 0; -} - -exports.isUndefined = isUndefined; - -exports.inspect = _dereq_('./inspect').inspect; - -exports.AssertionError = _dereq_('assert').AssertionError; - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -exports.forOwn = function(obj, f, context) { - for(var prop in obj) { - if(hasOwnProperty.call(obj, prop)) { - f.call(context, obj[prop], prop); - } - } -}; - -var functionNameRE = /^\s*function\s*(\S*)\s*\(/; - -exports.functionName = function(f) { - if(f.name) { - return f.name; - } - var name = f.toString().match(functionNameRE)[1]; - return name; -}; - -exports.formatProp = function(name) { - name = JSON.stringify('' + name); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'") - .replace(/\\\\/g, '\\'); - } - return name; -} -},{"./inspect":13,"assert":16}],16:[function(_dereq_,module,exports){ -// http://wiki.commonjs.org/wiki/Unit_Testing/1.0 -// -// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! -// -// Originally from narwhal.js (http://narwhaljs.org) -// Copyright (c) 2009 Thomas Robinson <280north.com> -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the 'Software'), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -// when used in node, this will actually load the util module we depend on -// versus loading the builtin util module as happens otherwise -// this is a bug in node module loading as far as I am concerned -var util = _dereq_('util/'); - -var pSlice = Array.prototype.slice; -var hasOwn = Object.prototype.hasOwnProperty; - -// 1. The assert module provides functions that throw -// AssertionError's when particular conditions are not met. The -// assert module must conform to the following interface. - -var assert = module.exports = ok; - -// 2. The AssertionError is defined in assert. -// new assert.AssertionError({ message: message, -// actual: actual, -// expected: expected }) - -assert.AssertionError = function AssertionError(options) { - this.name = 'AssertionError'; - this.actual = options.actual; - this.expected = options.expected; - this.operator = options.operator; - if (options.message) { - this.message = options.message; - this.generatedMessage = false; - } else { - this.message = getMessage(this); - this.generatedMessage = true; - } - var stackStartFunction = options.stackStartFunction || fail; - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, stackStartFunction); - } - else { - // non v8 browsers so we can have a stacktrace - var err = new Error(); - if (err.stack) { - var out = err.stack; - - // try to strip useless frames - var fn_name = stackStartFunction.name; - var idx = out.indexOf('\n' + fn_name); - if (idx >= 0) { - // once we have located the function frame - // we need to strip out everything before it (and its line) - var next_line = out.indexOf('\n', idx + 1); - out = out.substring(next_line + 1); - } - - this.stack = out; - } - } -}; - -// assert.AssertionError instanceof Error -util.inherits(assert.AssertionError, Error); - -function replacer(key, value) { - if (util.isUndefined(value)) { - return '' + value; - } - if (util.isNumber(value) && (isNaN(value) || !isFinite(value))) { - return value.toString(); - } - if (util.isFunction(value) || util.isRegExp(value)) { - return value.toString(); - } - return value; -} - -function truncate(s, n) { - if (util.isString(s)) { - return s.length < n ? s : s.slice(0, n); - } else { - return s; - } -} - -function getMessage(self) { - return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + - self.operator + ' ' + - truncate(JSON.stringify(self.expected, replacer), 128); -} - -// At present only the three keys mentioned above are used and -// understood by the spec. Implementations or sub modules can pass -// other keys to the AssertionError's constructor - they will be -// ignored. - -// 3. All of the following functions must throw an AssertionError -// when a corresponding condition is not met, with a message that -// may be undefined if not provided. All assertion methods provide -// both the actual and expected values to the assertion error for -// display purposes. - -function fail(actual, expected, message, operator, stackStartFunction) { - throw new assert.AssertionError({ - message: message, - actual: actual, - expected: expected, - operator: operator, - stackStartFunction: stackStartFunction - }); -} - -// EXTENSION! allows for well behaved errors defined elsewhere. -assert.fail = fail; - -// 4. Pure assertion tests whether a value is truthy, as determined -// by !!guard. -// assert.ok(guard, message_opt); -// This statement is equivalent to assert.equal(true, !!guard, -// message_opt);. To test strictly for the value true, use -// assert.strictEqual(true, guard, message_opt);. - -function ok(value, message) { - if (!value) fail(value, true, message, '==', assert.ok); -} -assert.ok = ok; - -// 5. The equality assertion tests shallow, coercive equality with -// ==. -// assert.equal(actual, expected, message_opt); - -assert.equal = function equal(actual, expected, message) { - if (actual != expected) fail(actual, expected, message, '==', assert.equal); -}; - -// 6. The non-equality assertion tests for whether two objects are not equal -// with != assert.notEqual(actual, expected, message_opt); - -assert.notEqual = function notEqual(actual, expected, message) { - if (actual == expected) { - fail(actual, expected, message, '!=', assert.notEqual); - } -}; - -// 7. The equivalence assertion tests a deep equality relation. -// assert.deepEqual(actual, expected, message_opt); - -assert.deepEqual = function deepEqual(actual, expected, message) { - if (!_deepEqual(actual, expected)) { - fail(actual, expected, message, 'deepEqual', assert.deepEqual); - } -}; - -function _deepEqual(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - - } else if (util.isBuffer(actual) && util.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (util.isDate(actual) && util.isDate(expected)) { - return actual.getTime() === expected.getTime(); - - // 7.3 If the expected value is a RegExp object, the actual value is - // equivalent if it is also a RegExp object with the same source and - // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). - } else if (util.isRegExp(actual) && util.isRegExp(expected)) { - return actual.source === expected.source && - actual.global === expected.global && - actual.multiline === expected.multiline && - actual.lastIndex === expected.lastIndex && - actual.ignoreCase === expected.ignoreCase; - - // 7.4. Other pairs that do not both pass typeof value == 'object', - // equivalence is determined by ==. - } else if (!util.isObject(actual) && !util.isObject(expected)) { - return actual == expected; - - // 7.5 For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical 'prototype' property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } -} - -function isArguments(object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; -} - -function objEquiv(a, b) { - if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) - return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; - //~~~I've managed to break Object.keys through screwy arguments passing. - // Converting to array solves the problem. - if (isArguments(a)) { - if (!isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return _deepEqual(a, b); - } - try { - var ka = objectKeys(a), - kb = objectKeys(b), - key, i; - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - // having the same number of owned properties (keys incorporates - // hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!_deepEqual(a[key], b[key])) return false; - } - return true; -} - -// 8. The non-equivalence assertion tests for any deep inequality. -// assert.notDeepEqual(actual, expected, message_opt); - -assert.notDeepEqual = function notDeepEqual(actual, expected, message) { - if (_deepEqual(actual, expected)) { - fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); - } -}; - -// 9. The strict equality assertion tests strict equality, as determined by ===. -// assert.strictEqual(actual, expected, message_opt); - -assert.strictEqual = function strictEqual(actual, expected, message) { - if (actual !== expected) { - fail(actual, expected, message, '===', assert.strictEqual); - } -}; - -// 10. The strict non-equality assertion tests for strict inequality, as -// determined by !==. assert.notStrictEqual(actual, expected, message_opt); - -assert.notStrictEqual = function notStrictEqual(actual, expected, message) { - if (actual === expected) { - fail(actual, expected, message, '!==', assert.notStrictEqual); - } -}; - -function expectedException(actual, expected) { - if (!actual || !expected) { - return false; - } - - if (Object.prototype.toString.call(expected) == '[object RegExp]') { - return expected.test(actual); - } else if (actual instanceof expected) { - return true; - } else if (expected.call({}, actual) === true) { - return true; - } - - return false; -} - -function _throws(shouldThrow, block, expected, message) { - var actual; - - if (util.isString(expected)) { - message = expected; - expected = null; - } - - try { - block(); - } catch (e) { - actual = e; - } - - message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + - (message ? ' ' + message : '.'); - - if (shouldThrow && !actual) { - fail(actual, expected, 'Missing expected exception' + message); - } - - if (!shouldThrow && expectedException(actual, expected)) { - fail(actual, expected, 'Got unwanted exception' + message); - } - - if ((shouldThrow && actual && expected && - !expectedException(actual, expected)) || (!shouldThrow && actual)) { - throw actual; - } -} - -// 11. Expected to throw an error: -// assert.throws(block, Error_opt, message_opt); - -assert.throws = function(block, /*optional*/error, /*optional*/message) { - _throws.apply(this, [true].concat(pSlice.call(arguments))); -}; - -// EXTENSION! This is annoying to write outside this module. -assert.doesNotThrow = function(block, /*optional*/message) { - _throws.apply(this, [false].concat(pSlice.call(arguments))); -}; - -assert.ifError = function(err) { if (err) {throw err;}}; - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - if (hasOwn.call(obj, key)) keys.push(key); - } - return keys; -}; - -},{"util/":18}],17:[function(_dereq_,module,exports){ -module.exports = function isBuffer(arg) { - return arg && typeof arg === 'object' + function isBuffer(arg) { + return typeof Buffer !== 'undefined' && arg instanceof Buffer; + } + + exports.isBuffer = isBuffer; + + function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; + } + + exports.isDate = isDate; + + function objectToString(o) { + return Object.prototype.toString.call(o); + } + + function isObject(arg) { + return typeof arg === 'object' && arg !== null; + } + + exports.isObject = isObject; + + function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; + } + + exports.isRegExp = isRegExp; + + function isNullOrUndefined(arg) { + return arg == null; + } + + exports.isNullOrUndefined = isNullOrUndefined; + + function isNull(arg) { + return arg === null; + } + exports.isNull = isNull; + + function isArguments(object) { + return objectToString(object) === '[object Arguments]'; + } + + exports.isArguments = isArguments; + + exports.isFunction = function (arg) { + return typeof arg === 'function' || arg instanceof Function; + }; + + function isError(e) { + return (isObject(e) && objectToString(e) === '[object Error]') || (e instanceof Error); + } + exports.isError = isError; + + function isUndefined(arg) { + return arg === void 0; + } + + exports.isUndefined = isUndefined; + + exports.inspect = _dereq_('./inspect').inspect; + + exports.AssertionError = _dereq_('assert').AssertionError; + + var hasOwnProperty = Object.prototype.hasOwnProperty; + + exports.forOwn = function (obj, f, context) { + for (var prop in obj) { + if (hasOwnProperty.call(obj, prop)) { + f.call(context, obj[prop], prop); + } + } + }; + + var functionNameRE = /^\s*function\s*(\S*)\s*\(/; + + exports.functionName = function (f) { + if (f.name) { + return f.name; + } + var name = f.toString().match(functionNameRE)[1]; + return name; + }; + + exports.formatProp = function (name) { + name = JSON.stringify('' + name); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + } else { + name = name.replace(/'/g, '\\\'') + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, '\'') + .replace(/\\\\/g, '\\'); + } + return name; + }; + }, { './inspect': 13, assert: 16 } ], 16: [ function (_dereq_, module, exports) { + // http://wiki.commonjs.org/wiki/Unit_Testing/1.0 + // + // THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! + // + // Originally from narwhal.js (http://narwhaljs.org) + // Copyright (c) 2009 Thomas Robinson <280north.com> + // + // Permission is hereby granted, free of charge, to any person obtaining a copy + // of this software and associated documentation files (the 'Software'), to + // deal in the Software without restriction, including without limitation the + // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + // sell copies of the Software, and to permit persons to whom the Software is + // furnished to do so, subject to the following conditions: + // + // The above copyright notice and this permission notice shall be included in + // all copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + // AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + // when used in node, this will actually load the util module we depend on + // versus loading the builtin util module as happens otherwise + // this is a bug in node module loading as far as I am concerned + var util = _dereq_('util/'); + + var pSlice = Array.prototype.slice; + var hasOwn = Object.prototype.hasOwnProperty; + + // 1. The assert module provides functions that throw + // AssertionError's when particular conditions are not met. The + // assert module must conform to the following interface. + + var assert = module.exports = ok; + + // 2. The AssertionError is defined in assert. + // new assert.AssertionError({ message: message, + // actual: actual, + // expected: expected }) + + assert.AssertionError = function AssertionError(options) { + this.name = 'AssertionError'; + this.actual = options.actual; + this.expected = options.expected; + this.operator = options.operator; + if (options.message) { + this.message = options.message; + this.generatedMessage = false; + } else { + this.message = getMessage(this); + this.generatedMessage = true; + } + var stackStartFunction = options.stackStartFunction || fail; + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, stackStartFunction); + } else { + // non v8 browsers so we can have a stacktrace + var err = new Error(); + if (err.stack) { + var out = err.stack; + + // try to strip useless frames + var fn_name = stackStartFunction.name; + var idx = out.indexOf('\n' + fn_name); + if (idx >= 0) { + // once we have located the function frame + // we need to strip out everything before it (and its line) + var next_line = out.indexOf('\n', idx + 1); + out = out.substring(next_line + 1); + } + + this.stack = out; + } + } + }; + + // assert.AssertionError instanceof Error + util.inherits(assert.AssertionError, Error); + + function replacer(key, value) { + if (util.isUndefined(value)) { + return '' + value; + } + if (util.isNumber(value) && (isNaN(value) || !isFinite(value))) { + return value.toString(); + } + if (util.isFunction(value) || util.isRegExp(value)) { + return value.toString(); + } + return value; + } + + function truncate(s, n) { + if (util.isString(s)) { + return s.length < n ? s : s.slice(0, n); + } else { + return s; + } + } + + function getMessage(self) { + return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + + self.operator + ' ' + + truncate(JSON.stringify(self.expected, replacer), 128); + } + + // At present only the three keys mentioned above are used and + // understood by the spec. Implementations or sub modules can pass + // other keys to the AssertionError's constructor - they will be + // ignored. + + // 3. All of the following functions must throw an AssertionError + // when a corresponding condition is not met, with a message that + // may be undefined if not provided. All assertion methods provide + // both the actual and expected values to the assertion error for + // display purposes. + + function fail(actual, expected, message, operator, stackStartFunction) { + throw new assert.AssertionError({ + message: message, + actual: actual, + expected: expected, + operator: operator, + stackStartFunction: stackStartFunction + }); + } + + // EXTENSION! allows for well behaved errors defined elsewhere. + assert.fail = fail; + + // 4. Pure assertion tests whether a value is truthy, as determined + // by !!guard. + // assert.ok(guard, message_opt); + // This statement is equivalent to assert.equal(true, !!guard, + // message_opt);. To test strictly for the value true, use + // assert.strictEqual(true, guard, message_opt);. + + function ok(value, message) { + if (!value) { fail(value, true, message, '==', assert.ok); } + } + assert.ok = ok; + + // 5. The equality assertion tests shallow, coercive equality with + // ==. + // assert.equal(actual, expected, message_opt); + + assert.equal = function equal(actual, expected, message) { + if (actual != expected) { fail(actual, expected, message, '==', assert.equal); } + }; + + // 6. The non-equality assertion tests for whether two objects are not equal + // with != assert.notEqual(actual, expected, message_opt); + + assert.notEqual = function notEqual(actual, expected, message) { + if (actual == expected) { + fail(actual, expected, message, '!=', assert.notEqual); + } + }; + + // 7. The equivalence assertion tests a deep equality relation. + // assert.deepEqual(actual, expected, message_opt); + + assert.deepEqual = function deepEqual(actual, expected, message) { + if (!_deepEqual(actual, expected)) { + fail(actual, expected, message, 'deepEqual', assert.deepEqual); + } + }; + + function _deepEqual(actual, expected) { + // 7.1. All identical values are equivalent, as determined by ===. + if (actual === expected) { + return true; + + } else if (util.isBuffer(actual) && util.isBuffer(expected)) { + if (actual.length != expected.length) { return false; } + + for (var i = 0; i < actual.length; i++) { + if (actual[i] !== expected[i]) { return false; } + } + + return true; + + // 7.2. If the expected value is a Date object, the actual value is + // equivalent if it is also a Date object that refers to the same time. + } else if (util.isDate(actual) && util.isDate(expected)) { + return actual.getTime() === expected.getTime(); + + // 7.3 If the expected value is a RegExp object, the actual value is + // equivalent if it is also a RegExp object with the same source and + // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). + } else if (util.isRegExp(actual) && util.isRegExp(expected)) { + return actual.source === expected.source + && actual.global === expected.global + && actual.multiline === expected.multiline + && actual.lastIndex === expected.lastIndex + && actual.ignoreCase === expected.ignoreCase; + + // 7.4. Other pairs that do not both pass typeof value == 'object', + // equivalence is determined by ==. + } else if (!util.isObject(actual) && !util.isObject(expected)) { + return actual == expected; + + // 7.5 For all other Object pairs, including Array objects, equivalence is + // determined by having the same number of owned properties (as verified + // with Object.prototype.hasOwnProperty.call), the same set of keys + // (although not necessarily the same order), equivalent values for every + // corresponding key, and an identical 'prototype' property. Note: this + // accounts for both named and indexed properties on Arrays. + } else { + return objEquiv(actual, expected); + } + } + + function isArguments(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; + } + + function objEquiv(a, b) { + if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) { return false; } + // an identical 'prototype' property. + if (a.prototype !== b.prototype) { return false; } + // ~~~I've managed to break Object.keys through screwy arguments passing. + // Converting to array solves the problem. + if (isArguments(a)) { + if (!isArguments(b)) { + return false; + } + a = pSlice.call(a); + b = pSlice.call(b); + return _deepEqual(a, b); + } + try { + var ka = objectKeys(a), + kb = objectKeys(b), + key, i; + } catch (e) { // happens when one is a string literal and the other isn't + return false; + } + // having the same number of owned properties (keys incorporates + // hasOwnProperty) + if (ka.length != kb.length) { return false; } + // the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + // ~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) { return false; } + } + // equivalent values for every corresponding key, and + // ~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!_deepEqual(a[key], b[key])) { return false; } + } + return true; + } + + // 8. The non-equivalence assertion tests for any deep inequality. + // assert.notDeepEqual(actual, expected, message_opt); + + assert.notDeepEqual = function notDeepEqual(actual, expected, message) { + if (_deepEqual(actual, expected)) { + fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); + } + }; + + // 9. The strict equality assertion tests strict equality, as determined by ===. + // assert.strictEqual(actual, expected, message_opt); + + assert.strictEqual = function strictEqual(actual, expected, message) { + if (actual !== expected) { + fail(actual, expected, message, '===', assert.strictEqual); + } + }; + + // 10. The strict non-equality assertion tests for strict inequality, as + // determined by !==. assert.notStrictEqual(actual, expected, message_opt); + + assert.notStrictEqual = function notStrictEqual(actual, expected, message) { + if (actual === expected) { + fail(actual, expected, message, '!==', assert.notStrictEqual); + } + }; + + function expectedException(actual, expected) { + if (!actual || !expected) { + return false; + } + + if (Object.prototype.toString.call(expected) == '[object RegExp]') { + return expected.test(actual); + } else if (actual instanceof expected) { + return true; + } else if (expected.call({}, actual) === true) { + return true; + } + + return false; + } + + function _throws(shouldThrow, block, expected, message) { + var actual; + + if (util.isString(expected)) { + message = expected; + expected = null; + } + + try { + block(); + } catch (e) { + actual = e; + } + + message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + + (message ? ' ' + message : '.'); + + if (shouldThrow && !actual) { + fail(actual, expected, 'Missing expected exception' + message); + } + + if (!shouldThrow && expectedException(actual, expected)) { + fail(actual, expected, 'Got unwanted exception' + message); + } + + if ((shouldThrow && actual && expected + && !expectedException(actual, expected)) || (!shouldThrow && actual)) { + throw actual; + } + } + + // 11. Expected to throw an error: + // assert.throws(block, Error_opt, message_opt); + + assert.throws = function (block, /* optional*/error, /* optional*/message) { + _throws.apply(this, [ true ].concat(pSlice.call(arguments))); + }; + + // EXTENSION! This is annoying to write outside this module. + assert.doesNotThrow = function (block, /* optional*/message) { + _throws.apply(this, [ false ].concat(pSlice.call(arguments))); + }; + + assert.ifError = function (err) { if (err) { throw err; } }; + + var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + if (hasOwn.call(obj, key)) { keys.push(key); } + } + return keys; + }; + + }, { 'util/': 18 } ], 17: [ function (_dereq_, module, exports) { + module.exports = function isBuffer(arg) { + return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; -} -},{}],18:[function(_dereq_,module,exports){ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var formatRegExp = /%[sdj%]/g; -exports.format = function(f) { - if (!isString(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -}; - - -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If --no-deprecation is set, then it is a no-op. -exports.deprecate = function(fn, msg) { - // Allow for deprecating things in the process of starting up. - if (isUndefined(global.process)) { - return function() { - return exports.deprecate(fn, msg).apply(this, arguments); - }; - } - - if (process.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (process.throwDeprecation) { - throw new Error(msg); - } else if (process.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -}; - - -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) { - if (isUndefined(debugEnviron)) - debugEnviron = process.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; - - -/** + }; + }, {} ], 18: [ function (_dereq_, module, exports) { + // Copyright Joyent, Inc. and other Node contributors. + // + // Permission is hereby granted, free of charge, to any person obtaining a + // copy of this software and associated documentation files (the + // "Software"), to deal in the Software without restriction, including + // without limitation the rights to use, copy, modify, merge, publish, + // distribute, sublicense, and/or sell copies of the Software, and to permit + // persons to whom the Software is furnished to do so, subject to the + // following conditions: + // + // The above copyright notice and this permission notice shall be included + // in all copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var formatRegExp = /%[sdj%]/g; + exports.format = function (f) { + if (!isString(f)) { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function (x) { + if (x === '%%') { return '%'; } + if (i >= len) { return x; } + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; + }; + + // Mark that a method should not be used. + // Returns a modified function which warns once by default. + // If --no-deprecation is set, then it is a no-op. + exports.deprecate = function (fn, msg) { + // Allow for deprecating things in the process of starting up. + if (isUndefined(global.process)) { + return function () { + return exports.deprecate(fn, msg).apply(this, arguments); + }; + } + + if (process.noDeprecation === true) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (process.throwDeprecation) { + throw new Error(msg); + } else if (process.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; + }; + + var debugs = {}; + var debugEnviron; + exports.debuglog = function (set) { + if (isUndefined(debugEnviron)) { debugEnviron = process.env.NODE_DEBUG || ''; } + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = process.pid; + debugs[set] = function () { + var msg = exports.format.apply(exports, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function () {}; + } + } + return debugs[set]; + }; + + /** * Echos the value of a value. Trys to print the value out * in the best way possible given the different types. * * @param {Object} obj The object to print out. * @param {Object} opts Optional options object that alters the output. */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; - - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && + /* legacy: obj, showHidden, depth, colors*/ + function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) { ctx.depth = arguments[2]; } + if (arguments.length >= 4) { ctx.colors = arguments[3]; } + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + exports._extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) { ctx.showHidden = false; } + if (isUndefined(ctx.depth)) { ctx.depth = 2; } + if (isUndefined(ctx.colors)) { ctx.colors = false; } + if (isUndefined(ctx.customInspect)) { ctx.customInspect = true; } + if (ctx.colors) { ctx.stylize = stylizeWithColor; } + return formatValue(ctx, obj, ctx.depth); + } + exports.inspect = inspect; + + // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics + inspect.colors = { + bold: [ 1, 22 ], + italic: [ 3, 23 ], + underline: [ 4, 24 ], + inverse: [ 7, 27 ], + white: [ 37, 39 ], + grey: [ 90, 39 ], + black: [ 30, 39 ], + blue: [ 34, 39 ], + cyan: [ 36, 39 ], + green: [ 32, 39 ], + magenta: [ 35, 39 ], + red: [ 31, 39 ], + yellow: [ 33, 39 ] + }; + + // Don't use 'blue' not visible on cmd.exe + inspect.styles = { + special: 'cyan', + number: 'yellow', + boolean: 'yellow', + undefined: 'grey', + null: 'bold', + string: 'green', + date: 'magenta', + // "name": intentionally not styling + regexp: 'red' + }; + + function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } + } + + function stylizeNoColor(str, styleType) { + return str; + } + + function arrayToHash(array) { + var hash = {}; + + array.forEach(function (val, idx) { + hash[val] = true; + }); + + return hash; + } + + function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect + && value + && isFunction(value.inspect) // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && + && value.inspect !== exports.inspect // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // IE doesn't make error fields non-enumerable - // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError(value) + && !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // IE doesn't make error fields non-enumerable + // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx + if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = _dereq_('./support/isBuffer'); - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; - - -/** + return formatError(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '', + array = false, + braces = [ '{', '}' ]; + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = [ '[', ']' ]; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function (key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); + } + + function formatPrimitive(ctx, value) { + if (isUndefined(value)) { return ctx.stylize('undefined', 'undefined'); } + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, '\\\'') + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) { return ctx.stylize('' + value, 'number'); } + if (isBoolean(value)) { return ctx.stylize('' + value, 'boolean'); } + // For some reason typeof null is "object", so special case here. + if (isNull(value)) { return ctx.stylize('null', 'null'); } + } + + function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; + } + + function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function (key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; + } + + function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function (line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function (line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, '\\\'') + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, '\''); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; + } + + function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function (prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) { numLinesEst++; } + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; + } + + // NOTE: These type checking functions intentionally don't use `instanceof` + // because it is fragile and can be easily faked with `Object.create()`. + function isArray(ar) { + return Array.isArray(ar); + } + exports.isArray = isArray; + + function isBoolean(arg) { + return typeof arg === 'boolean'; + } + exports.isBoolean = isBoolean; + + function isNull(arg) { + return arg === null; + } + exports.isNull = isNull; + + function isNullOrUndefined(arg) { + return arg == null; + } + exports.isNullOrUndefined = isNullOrUndefined; + + function isNumber(arg) { + return typeof arg === 'number'; + } + exports.isNumber = isNumber; + + function isString(arg) { + return typeof arg === 'string'; + } + exports.isString = isString; + + function isSymbol(arg) { + return typeof arg === 'symbol'; + } + exports.isSymbol = isSymbol; + + function isUndefined(arg) { + return arg === void 0; + } + exports.isUndefined = isUndefined; + + function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; + } + exports.isRegExp = isRegExp; + + function isObject(arg) { + return typeof arg === 'object' && arg !== null; + } + exports.isObject = isObject; + + function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; + } + exports.isDate = isDate; + + function isError(e) { + return isObject(e) + && (objectToString(e) === '[object Error]' || e instanceof Error); + } + exports.isError = isError; + + function isFunction(arg) { + return typeof arg === 'function'; + } + exports.isFunction = isFunction; + + function isPrimitive(arg) { + return arg === null + || typeof arg === 'boolean' + || typeof arg === 'number' + || typeof arg === 'string' + || typeof arg === 'symbol' // ES6 symbol + || typeof arg === 'undefined'; + } + exports.isPrimitive = isPrimitive; + + exports.isBuffer = _dereq_('./support/isBuffer'); + + function objectToString(o) { + return Object.prototype.toString.call(o); + } + + function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); + } + + var months = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', + 'Oct', 'Nov', 'Dec' ]; + + // 26 Feb 16:19:34 + function timestamp() { + var d = new Date(); + var time = [ pad(d.getHours()), + pad(d.getMinutes()), + pad(d.getSeconds()) ].join(':'); + return [ d.getDate(), months[d.getMonth()], time ].join(' '); + } + + // log is just a thin wrapper to console.log that prepends a timestamp + exports.log = function () { + console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); + }; + + /** * Inherit the prototype methods from one constructor into another. * * The Function.prototype.inherits from lang.js rewritten as a standalone @@ -2638,49 +2580,48 @@ exports.log = function() { * prototype. * @param {function} superCtor Constructor function to inherit prototype from. */ -exports.inherits = _dereq_('inherits'); - -exports._extend = function(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -},{"./support/isBuffer":17,"inherits":19}],19:[function(_dereq_,module,exports){ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} - -},{}]},{},[14]) -(14) -}); \ No newline at end of file + exports.inherits = _dereq_('inherits'); + + exports._extend = function (origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject(add)) { return origin; } + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; + }; + + function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + + }, { './support/isBuffer': 17, inherits: 19 } ], 19: [ function (_dereq_, module, exports) { + if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; + } else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; + } + + }, {} ] }, {}, [ 14 ]))(14); +})); diff --git a/app/lib/tests/specs/app_tests.js b/app/lib/tests/specs/app_tests.js index 7265a2b..5bc6c76 100644 --- a/app/lib/tests/specs/app_tests.js +++ b/app/lib/tests/specs/app_tests.js @@ -1,6 +1,8 @@ +/* eslint-disable */ + /** * Movies - * + * * @copyright * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. * @@ -11,22 +13,22 @@ var should = require('/tests/should'); -describe('Layout (iPhone 4 inch)', function() { - - var layout = Alloy.Globals.calculateElementDimensions({width: 360, height: 568}); - - it("Should have correct overlay dimensions", function() { +describe('Layout (iPhone 4 inch)', function () { + + var layout = Alloy.Globals.calculateElementDimensions({ width: 360, height: 568 }); + + it('Should have correct overlay dimensions', function () { layout.overlay.width.should.equal(320); }); - - it("Should have correct lists user cell dimensions", function() { + + it('Should have correct lists user cell dimensions', function () { layout.lists.userCell.width.should.equal(340); layout.lists.userCell.imageLeft.should.be.approximately(-56.7, 0.1); layout.lists.userCell.imageWidth.should.be.approximately(453.3, 0.1); layout.lists.userCell.imageHeight.should.be.approximately(254.9, 0.1); - }); - - it("Should have correct lists cell dimensions", function() { + }); + + it('Should have correct lists cell dimensions', function () { layout.lists.cell.width.should.equal(165); layout.lists.cell.height.should.equal(165); layout.lists.cell.imageTop.should.equal(-20); @@ -34,25 +36,25 @@ describe('Layout (iPhone 4 inch)', function() { layout.lists.cell.imageWidth.should.equal(495); layout.lists.cell.imageHeight.should.be.approximately(278.4, 0.1); }); - + }); -describe('Layout (Nexus 5)', function() { - - var layout = Alloy.Globals.calculateElementDimensions({width: 338, height: 690}); - - it("Should have correct overlay dimensions", function() { +describe('Layout (Nexus 5)', function () { + + var layout = Alloy.Globals.calculateElementDimensions({ width: 338, height: 690 }); + + it('Should have correct overlay dimensions', function () { layout.overlay.width.should.equal(298); }); - - it("Should have correct lists user cell dimensions", function() { + + it('Should have correct lists user cell dimensions', function () { layout.lists.userCell.width.should.equal(318); layout.lists.userCell.imageLeft.should.equal(-53); layout.lists.userCell.imageWidth.should.equal(424); layout.lists.userCell.imageHeight.should.equal(238.5); }); - - it("Should have correct lists cell dimensions", function() { + + it('Should have correct lists cell dimensions', function () { layout.lists.cell.width.should.equal(154); layout.lists.cell.height.should.equal(154); layout.lists.cell.imageTop.should.equal(-20); diff --git a/app/lib/tests/tests_runner.js b/app/lib/tests/tests_runner.js index a9bddbc..0a1d131 100644 --- a/app/lib/tests/tests_runner.js +++ b/app/lib/tests/tests_runner.js @@ -1,20 +1,21 @@ +/* eslint-disable */ // mocha require('tests/ti-mocha'); -mocha.setup({reporter: 'ti-spec-studio'}); +mocha.setup({ reporter: 'ti-spec-studio' }); // specs var require_path = 'tests/specs/'; var specs_dir = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory + require_path); var spec_files = specs_dir.getDirectoryListing(); -for (var i=0; i @@ -42,68 +43,66 @@ // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;(function(){ +(function () { // CommonJS require() -function require(p){ - var path = require.resolve(p) - , mod = require.modules[path]; - if (!mod) throw new Error('failed to require "' + p + '"'); - if (!mod.exports) { - mod.exports = {}; - mod.call(mod.exports, mod, mod.exports, require.relative(path)); - } - return mod.exports; - } - -require.modules = {}; - -require.resolve = function (path){ - var orig = path - , reg = path + '.js' - , index = path + '/index.js'; - return require.modules[reg] && reg + function require(p) { + var path = require.resolve(p), + mod = require.modules[path]; + if (!mod) { throw new Error('failed to require "' + p + '"'); } + if (!mod.exports) { + mod.exports = {}; + mod.call(mod.exports, mod, mod.exports, require.relative(path)); + } + return mod.exports; + } + + require.modules = {}; + + require.resolve = function (path) { + var orig = path, + reg = path + '.js', + index = path + '/index.js'; + return require.modules[reg] && reg || require.modules[index] && index || orig; - }; - -require.register = function (path, fn){ - require.modules[path] = fn; - }; + }; -require.relative = function (parent) { - return function(p){ - if ('.' != p.charAt(0)) return require(p); + require.register = function (path, fn) { + require.modules[path] = fn; + }; - var path = parent.split('/') - , segs = p.split('/'); - path.pop(); + require.relative = function (parent) { + return function (p) { + if (p.charAt(0) != '.') { return require(p); } - for (var i = 0; i < segs.length; i++) { - var seg = segs[i]; - if ('..' == seg) path.pop(); - else if ('.' != seg) path.push(seg); - } + var path = parent.split('/'), + segs = p.split('/'); + path.pop(); - return require(path.join('/')); - }; - }; + for (var i = 0; i < segs.length; i++) { + var seg = segs[i]; + if (seg == '..') { path.pop(); } else if (seg != '.') { path.push(seg); } + } + return require(path.join('/')); + }; + }; -require.register("browser/debug.js", function(module, exports, require){ + require.register('browser/debug.js', function (module, exports, require) { -module.exports = function(type){ - return function(){ - } -}; + module.exports = function (type) { + return function () { + }; + }; -}); // module: browser/debug.js + }); // module: browser/debug.js -require.register("browser/diff.js", function(module, exports, require){ -/* See LICENSE file for terms of use */ + require.register('browser/diff.js', function (module, exports, require) { + /* See LICENSE file for terms of use */ -/* + /* * Text diff implementation. * * This library supports the following APIS: @@ -117,555 +116,560 @@ require.register("browser/diff.js", function(module, exports, require){ * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986). * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927 */ -var JsDiff = (function() { - /*jshint maxparams: 5*/ - function clonePath(path) { - return { newPos: path.newPos, components: path.components.slice(0) }; - } - function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - return ret; - } - function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - - return n; - } - - var Diff = function(ignoreWhitespace) { - this.ignoreWhitespace = ignoreWhitespace; - }; - Diff.prototype = { - diff: function(oldString, newString) { - // Handle the identity case (this is due to unrolling editLength == 0 - if (newString === oldString) { - return [{ value: newString }]; - } - if (!newString) { - return [{ value: oldString, removed: true }]; - } - if (!oldString) { - return [{ value: newString, added: true }]; - } - - newString = this.tokenize(newString); - oldString = this.tokenize(oldString); - - var newLen = newString.length, oldLen = oldString.length; - var maxEditLength = newLen + oldLen; - var bestPath = [{ newPos: -1, components: [] }]; - - // Seed editLength = 0 - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - if (bestPath[0].newPos+1 >= newLen && oldPos+1 >= oldLen) { - return bestPath[0].components; - } - - for (var editLength = 1; editLength <= maxEditLength; editLength++) { - for (var diagonalPath = -1*editLength; diagonalPath <= editLength; diagonalPath+=2) { - var basePath; - var addPath = bestPath[diagonalPath-1], - removePath = bestPath[diagonalPath+1]; - oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - if (addPath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath-1] = undefined; - } - - var canAdd = addPath && addPath.newPos+1 < newLen; - var canRemove = removePath && 0 <= oldPos && oldPos < oldLen; - if (!canAdd && !canRemove) { - bestPath[diagonalPath] = undefined; - continue; - } - - // Select the diagonal that we want to branch from. We select the prior - // path whose position in the new string is the farthest from the origin - // and does not pass the bounds of the diff graph - if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) { - basePath = clonePath(removePath); - this.pushComponent(basePath.components, oldString[oldPos], undefined, true); - } else { - basePath = clonePath(addPath); - basePath.newPos++; - this.pushComponent(basePath.components, newString[basePath.newPos], true, undefined); - } - - var oldPos = this.extractCommon(basePath, newString, oldString, diagonalPath); - - if (basePath.newPos+1 >= newLen && oldPos+1 >= oldLen) { - return basePath.components; - } else { - bestPath[diagonalPath] = basePath; - } - } - } - }, - - pushComponent: function(components, value, added, removed) { - var last = components[components.length-1]; - if (last && last.added === added && last.removed === removed) { - // We need to clone here as the component clone operation is just - // as shallow array clone - components[components.length-1] = - {value: this.join(last.value, value), added: added, removed: removed }; - } else { - components.push({value: value, added: added, removed: removed }); - } - }, - extractCommon: function(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, - oldLen = oldString.length, - newPos = basePath.newPos, - oldPos = newPos - diagonalPath; - while (newPos+1 < newLen && oldPos+1 < oldLen && this.equals(newString[newPos+1], oldString[oldPos+1])) { - newPos++; - oldPos++; - - this.pushComponent(basePath.components, newString[newPos], undefined, undefined); - } - basePath.newPos = newPos; - return oldPos; - }, - - equals: function(left, right) { - var reWhitespace = /\S/; - if (this.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right)) { - return true; - } else { - return left === right; - } - }, - join: function(left, right) { - return left + right; - }, - tokenize: function(value) { - return value; - } - }; - - var CharDiff = new Diff(); - - var WordDiff = new Diff(true); - var WordWithSpaceDiff = new Diff(); - WordDiff.tokenize = WordWithSpaceDiff.tokenize = function(value) { - return removeEmpty(value.split(/(\s+|\b)/)); - }; - - var CssDiff = new Diff(true); - CssDiff.tokenize = function(value) { - return removeEmpty(value.split(/([{}:;,]|\s+)/)); - }; - - var LineDiff = new Diff(); - LineDiff.tokenize = function(value) { - return value.split(/^/m); - }; - - return { - Diff: Diff, - - diffChars: function(oldStr, newStr) { return CharDiff.diff(oldStr, newStr); }, - diffWords: function(oldStr, newStr) { return WordDiff.diff(oldStr, newStr); }, - diffWordsWithSpace: function(oldStr, newStr) { return WordWithSpaceDiff.diff(oldStr, newStr); }, - diffLines: function(oldStr, newStr) { return LineDiff.diff(oldStr, newStr); }, - - diffCss: function(oldStr, newStr) { return CssDiff.diff(oldStr, newStr); }, - - createPatch: function(fileName, oldStr, newStr, oldHeader, newHeader) { - var ret = []; - - ret.push('Index: ' + fileName); - ret.push('==================================================================='); - ret.push('--- ' + fileName + (typeof oldHeader === 'undefined' ? '' : '\t' + oldHeader)); - ret.push('+++ ' + fileName + (typeof newHeader === 'undefined' ? '' : '\t' + newHeader)); - - var diff = LineDiff.diff(oldStr, newStr); - if (!diff[diff.length-1].value) { - diff.pop(); // Remove trailing newline add - } - diff.push({value: '', lines: []}); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function(entry) { return ' ' + entry; }); - } - function eofNL(curRange, i, current) { - var last = diff[diff.length-2], - isLast = i === diff.length-2, - isLastOfType = i === diff.length-3 && (current.added !== last.added || current.removed !== last.removed); - - // Figure out if this is the last line for the given file and missing NL - if (!/\n$/.test(current.value) && (isLast || isLastOfType)) { - curRange.push('\\ No newline at end of file'); - } - } - - var oldRangeStart = 0, newRangeStart = 0, curRange = [], - oldLine = 1, newLine = 1; - for (var i = 0; i < diff.length; i++) { - var current = diff[i], - lines = current.lines || current.value.replace(/\n$/, '').split('\n'); - current.lines = lines; - - if (current.added || current.removed) { - if (!oldRangeStart) { - var prev = diff[i-1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - - if (prev) { - curRange = contextLines(prev.lines.slice(-4)); - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } - curRange.push.apply(curRange, lines.map(function(entry) { return (current.added?'+':'-') + entry; })); - eofNL(curRange, i, current); - - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= 8 && i < diff.length-2) { - // Overlapping - curRange.push.apply(curRange, contextLines(lines)); - } else { - // end the range and output - var contextSize = Math.min(lines.length, 4); - ret.push( - '@@ -' + oldRangeStart + ',' + (oldLine-oldRangeStart+contextSize) - + ' +' + newRangeStart + ',' + (newLine-newRangeStart+contextSize) + var JsDiff = (function () { + /* jshint maxparams: 5*/ + function clonePath(path) { + return { newPos: path.newPos, components: path.components.slice(0) }; + } + function removeEmpty(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + if (array[i]) { + ret.push(array[i]); + } + } + return ret; + } + function escapeHTML(s) { + var n = s; + n = n.replace(/&/g, '&'); + n = n.replace(//g, '>'); + n = n.replace(/"/g, '"'); + + return n; + } + + var Diff = function (ignoreWhitespace) { + this.ignoreWhitespace = ignoreWhitespace; + }; + Diff.prototype = { + diff: function (oldString, newString) { + // Handle the identity case (this is due to unrolling editLength == 0 + if (newString === oldString) { + return [ { value: newString } ]; + } + if (!newString) { + return [ { value: oldString, removed: true } ]; + } + if (!oldString) { + return [ { value: newString, added: true } ]; + } + + newString = this.tokenize(newString); + oldString = this.tokenize(oldString); + + var newLen = newString.length, + oldLen = oldString.length; + var maxEditLength = newLen + oldLen; + var bestPath = [ { newPos: -1, components: [] } ]; + + // Seed editLength = 0 + var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); + if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + return bestPath[0].components; + } + + for (var editLength = 1; editLength <= maxEditLength; editLength++) { + for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { + var basePath; + var addPath = bestPath[diagonalPath - 1], + removePath = bestPath[diagonalPath + 1]; + oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; + if (addPath) { + // No one else is going to attempt to use this value, clear it + bestPath[diagonalPath - 1] = undefined; + } + + var canAdd = addPath && addPath.newPos + 1 < newLen; + var canRemove = removePath && oldPos >= 0 && oldPos < oldLen; + if (!canAdd && !canRemove) { + bestPath[diagonalPath] = undefined; + continue; + } + + // Select the diagonal that we want to branch from. We select the prior + // path whose position in the new string is the farthest from the origin + // and does not pass the bounds of the diff graph + if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) { + basePath = clonePath(removePath); + this.pushComponent(basePath.components, oldString[oldPos], undefined, true); + } else { + basePath = clonePath(addPath); + basePath.newPos++; + this.pushComponent(basePath.components, newString[basePath.newPos], true, undefined); + } + + var oldPos = this.extractCommon(basePath, newString, oldString, diagonalPath); + + if (basePath.newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + return basePath.components; + } else { + bestPath[diagonalPath] = basePath; + } + } + } + }, + + pushComponent: function (components, value, added, removed) { + var last = components[components.length - 1]; + if (last && last.added === added && last.removed === removed) { + // We need to clone here as the component clone operation is just + // as shallow array clone + components[components.length - 1] + = { value: this.join(last.value, value), added: added, removed: removed }; + } else { + components.push({ value: value, added: added, removed: removed }); + } + }, + extractCommon: function (basePath, newString, oldString, diagonalPath) { + var newLen = newString.length, + oldLen = oldString.length, + newPos = basePath.newPos, + oldPos = newPos - diagonalPath; + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { + newPos++; + oldPos++; + + this.pushComponent(basePath.components, newString[newPos], undefined, undefined); + } + basePath.newPos = newPos; + return oldPos; + }, + + equals: function (left, right) { + var reWhitespace = /\S/; + if (this.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right)) { + return true; + } else { + return left === right; + } + }, + join: function (left, right) { + return left + right; + }, + tokenize: function (value) { + return value; + } + }; + + var CharDiff = new Diff(); + + var WordDiff = new Diff(true); + var WordWithSpaceDiff = new Diff(); + WordDiff.tokenize = WordWithSpaceDiff.tokenize = function (value) { + return removeEmpty(value.split(/(\s+|\b)/)); + }; + + var CssDiff = new Diff(true); + CssDiff.tokenize = function (value) { + return removeEmpty(value.split(/([{}:;,]|\s+)/)); + }; + + var LineDiff = new Diff(); + LineDiff.tokenize = function (value) { + return value.split(/^/m); + }; + + return { + Diff: Diff, + + diffChars: function (oldStr, newStr) { return CharDiff.diff(oldStr, newStr); }, + diffWords: function (oldStr, newStr) { return WordDiff.diff(oldStr, newStr); }, + diffWordsWithSpace: function (oldStr, newStr) { return WordWithSpaceDiff.diff(oldStr, newStr); }, + diffLines: function (oldStr, newStr) { return LineDiff.diff(oldStr, newStr); }, + + diffCss: function (oldStr, newStr) { return CssDiff.diff(oldStr, newStr); }, + + createPatch: function (fileName, oldStr, newStr, oldHeader, newHeader) { + var ret = []; + + ret.push('Index: ' + fileName); + ret.push('==================================================================='); + ret.push('--- ' + fileName + (typeof oldHeader === 'undefined' ? '' : '\t' + oldHeader)); + ret.push('+++ ' + fileName + (typeof newHeader === 'undefined' ? '' : '\t' + newHeader)); + + var diff = LineDiff.diff(oldStr, newStr); + if (!diff[diff.length - 1].value) { + diff.pop(); // Remove trailing newline add + } + diff.push({ value: '', lines: [] }); // Append an empty value to make cleanup easier + + function contextLines(lines) { + return lines.map(function (entry) { return ' ' + entry; }); + } + function eofNL(curRange, i, current) { + var last = diff[diff.length - 2], + isLast = i === diff.length - 2, + isLastOfType = i === diff.length - 3 && (current.added !== last.added || current.removed !== last.removed); + + // Figure out if this is the last line for the given file and missing NL + if (!/\n$/.test(current.value) && (isLast || isLastOfType)) { + curRange.push('\\ No newline at end of file'); + } + } + + var oldRangeStart = 0, + newRangeStart = 0, + curRange = [], + oldLine = 1, + newLine = 1; + for (var i = 0; i < diff.length; i++) { + var current = diff[i], + lines = current.lines || current.value.replace(/\n$/, '').split('\n'); + current.lines = lines; + + if (current.added || current.removed) { + if (!oldRangeStart) { + var prev = diff[i - 1]; + oldRangeStart = oldLine; + newRangeStart = newLine; + + if (prev) { + curRange = contextLines(prev.lines.slice(-4)); + oldRangeStart -= curRange.length; + newRangeStart -= curRange.length; + } + } + curRange.push.apply(curRange, lines.map(function (entry) { return (current.added ? '+' : '-') + entry; })); + eofNL(curRange, i, current); + + if (current.added) { + newLine += lines.length; + } else { + oldLine += lines.length; + } + } else { + if (oldRangeStart) { + // Close out any changes that have been output (or join overlapping) + if (lines.length <= 8 && i < diff.length - 2) { + // Overlapping + curRange.push.apply(curRange, contextLines(lines)); + } else { + // end the range and output + var contextSize = Math.min(lines.length, 4); + ret.push( + '@@ -' + oldRangeStart + ',' + (oldLine - oldRangeStart + contextSize) + + ' +' + newRangeStart + ',' + (newLine - newRangeStart + contextSize) + ' @@'); - ret.push.apply(ret, curRange); - ret.push.apply(ret, contextLines(lines.slice(0, contextSize))); - if (lines.length <= 4) { - eofNL(ret, i, current); - } - - oldRangeStart = 0; newRangeStart = 0; curRange = []; - } - } - oldLine += lines.length; - newLine += lines.length; - } - } - - return ret.join('\n') + '\n'; - }, - - applyPatch: function(oldStr, uniDiff) { - var diffstr = uniDiff.split('\n'); - var diff = []; - var remEOFNL = false, - addEOFNL = false; - - for (var i = (diffstr[0][0]==='I'?4:0); i < diffstr.length; i++) { - if(diffstr[i][0] === '@') { - var meh = diffstr[i].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/); - diff.unshift({ - start:meh[3], - oldlength:meh[2], - oldlines:[], - newlength:meh[4], - newlines:[] - }); - } else if(diffstr[i][0] === '+') { - diff[0].newlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === '-') { - diff[0].oldlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === ' ') { - diff[0].newlines.push(diffstr[i].substr(1)); - diff[0].oldlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === '\\') { - if (diffstr[i-1][0] === '+') { - remEOFNL = true; - } else if(diffstr[i-1][0] === '-') { - addEOFNL = true; - } - } - } - - var str = oldStr.split('\n'); - for (var i = diff.length - 1; i >= 0; i--) { - var d = diff[i]; - for (var j = 0; j < d.oldlength; j++) { - if(str[d.start-1+j] !== d.oldlines[j]) { - return false; - } - } - Array.prototype.splice.apply(str,[d.start-1,+d.oldlength].concat(d.newlines)); - } - - if (remEOFNL) { - while (!str[str.length-1]) { - str.pop(); - } - } else if (addEOFNL) { - str.push(''); - } - return str.join('\n'); - }, - - convertChangesToXML: function(changes){ - var ret = []; - for ( var i = 0; i < changes.length; i++) { - var change = changes[i]; - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - - ret.push(escapeHTML(change.value)); - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - return ret.join(''); - }, - - // See: http://code.google.com/p/google-diff-match-patch/wiki/API - convertChangesToDMP: function(changes){ - var ret = [], change; - for ( var i = 0; i < changes.length; i++) { - change = changes[i]; - ret.push([(change.added ? 1 : change.removed ? -1 : 0), change.value]); - } - return ret; - } - }; -})(); - -if (typeof module !== 'undefined') { - module.exports = JsDiff; -} - -}); // module: browser/diff.js - -require.register("browser/events.js", function(module, exports, require){ - -/** + ret.push.apply(ret, curRange); + ret.push.apply(ret, contextLines(lines.slice(0, contextSize))); + if (lines.length <= 4) { + eofNL(ret, i, current); + } + + oldRangeStart = 0; newRangeStart = 0; curRange = []; + } + } + oldLine += lines.length; + newLine += lines.length; + } + } + + return ret.join('\n') + '\n'; + }, + + applyPatch: function (oldStr, uniDiff) { + var diffstr = uniDiff.split('\n'); + var diff = []; + var remEOFNL = false, + addEOFNL = false; + + for (var i = (diffstr[0][0] === 'I' ? 4 : 0); i < diffstr.length; i++) { + if (diffstr[i][0] === '@') { + var meh = diffstr[i].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/); + diff.unshift({ + start: meh[3], + oldlength: meh[2], + oldlines: [], + newlength: meh[4], + newlines: [] + }); + } else if (diffstr[i][0] === '+') { + diff[0].newlines.push(diffstr[i].substr(1)); + } else if (diffstr[i][0] === '-') { + diff[0].oldlines.push(diffstr[i].substr(1)); + } else if (diffstr[i][0] === ' ') { + diff[0].newlines.push(diffstr[i].substr(1)); + diff[0].oldlines.push(diffstr[i].substr(1)); + } else if (diffstr[i][0] === '\\') { + if (diffstr[i - 1][0] === '+') { + remEOFNL = true; + } else if (diffstr[i - 1][0] === '-') { + addEOFNL = true; + } + } + } + + var str = oldStr.split('\n'); + for (var i = diff.length - 1; i >= 0; i--) { + var d = diff[i]; + for (var j = 0; j < d.oldlength; j++) { + if (str[d.start - 1 + j] !== d.oldlines[j]) { + return false; + } + } + Array.prototype.splice.apply(str, [ d.start - 1, +d.oldlength ].concat(d.newlines)); + } + + if (remEOFNL) { + while (!str[str.length - 1]) { + str.pop(); + } + } else if (addEOFNL) { + str.push(''); + } + return str.join('\n'); + }, + + convertChangesToXML: function (changes) { + var ret = []; + for (var i = 0; i < changes.length; i++) { + var change = changes[i]; + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + + ret.push(escapeHTML(change.value)); + + if (change.added) { + ret.push(''); + } else if (change.removed) { + ret.push(''); + } + } + return ret.join(''); + }, + + // See: http://code.google.com/p/google-diff-match-patch/wiki/API + convertChangesToDMP: function (changes) { + var ret = [], + change; + for (var i = 0; i < changes.length; i++) { + change = changes[i]; + ret.push([ (change.added ? 1 : change.removed ? -1 : 0), change.value ]); + } + return ret; + } + }; + }()); + + if (typeof module !== 'undefined') { + module.exports = JsDiff; + } + + }); // module: browser/diff.js + + require.register('browser/events.js', function (module, exports, require) { + + /** * Module exports. */ -exports.EventEmitter = EventEmitter; + exports.EventEmitter = EventEmitter; -/** + /** * Check if `obj` is an array. */ -function isArray(obj) { - return '[object Array]' == {}.toString.call(obj); -} + function isArray(obj) { + return {}.toString.call(obj) == '[object Array]'; + } -/** + /** * Event emitter constructor. * * @api public */ -function EventEmitter(){}; + function EventEmitter() {} -/** + /** * Adds a listener. * * @api public */ -EventEmitter.prototype.on = function (name, fn) { - if (!this.$events) { - this.$events = {}; - } + EventEmitter.prototype.on = function (name, fn) { + if (!this.$events) { + this.$events = {}; + } - if (!this.$events[name]) { - this.$events[name] = fn; - } else if (isArray(this.$events[name])) { - this.$events[name].push(fn); - } else { - this.$events[name] = [this.$events[name], fn]; - } + if (!this.$events[name]) { + this.$events[name] = fn; + } else if (isArray(this.$events[name])) { + this.$events[name].push(fn); + } else { + this.$events[name] = [ this.$events[name], fn ]; + } - return this; -}; + return this; + }; -EventEmitter.prototype.addListener = EventEmitter.prototype.on; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; -/** + /** * Adds a volatile listener. * * @api public */ -EventEmitter.prototype.once = function (name, fn) { - var self = this; + EventEmitter.prototype.once = function (name, fn) { + var self = this; - function on () { - self.removeListener(name, on); - fn.apply(this, arguments); - }; + function on () { + self.removeListener(name, on); + fn.apply(this, arguments); + } - on.listener = fn; - this.on(name, on); + on.listener = fn; + this.on(name, on); - return this; -}; + return this; + }; -/** + /** * Removes a listener. * * @api public */ -EventEmitter.prototype.removeListener = function (name, fn) { - if (this.$events && this.$events[name]) { - var list = this.$events[name]; + EventEmitter.prototype.removeListener = function (name, fn) { + if (this.$events && this.$events[name]) { + var list = this.$events[name]; - if (isArray(list)) { - var pos = -1; + if (isArray(list)) { + var pos = -1; - for (var i = 0, l = list.length; i < l; i++) { - if (list[i] === fn || (list[i].listener && list[i].listener === fn)) { - pos = i; - break; - } - } + for (var i = 0, l = list.length; i < l; i++) { + if (list[i] === fn || (list[i].listener && list[i].listener === fn)) { + pos = i; + break; + } + } - if (pos < 0) { - return this; - } + if (pos < 0) { + return this; + } - list.splice(pos, 1); + list.splice(pos, 1); - if (!list.length) { - delete this.$events[name]; - } - } else if (list === fn || (list.listener && list.listener === fn)) { - delete this.$events[name]; - } - } + if (!list.length) { + delete this.$events[name]; + } + } else if (list === fn || (list.listener && list.listener === fn)) { + delete this.$events[name]; + } + } - return this; -}; + return this; + }; -/** + /** * Removes all listeners for an event. * * @api public */ -EventEmitter.prototype.removeAllListeners = function (name) { - if (name === undefined) { - this.$events = {}; - return this; - } + EventEmitter.prototype.removeAllListeners = function (name) { + if (name === undefined) { + this.$events = {}; + return this; + } - if (this.$events && this.$events[name]) { - this.$events[name] = null; - } + if (this.$events && this.$events[name]) { + this.$events[name] = null; + } - return this; -}; + return this; + }; -/** + /** * Gets all listeners for a certain event. * * @api public */ -EventEmitter.prototype.listeners = function (name) { - if (!this.$events) { - this.$events = {}; - } + EventEmitter.prototype.listeners = function (name) { + if (!this.$events) { + this.$events = {}; + } - if (!this.$events[name]) { - this.$events[name] = []; - } + if (!this.$events[name]) { + this.$events[name] = []; + } - if (!isArray(this.$events[name])) { - this.$events[name] = [this.$events[name]]; - } + if (!isArray(this.$events[name])) { + this.$events[name] = [ this.$events[name] ]; + } - return this.$events[name]; -}; + return this.$events[name]; + }; -/** + /** * Emits an event. * * @api public */ -EventEmitter.prototype.emit = function (name) { - if (!this.$events) { - return false; - } + EventEmitter.prototype.emit = function (name) { + if (!this.$events) { + return false; + } - var handler = this.$events[name]; + var handler = this.$events[name]; - if (!handler) { - return false; - } + if (!handler) { + return false; + } - var args = [].slice.call(arguments, 1); + var args = [].slice.call(arguments, 1); - if ('function' == typeof handler) { - handler.apply(this, args); - } else if (isArray(handler)) { - var listeners = handler.slice(); + if (typeof handler === 'function') { + handler.apply(this, args); + } else if (isArray(handler)) { + var listeners = handler.slice(); - for (var i = 0, l = listeners.length; i < l; i++) { - listeners[i].apply(this, args); - } - } else { - return false; - } + for (var i = 0, l = listeners.length; i < l; i++) { + listeners[i].apply(this, args); + } + } else { + return false; + } - return true; -}; -}); // module: browser/events.js + return true; + }; + }); // module: browser/events.js -require.register("browser/fs.js", function(module, exports, require){ + require.register('browser/fs.js', function (module, exports, require) { -}); // module: browser/fs.js + }); // module: browser/fs.js -require.register("browser/path.js", function(module, exports, require){ + require.register('browser/path.js', function (module, exports, require) { -}); // module: browser/path.js + }); // module: browser/path.js -require.register("browser/progress.js", function(module, exports, require){ -/** + require.register('browser/progress.js', function (module, exports, require) { + /** * Expose `Progress`. */ -module.exports = Progress; + module.exports = Progress; -/** + /** * Initialize a new `Progress` indicator. */ -function Progress() { - this.percent = 0; - this.size(0); - this.fontSize(11); - this.font('helvetica, arial, sans-serif'); -} + function Progress() { + this.percent = 0; + this.size(0); + this.fontSize(11); + this.font('helvetica, arial, sans-serif'); + } -/** + /** * Set progress size to `n`. * * @param {Number} n @@ -673,12 +677,12 @@ function Progress() { * @api public */ -Progress.prototype.size = function(n){ - this._size = n; - return this; -}; + Progress.prototype.size = function (n) { + this._size = n; + return this; + }; -/** + /** * Set text to `str`. * * @param {String} str @@ -686,12 +690,12 @@ Progress.prototype.size = function(n){ * @api public */ -Progress.prototype.text = function(str){ - this._text = str; - return this; -}; + Progress.prototype.text = function (str) { + this._text = str; + return this; + }; -/** + /** * Set font size to `n`. * * @param {Number} n @@ -699,117 +703,117 @@ Progress.prototype.text = function(str){ * @api public */ -Progress.prototype.fontSize = function(n){ - this._fontSize = n; - return this; -}; + Progress.prototype.fontSize = function (n) { + this._fontSize = n; + return this; + }; -/** + /** * Set font `family`. * * @param {String} family * @return {Progress} for chaining */ -Progress.prototype.font = function(family){ - this._font = family; - return this; -}; + Progress.prototype.font = function (family) { + this._font = family; + return this; + }; -/** + /** * Update percentage to `n`. * * @param {Number} n * @return {Progress} for chaining */ -Progress.prototype.update = function(n){ - this.percent = n; - return this; -}; + Progress.prototype.update = function (n) { + this.percent = n; + return this; + }; -/** + /** * Draw on `ctx`. * * @param {CanvasRenderingContext2d} ctx * @return {Progress} for chaining */ -Progress.prototype.draw = function(ctx){ - try { - var percent = Math.min(this.percent, 100) - , size = this._size - , half = size / 2 - , x = half - , y = half - , rad = half - 1 - , fontSize = this._fontSize; - - ctx.font = fontSize + 'px ' + this._font; - - var angle = Math.PI * 2 * (percent / 100); - ctx.clearRect(0, 0, size, size); - - // outer circle - ctx.strokeStyle = '#9f9f9f'; - ctx.beginPath(); - ctx.arc(x, y, rad, 0, angle, false); - ctx.stroke(); - - // inner circle - ctx.strokeStyle = '#eee'; - ctx.beginPath(); - ctx.arc(x, y, rad - 1, 0, angle, true); - ctx.stroke(); - - // text - var text = this._text || (percent | 0) + '%' - , w = ctx.measureText(text).width; - - ctx.fillText( - text - , x - w / 2 + 1 - , y + fontSize / 2 - 1); - } catch (ex) {} //don't fail if we can't render progress - return this; -}; - -}); // module: browser/progress.js - -require.register("browser/tty.js", function(module, exports, require){ - -exports.isatty = function(){ - return true; -}; - -exports.getWindowSize = function(){ - if ('innerHeight' in global) { - return [global.innerHeight, global.innerWidth]; - } else { - // In a Web Worker, the DOM Window is not available. - return [640, 480]; - } -}; - -}); // module: browser/tty.js - -require.register("context.js", function(module, exports, require){ - -/** + Progress.prototype.draw = function (ctx) { + try { + var percent = Math.min(this.percent, 100), + size = this._size, + half = size / 2, + x = half, + y = half, + rad = half - 1, + fontSize = this._fontSize; + + ctx.font = fontSize + 'px ' + this._font; + + var angle = Math.PI * 2 * (percent / 100); + ctx.clearRect(0, 0, size, size); + + // outer circle + ctx.strokeStyle = '#9f9f9f'; + ctx.beginPath(); + ctx.arc(x, y, rad, 0, angle, false); + ctx.stroke(); + + // inner circle + ctx.strokeStyle = '#eee'; + ctx.beginPath(); + ctx.arc(x, y, rad - 1, 0, angle, true); + ctx.stroke(); + + // text + var text = this._text || (percent | 0) + '%', + w = ctx.measureText(text).width; + + ctx.fillText( + text + , x - w / 2 + 1 + , y + fontSize / 2 - 1); + } catch (ex) {} // don't fail if we can't render progress + return this; + }; + + }); // module: browser/progress.js + + require.register('browser/tty.js', function (module, exports, require) { + + exports.isatty = function () { + return true; + }; + + exports.getWindowSize = function () { + if ('innerHeight' in global) { + return [ global.innerHeight, global.innerWidth ]; + } else { + // In a Web Worker, the DOM Window is not available. + return [ 640, 480 ]; + } + }; + + }); // module: browser/tty.js + + require.register('context.js', function (module, exports, require) { + + /** * Expose `Context`. */ -module.exports = Context; + module.exports = Context; -/** + /** * Initialize a new `Context`. * * @api private */ -function Context(){} + function Context() {} -/** + /** * Set or get the context `Runnable` to `runnable`. * * @param {Runnable} runnable @@ -817,13 +821,13 @@ function Context(){} * @api private */ -Context.prototype.runnable = function(runnable){ - if (0 == arguments.length) return this._runnable; - this.test = this._runnable = runnable; - return this; -}; + Context.prototype.runnable = function (runnable) { + if (arguments.length == 0) { return this._runnable; } + this.test = this._runnable = runnable; + return this; + }; -/** + /** * Set test timeout `ms`. * * @param {Number} ms @@ -831,12 +835,12 @@ Context.prototype.runnable = function(runnable){ * @api private */ -Context.prototype.timeout = function(ms){ - this.runnable().timeout(ms); - return this; -}; + Context.prototype.timeout = function (ms) { + this.runnable().timeout(ms); + return this; + }; -/** + /** * Set test slowness threshold `ms`. * * @param {Number} ms @@ -844,43 +848,43 @@ Context.prototype.timeout = function(ms){ * @api private */ -Context.prototype.slow = function(ms){ - this.runnable().slow(ms); - return this; -}; + Context.prototype.slow = function (ms) { + this.runnable().slow(ms); + return this; + }; -/** + /** * Inspect the context void of `._runnable`. * * @return {String} * @api private */ -Context.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - if ('_runnable' == key) return; - if ('test' == key) return; - return val; - }, 2); -}; + Context.prototype.inspect = function () { + return JSON.stringify(this, function (key, val) { + if (key == '_runnable') { return; } + if (key == 'test') { return; } + return val; + }, 2); + }; -}); // module: context.js + }); // module: context.js -require.register("hook.js", function(module, exports, require){ + require.register('hook.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var Runnable = require('./runnable'); + var Runnable = require('./runnable'); -/** + /** * Expose `Hook`. */ -module.exports = Hook; + module.exports = Hook; -/** + /** * Initialize a new `Hook` with the given `title` and callback `fn`. * * @param {String} title @@ -888,22 +892,21 @@ module.exports = Hook; * @api private */ -function Hook(title, fn) { - Runnable.call(this, title, fn); - this.type = 'hook'; -} + function Hook(title, fn) { + Runnable.call(this, title, fn); + this.type = 'hook'; + } -/** + /** * Inherit from `Runnable.prototype`. */ -function F(){}; -F.prototype = Runnable.prototype; -Hook.prototype = new F; -Hook.prototype.constructor = Hook; - + function F() {} + F.prototype = Runnable.prototype; + Hook.prototype = new F(); + Hook.prototype.constructor = Hook; -/** + /** * Get or set the test `err`. * * @param {Error} err @@ -911,29 +914,29 @@ Hook.prototype.constructor = Hook; * @api public */ -Hook.prototype.error = function(err){ - if (0 == arguments.length) { - var err = this._error; - this._error = null; - return err; - } + Hook.prototype.error = function (err) { + if (arguments.length == 0) { + var err = this._error; + this._error = null; + return err; + } - this._error = err; -}; + this._error = err; + }; -}); // module: hook.js + }); // module: hook.js -require.register("interfaces/bdd.js", function(module, exports, require){ + require.register('interfaces/bdd.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var Suite = require('../suite') - , Test = require('../test') - , utils = require('../utils'); + var Suite = require('../suite'), + Test = require('../test'), + utils = require('../utils'); -/** + /** * BDD-style interface: * * describe('Array', function(){ @@ -950,130 +953,130 @@ var Suite = require('../suite') * */ -module.exports = function(suite){ - var suites = [suite]; + module.exports = function (suite) { + var suites = [ suite ]; - suite.on('pre-require', function(context, file, mocha){ + suite.on('pre-require', function (context, file, mocha) { - /** + /** * Execute before running tests. */ - context.before = function(fn){ - suites[0].beforeAll(fn); - }; + context.before = function (fn) { + suites[0].beforeAll(fn); + }; - /** + /** * Execute after running tests. */ - context.after = function(fn){ - suites[0].afterAll(fn); - }; + context.after = function (fn) { + suites[0].afterAll(fn); + }; - /** + /** * Execute before each test case. */ - context.beforeEach = function(fn){ - suites[0].beforeEach(fn); - }; + context.beforeEach = function (fn) { + suites[0].beforeEach(fn); + }; - /** + /** * Execute after each test case. */ - context.afterEach = function(fn){ - suites[0].afterEach(fn); - }; + context.afterEach = function (fn) { + suites[0].afterEach(fn); + }; - /** + /** * Describe a "suite" with the given `title` * and callback `fn` containing nested suites * and/or tests. */ - context.describe = context.context = function(title, fn){ - var suite = Suite.create(suites[0], title); - suites.unshift(suite); - fn.call(suite); - suites.shift(); - return suite; - }; + context.describe = context.context = function (title, fn) { + var suite = Suite.create(suites[0], title); + suites.unshift(suite); + fn.call(suite); + suites.shift(); + return suite; + }; - /** + /** * Pending describe. */ - context.xdescribe = - context.xcontext = - context.describe.skip = function(title, fn){ - var suite = Suite.create(suites[0], title); - suite.pending = true; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - }; - - /** + context.xdescribe + = context.xcontext + = context.describe.skip = function (title, fn) { + var suite = Suite.create(suites[0], title); + suite.pending = true; + suites.unshift(suite); + fn.call(suite); + suites.shift(); + }; + + /** * Exclusive suite. */ - context.describe.only = function(title, fn){ - var suite = context.describe(title, fn); - mocha.grep(suite.fullTitle()); - return suite; - }; + context.describe.only = function (title, fn) { + var suite = context.describe(title, fn); + mocha.grep(suite.fullTitle()); + return suite; + }; - /** + /** * Describe a specification or test-case * with the given `title` and callback `fn` * acting as a thunk. */ - context.it = context.specify = function(title, fn){ - var suite = suites[0]; - if (suite.pending) var fn = null; - var test = new Test(title, fn); - suite.addTest(test); - return test; - }; + context.it = context.specify = function (title, fn) { + var suite = suites[0]; + if (suite.pending) { var fn = null; } + var test = new Test(title, fn); + suite.addTest(test); + return test; + }; - /** + /** * Exclusive test-case. */ - context.it.only = function(title, fn){ - var test = context.it(title, fn); - var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - return test; - }; + context.it.only = function (title, fn) { + var test = context.it(title, fn); + var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$'; + mocha.grep(new RegExp(reString)); + return test; + }; - /** + /** * Pending test case. */ - context.xit = - context.xspecify = - context.it.skip = function(title){ - context.it(title); - }; - }); -}; + context.xit + = context.xspecify + = context.it.skip = function (title) { + context.it(title); + }; + }); + }; -}); // module: interfaces/bdd.js + }); // module: interfaces/bdd.js -require.register("interfaces/exports.js", function(module, exports, require){ + require.register('interfaces/exports.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var Suite = require('../suite') - , Test = require('../test'); + var Suite = require('../suite'), + Test = require('../test'); -/** + /** * TDD-style interface: * * exports.Array = { @@ -1090,64 +1093,64 @@ var Suite = require('../suite') * */ -module.exports = function(suite){ - var suites = [suite]; - - suite.on('require', visit); - - function visit(obj) { - var suite; - for (var key in obj) { - if ('function' == typeof obj[key]) { - var fn = obj[key]; - switch (key) { - case 'before': - suites[0].beforeAll(fn); - break; - case 'after': - suites[0].afterAll(fn); - break; - case 'beforeEach': - suites[0].beforeEach(fn); - break; - case 'afterEach': - suites[0].afterEach(fn); - break; - default: - suites[0].addTest(new Test(key, fn)); - } - } else { - var suite = Suite.create(suites[0], key); - suites.unshift(suite); - visit(obj[key]); - suites.shift(); - } - } - } -}; - -}); // module: interfaces/exports.js - -require.register("interfaces/index.js", function(module, exports, require){ - -exports.bdd = require('./bdd'); -exports.tdd = require('./tdd'); -exports.qunit = require('./qunit'); -exports.exports = require('./exports'); - -}); // module: interfaces/index.js - -require.register("interfaces/qunit.js", function(module, exports, require){ - -/** + module.exports = function (suite) { + var suites = [ suite ]; + + suite.on('require', visit); + + function visit(obj) { + var suite; + for (var key in obj) { + if (typeof obj[key] === 'function') { + var fn = obj[key]; + switch (key) { + case 'before': + suites[0].beforeAll(fn); + break; + case 'after': + suites[0].afterAll(fn); + break; + case 'beforeEach': + suites[0].beforeEach(fn); + break; + case 'afterEach': + suites[0].afterEach(fn); + break; + default: + suites[0].addTest(new Test(key, fn)); + } + } else { + var suite = Suite.create(suites[0], key); + suites.unshift(suite); + visit(obj[key]); + suites.shift(); + } + } + } + }; + + }); // module: interfaces/exports.js + + require.register('interfaces/index.js', function (module, exports, require) { + + exports.bdd = require('./bdd'); + exports.tdd = require('./tdd'); + exports.qunit = require('./qunit'); + exports.exports = require('./exports'); + + }); // module: interfaces/index.js + + require.register('interfaces/qunit.js', function (module, exports, require) { + + /** * Module dependencies. */ -var Suite = require('../suite') - , Test = require('../test') - , utils = require('../utils'); + var Suite = require('../suite'), + Test = require('../test'), + utils = require('../utils'); -/** + /** * QUnit-style interface: * * suite('Array'); @@ -1172,108 +1175,108 @@ var Suite = require('../suite') * */ -module.exports = function(suite){ - var suites = [suite]; + module.exports = function (suite) { + var suites = [ suite ]; - suite.on('pre-require', function(context, file, mocha){ + suite.on('pre-require', function (context, file, mocha) { - /** + /** * Execute before running tests. */ - context.before = function(fn){ - suites[0].beforeAll(fn); - }; + context.before = function (fn) { + suites[0].beforeAll(fn); + }; - /** + /** * Execute after running tests. */ - context.after = function(fn){ - suites[0].afterAll(fn); - }; + context.after = function (fn) { + suites[0].afterAll(fn); + }; - /** + /** * Execute before each test case. */ - context.beforeEach = function(fn){ - suites[0].beforeEach(fn); - }; + context.beforeEach = function (fn) { + suites[0].beforeEach(fn); + }; - /** + /** * Execute after each test case. */ - context.afterEach = function(fn){ - suites[0].afterEach(fn); - }; + context.afterEach = function (fn) { + suites[0].afterEach(fn); + }; - /** + /** * Describe a "suite" with the given `title`. */ - context.suite = function(title){ - if (suites.length > 1) suites.shift(); - var suite = Suite.create(suites[0], title); - suites.unshift(suite); - return suite; - }; + context.suite = function (title) { + if (suites.length > 1) { suites.shift(); } + var suite = Suite.create(suites[0], title); + suites.unshift(suite); + return suite; + }; - /** + /** * Exclusive test-case. */ - context.suite.only = function(title, fn){ - var suite = context.suite(title, fn); - mocha.grep(suite.fullTitle()); - }; + context.suite.only = function (title, fn) { + var suite = context.suite(title, fn); + mocha.grep(suite.fullTitle()); + }; - /** + /** * Describe a specification or test-case * with the given `title` and callback `fn` * acting as a thunk. */ - context.test = function(title, fn){ - var test = new Test(title, fn); - suites[0].addTest(test); - return test; - }; + context.test = function (title, fn) { + var test = new Test(title, fn); + suites[0].addTest(test); + return test; + }; - /** + /** * Exclusive test-case. */ - context.test.only = function(title, fn){ - var test = context.test(title, fn); - var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; + context.test.only = function (title, fn) { + var test = context.test(title, fn); + var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$'; + mocha.grep(new RegExp(reString)); + }; - /** + /** * Pending test case. */ - context.test.skip = function(title){ - context.test(title); - }; - }); -}; + context.test.skip = function (title) { + context.test(title); + }; + }); + }; -}); // module: interfaces/qunit.js + }); // module: interfaces/qunit.js -require.register("interfaces/tdd.js", function(module, exports, require){ + require.register('interfaces/tdd.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var Suite = require('../suite') - , Test = require('../test') - , utils = require('../utils');; + var Suite = require('../suite'), + Test = require('../test'), + utils = require('../utils'); -/** + /** * TDD-style interface: * * suite('Array', function(){ @@ -1298,148 +1301,148 @@ var Suite = require('../suite') * */ -module.exports = function(suite){ - var suites = [suite]; + module.exports = function (suite) { + var suites = [ suite ]; - suite.on('pre-require', function(context, file, mocha){ + suite.on('pre-require', function (context, file, mocha) { - /** + /** * Execute before each test case. */ - context.setup = function(fn){ - suites[0].beforeEach(fn); - }; + context.setup = function (fn) { + suites[0].beforeEach(fn); + }; - /** + /** * Execute after each test case. */ - context.teardown = function(fn){ - suites[0].afterEach(fn); - }; + context.teardown = function (fn) { + suites[0].afterEach(fn); + }; - /** + /** * Execute before the suite. */ - context.suiteSetup = function(fn){ - suites[0].beforeAll(fn); - }; + context.suiteSetup = function (fn) { + suites[0].beforeAll(fn); + }; - /** + /** * Execute after the suite. */ - context.suiteTeardown = function(fn){ - suites[0].afterAll(fn); - }; + context.suiteTeardown = function (fn) { + suites[0].afterAll(fn); + }; - /** + /** * Describe a "suite" with the given `title` * and callback `fn` containing nested suites * and/or tests. */ - context.suite = function(title, fn){ - var suite = Suite.create(suites[0], title); - suites.unshift(suite); - fn.call(suite); - suites.shift(); - return suite; - }; + context.suite = function (title, fn) { + var suite = Suite.create(suites[0], title); + suites.unshift(suite); + fn.call(suite); + suites.shift(); + return suite; + }; - /** + /** * Pending suite. */ - context.suite.skip = function(title, fn) { - var suite = Suite.create(suites[0], title); - suite.pending = true; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - }; - - /** + context.suite.skip = function (title, fn) { + var suite = Suite.create(suites[0], title); + suite.pending = true; + suites.unshift(suite); + fn.call(suite); + suites.shift(); + }; + + /** * Exclusive test-case. */ - context.suite.only = function(title, fn){ - var suite = context.suite(title, fn); - mocha.grep(suite.fullTitle()); - }; + context.suite.only = function (title, fn) { + var suite = context.suite(title, fn); + mocha.grep(suite.fullTitle()); + }; - /** + /** * Describe a specification or test-case * with the given `title` and callback `fn` * acting as a thunk. */ - context.test = function(title, fn){ - var suite = suites[0]; - if (suite.pending) var fn = null; - var test = new Test(title, fn); - suite.addTest(test); - return test; - }; + context.test = function (title, fn) { + var suite = suites[0]; + if (suite.pending) { var fn = null; } + var test = new Test(title, fn); + suite.addTest(test); + return test; + }; - /** + /** * Exclusive test-case. */ - context.test.only = function(title, fn){ - var test = context.test(title, fn); - var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; + context.test.only = function (title, fn) { + var test = context.test(title, fn); + var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$'; + mocha.grep(new RegExp(reString)); + }; - /** + /** * Pending test case. */ - context.test.skip = function(title){ - context.test(title); - }; - }); -}; + context.test.skip = function (title) { + context.test(title); + }; + }); + }; -}); // module: interfaces/tdd.js + }); // module: interfaces/tdd.js -require.register("mocha.js", function(module, exports, require){ -/*! + require.register('mocha.js', function (module, exports, require) { + /* ! * mocha * Copyright(c) 2011 TJ Holowaychuk * MIT Licensed */ -/** + /** * Module dependencies. */ -var path = require('browser/path') - , utils = require('./utils'); + var path = require('browser/path'), + utils = require('./utils'); -/** + /** * Expose `Mocha`. */ -exports = module.exports = Mocha; + exports = module.exports = Mocha; -/** + /** * Expose internals. */ -exports.utils = utils; -exports.interfaces = require('./interfaces'); -exports.reporters = require('./reporters'); -exports.Runnable = require('./runnable'); -exports.Context = require('./context'); -exports.Runner = require('./runner'); -exports.Suite = require('./suite'); -exports.Hook = require('./hook'); -exports.Test = require('./test'); + exports.utils = utils; + exports.interfaces = require('./interfaces'); + exports.reporters = require('./reporters'); + exports.Runnable = require('./runnable'); + exports.Context = require('./context'); + exports.Runner = require('./runner'); + exports.Suite = require('./suite'); + exports.Hook = require('./hook'); + exports.Test = require('./test'); -/** + /** * Return image `name` path. * * @param {String} name @@ -1447,11 +1450,11 @@ exports.Test = require('./test'); * @api private */ -function image(name) { - return __dirname + '/../images/' + name + '.png'; -} + function image(name) { + return __dirname + '/../images/' + name + '.png'; + } -/** + /** * Setup mocha with `options`. * * Options: @@ -1469,145 +1472,146 @@ function image(name) { * @api public */ -function Mocha(options) { - options = options || {}; - this.files = []; - this.options = options; - this.grep(options.grep); - this.suite = new exports.Suite('', new exports.Context); - this.ui(options.ui); - this.bail(options.bail); - this.reporter(options.reporter); - if (null != options.timeout) this.timeout(options.timeout); - this.useColors(options.useColors) - if (options.slow) this.slow(options.slow); - - this.suite.on('pre-require', function (context) { - exports.afterEach = context.afterEach || context.teardown; - exports.after = context.after || context.suiteTeardown; - exports.beforeEach = context.beforeEach || context.setup; - exports.before = context.before || context.suiteSetup; - exports.describe = context.describe || context.suite; - exports.it = context.it || context.test; - exports.setup = context.setup || context.beforeEach; - exports.suiteSetup = context.suiteSetup || context.before; - exports.suiteTeardown = context.suiteTeardown || context.after; - exports.suite = context.suite || context.describe; - exports.teardown = context.teardown || context.afterEach; - exports.test = context.test || context.it; - }); -} - -/** + function Mocha(options) { + options = options || {}; + this.files = []; + this.options = options; + this.grep(options.grep); + this.suite = new exports.Suite('', new exports.Context()); + this.ui(options.ui); + this.bail(options.bail); + this.reporter(options.reporter); + if (options.timeout != null) { this.timeout(options.timeout); } + this.useColors(options.useColors); + if (options.slow) { this.slow(options.slow); } + + this.suite.on('pre-require', function (context) { + exports.afterEach = context.afterEach || context.teardown; + exports.after = context.after || context.suiteTeardown; + exports.beforeEach = context.beforeEach || context.setup; + exports.before = context.before || context.suiteSetup; + exports.describe = context.describe || context.suite; + exports.it = context.it || context.test; + exports.setup = context.setup || context.beforeEach; + exports.suiteSetup = context.suiteSetup || context.before; + exports.suiteTeardown = context.suiteTeardown || context.after; + exports.suite = context.suite || context.describe; + exports.teardown = context.teardown || context.afterEach; + exports.test = context.test || context.it; + }); + } + + /** * Enable or disable bailing on the first failure. * * @param {Boolean} [bail] * @api public */ -Mocha.prototype.bail = function(bail){ - if (0 == arguments.length) bail = true; - this.suite.bail(bail); - return this; -}; + Mocha.prototype.bail = function (bail) { + if (arguments.length == 0) { bail = true; } + this.suite.bail(bail); + return this; + }; -/** + /** * Add test `file`. * * @param {String} file * @api public */ -Mocha.prototype.addFile = function(file){ - this.files.push(file); - return this; -}; + Mocha.prototype.addFile = function (file) { + this.files.push(file); + return this; + }; -/** + /** * Set reporter to `reporter`, defaults to "dot". * * @param {String|Function} reporter name or constructor * @api public */ -Mocha.prototype.reporter = function(reporter){ - if ('function' == typeof reporter) { - this._reporter = reporter; - } else { - reporter = reporter || 'dot'; - var _reporter; - try { _reporter = require('./reporters/' + reporter); } catch (err) {}; - if (!_reporter) try { _reporter = require(reporter); } catch (err) {}; - if (!_reporter && reporter === 'teamcity') - console.warn('The Teamcity reporter was moved to a package named ' + - 'mocha-teamcity-reporter ' + - '(https://npmjs.org/package/mocha-teamcity-reporter).'); - if (!_reporter) throw new Error('invalid reporter "' + reporter + '"'); - this._reporter = _reporter; - } - return this; -}; - -/** + Mocha.prototype.reporter = function (reporter) { + if (typeof reporter === 'function') { + this._reporter = reporter; + } else { + reporter = reporter || 'dot'; + var _reporter; + try { _reporter = require('./reporters/' + reporter); } catch (err) {} + if (!_reporter) { try { _reporter = require(reporter); } catch (err) {} } + if (!_reporter && reporter === 'teamcity') { + console.warn('The Teamcity reporter was moved to a package named ' + + 'mocha-teamcity-reporter ' + + '(https://npmjs.org/package/mocha-teamcity-reporter).'); + } + if (!_reporter) { throw new Error('invalid reporter "' + reporter + '"'); } + this._reporter = _reporter; + } + return this; + }; + + /** * Set test UI `name`, defaults to "bdd". * * @param {String} bdd * @api public */ -Mocha.prototype.ui = function(name){ - name = name || 'bdd'; - this._ui = exports.interfaces[name]; - if (!this._ui) try { this._ui = require(name); } catch (err) {}; - if (!this._ui) throw new Error('invalid interface "' + name + '"'); - this._ui = this._ui(this.suite); - return this; -}; + Mocha.prototype.ui = function (name) { + name = name || 'bdd'; + this._ui = exports.interfaces[name]; + if (!this._ui) { try { this._ui = require(name); } catch (err) {} } + if (!this._ui) { throw new Error('invalid interface "' + name + '"'); } + this._ui = this._ui(this.suite); + return this; + }; -/** + /** * Load registered files. * * @api private */ -Mocha.prototype.loadFiles = function(fn){ - var self = this; - var suite = this.suite; - var pending = this.files.length; - this.files.forEach(function(file){ - file = path.resolve(file); - suite.emit('pre-require', global, file, self); - suite.emit('require', require(file), file, self); - suite.emit('post-require', global, file, self); - --pending || (fn && fn()); - }); -}; - -/** + Mocha.prototype.loadFiles = function (fn) { + var self = this; + var suite = this.suite; + var pending = this.files.length; + this.files.forEach(function (file) { + file = path.resolve(file); + suite.emit('pre-require', global, file, self); + suite.emit('require', require(file), file, self); + suite.emit('post-require', global, file, self); + --pending || (fn && fn()); + }); + }; + + /** * Enable growl support. * * @api private */ -Mocha.prototype._growl = function(runner, reporter) { - var notify = require('growl'); - - runner.on('end', function(){ - var stats = reporter.stats; - if (stats.failures) { - var msg = stats.failures + ' of ' + runner.total + ' tests failed'; - notify(msg, { name: 'mocha', title: 'Failed', image: image('error') }); - } else { - notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', { - name: 'mocha' - , title: 'Passed' - , image: image('ok') - }); - } - }); -}; - -/** + Mocha.prototype._growl = function (runner, reporter) { + var notify = require('growl'); + + runner.on('end', function () { + var stats = reporter.stats; + if (stats.failures) { + var msg = stats.failures + ' of ' + runner.total + ' tests failed'; + notify(msg, { name: 'mocha', title: 'Failed', image: image('error') }); + } else { + notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', { + name: 'mocha', + title: 'Passed', + image: image('ok') + }); + } + }); + }; + + /** * Add regexp to grep, if `re` is a string it is escaped. * * @param {RegExp|String} re @@ -1615,26 +1619,26 @@ Mocha.prototype._growl = function(runner, reporter) { * @api public */ -Mocha.prototype.grep = function(re){ - this.options.grep = 'string' == typeof re - ? new RegExp(utils.escapeRegexp(re)) - : re; - return this; -}; + Mocha.prototype.grep = function (re) { + this.options.grep = typeof re === 'string' + ? new RegExp(utils.escapeRegexp(re)) + : re; + return this; + }; -/** + /** * Invert `.grep()` matches. * * @return {Mocha} * @api public */ -Mocha.prototype.invert = function(){ - this.options.invert = true; - return this; -}; + Mocha.prototype.invert = function () { + this.options.invert = true; + return this; + }; -/** + /** * Ignore global leaks. * * @param {Boolean} ignore @@ -1642,36 +1646,36 @@ Mocha.prototype.invert = function(){ * @api public */ -Mocha.prototype.ignoreLeaks = function(ignore){ - this.options.ignoreLeaks = !!ignore; - return this; -}; + Mocha.prototype.ignoreLeaks = function (ignore) { + this.options.ignoreLeaks = !!ignore; + return this; + }; -/** + /** * Enable global leak checking. * * @return {Mocha} * @api public */ -Mocha.prototype.checkLeaks = function(){ - this.options.ignoreLeaks = false; - return this; -}; + Mocha.prototype.checkLeaks = function () { + this.options.ignoreLeaks = false; + return this; + }; -/** + /** * Enable growl support. * * @return {Mocha} * @api public */ -Mocha.prototype.growl = function(){ - this.options.growl = true; - return this; -}; + Mocha.prototype.growl = function () { + this.options.growl = true; + return this; + }; -/** + /** * Ignore `globals` array or string. * * @param {Array|String} globals @@ -1679,12 +1683,12 @@ Mocha.prototype.growl = function(){ * @api public */ -Mocha.prototype.globals = function(globals){ - this.options.globals = (this.options.globals || []).concat(globals); - return this; -}; + Mocha.prototype.globals = function (globals) { + this.options.globals = (this.options.globals || []).concat(globals); + return this; + }; -/** + /** * Emit color output. * * @param {Boolean} colors @@ -1692,14 +1696,14 @@ Mocha.prototype.globals = function(globals){ * @api public */ -Mocha.prototype.useColors = function(colors){ - this.options.useColors = arguments.length && colors != undefined - ? colors - : true; - return this; -}; + Mocha.prototype.useColors = function (colors) { + this.options.useColors = arguments.length && colors != undefined + ? colors + : true; + return this; + }; -/** + /** * Use inline diffs rather than +/-. * * @param {Boolean} inlineDiffs @@ -1707,14 +1711,14 @@ Mocha.prototype.useColors = function(colors){ * @api public */ -Mocha.prototype.useInlineDiffs = function(inlineDiffs) { - this.options.useInlineDiffs = arguments.length && inlineDiffs != undefined - ? inlineDiffs - : false; - return this; -}; + Mocha.prototype.useInlineDiffs = function (inlineDiffs) { + this.options.useInlineDiffs = arguments.length && inlineDiffs != undefined + ? inlineDiffs + : false; + return this; + }; -/** + /** * Set the timeout in milliseconds. * * @param {Number} timeout @@ -1722,12 +1726,12 @@ Mocha.prototype.useInlineDiffs = function(inlineDiffs) { * @api public */ -Mocha.prototype.timeout = function(timeout){ - this.suite.timeout(timeout); - return this; -}; + Mocha.prototype.timeout = function (timeout) { + this.suite.timeout(timeout); + return this; + }; -/** + /** * Set slowness threshold in milliseconds. * * @param {Number} slow @@ -1735,24 +1739,24 @@ Mocha.prototype.timeout = function(timeout){ * @api public */ -Mocha.prototype.slow = function(slow){ - this.suite.slow(slow); - return this; -}; + Mocha.prototype.slow = function (slow) { + this.suite.slow(slow); + return this; + }; -/** + /** * Makes all tests async (accepting a callback) * * @return {Mocha} * @api public */ -Mocha.prototype.asyncOnly = function(){ - this.options.asyncOnly = true; - return this; -}; + Mocha.prototype.asyncOnly = function () { + this.options.asyncOnly = true; + return this; + }; -/** + /** * Run tests and invoke `fn()` when complete. * * @param {Function} fn @@ -1760,36 +1764,36 @@ Mocha.prototype.asyncOnly = function(){ * @api public */ -Mocha.prototype.run = function(fn){ - if (this.files.length) this.loadFiles(); - var suite = this.suite; - var options = this.options; - var runner = new exports.Runner(suite); - var reporter = new this._reporter(runner); - runner.ignoreLeaks = false !== options.ignoreLeaks; - runner.asyncOnly = options.asyncOnly; - if (options.grep) runner.grep(options.grep, options.invert); - if (options.globals) runner.globals(options.globals); - if (options.growl) this._growl(runner, reporter); - exports.reporters.Base.useColors = options.useColors; - exports.reporters.Base.inlineDiffs = options.useInlineDiffs; - return runner.run(fn); -}; - -}); // module: mocha.js - -require.register("ms.js", function(module, exports, require){ -/** + Mocha.prototype.run = function (fn) { + if (this.files.length) { this.loadFiles(); } + var suite = this.suite; + var options = this.options; + var runner = new exports.Runner(suite); + var reporter = new this._reporter(runner); + runner.ignoreLeaks = options.ignoreLeaks !== false; + runner.asyncOnly = options.asyncOnly; + if (options.grep) { runner.grep(options.grep, options.invert); } + if (options.globals) { runner.globals(options.globals); } + if (options.growl) { this._growl(runner, reporter); } + exports.reporters.Base.useColors = options.useColors; + exports.reporters.Base.inlineDiffs = options.useInlineDiffs; + return runner.run(fn); + }; + + }); // module: mocha.js + + require.register('ms.js', function (module, exports, require) { + /** * Helpers. */ -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; + var s = 1000; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var y = d * 365.25; -/** + /** * Parse or format the given `val`. * * Options: @@ -1802,13 +1806,13 @@ var y = d * 365.25; * @api public */ -module.exports = function(val, options){ - options = options || {}; - if ('string' == typeof val) return parse(val); - return options.long ? longFormat(val) : shortFormat(val); -}; + module.exports = function (val, options) { + options = options || {}; + if (typeof val === 'string') { return parse(val); } + return options.long ? longFormat(val) : shortFormat(val); + }; -/** + /** * Parse the given `str` and return milliseconds. * * @param {String} str @@ -1816,38 +1820,38 @@ module.exports = function(val, options){ * @api private */ -function parse(str) { - var match = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(str); - if (!match) return; - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 's': - return n * s; - case 'ms': - return n; - } -} - -/** + function parse(str) { + var match = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(str); + if (!match) { return; } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 's': + return n * s; + case 'ms': + return n; + } + } + + /** * Short format for `ms`. * * @param {Number} ms @@ -1855,15 +1859,15 @@ function parse(str) { * @api private */ -function shortFormat(ms) { - if (ms >= d) return Math.round(ms / d) + 'd'; - if (ms >= h) return Math.round(ms / h) + 'h'; - if (ms >= m) return Math.round(ms / m) + 'm'; - if (ms >= s) return Math.round(ms / s) + 's'; - return ms + 'ms'; -} + function shortFormat(ms) { + if (ms >= d) { return Math.round(ms / d) + 'd'; } + if (ms >= h) { return Math.round(ms / h) + 'h'; } + if (ms >= m) { return Math.round(ms / m) + 'm'; } + if (ms >= s) { return Math.round(ms / s) + 's'; } + return ms + 'ms'; + } -/** + /** * Long format for `ms`. * * @param {Number} ms @@ -1871,115 +1875,115 @@ function shortFormat(ms) { * @api private */ -function longFormat(ms) { - return plural(ms, d, 'day') + function longFormat(ms) { + return plural(ms, d, 'day') || plural(ms, h, 'hour') || plural(ms, m, 'minute') || plural(ms, s, 'second') || ms + ' ms'; -} + } -/** + /** * Pluralization helper. */ -function plural(ms, n, name) { - if (ms < n) return; - if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; - return Math.ceil(ms / n) + ' ' + name + 's'; -} + function plural(ms, n, name) { + if (ms < n) { return; } + if (ms < n * 1.5) { return Math.floor(ms / n) + ' ' + name; } + return Math.ceil(ms / n) + ' ' + name + 's'; + } -}); // module: ms.js + }); // module: ms.js -require.register("reporters/base.js", function(module, exports, require){ + require.register('reporters/base.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var tty = require('browser/tty') - , diff = require('browser/diff') - , ms = require('../ms') - , utils = require('../utils'); + var tty = require('browser/tty'), + diff = require('browser/diff'), + ms = require('../ms'), + utils = require('../utils'); -/** + /** * Save timer references to avoid Sinon interfering (see GH-237). */ -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; + var Date = global.Date, + setTimeout = global.setTimeout, + setInterval = global.setInterval, + clearTimeout = global.clearTimeout, + clearInterval = global.clearInterval; -/** + /** * Check if both stdio streams are associated with a tty. */ -var isatty = tty.isatty(1) && tty.isatty(2); + var isatty = tty.isatty(1) && tty.isatty(2); -/** + /** * Expose `Base`. */ -exports = module.exports = Base; + exports = module.exports = Base; -/** + /** * Enable coloring by default. */ -exports.useColors = isatty || (process.env.MOCHA_COLORS !== undefined); + exports.useColors = isatty || (process.env.MOCHA_COLORS !== undefined); -/** + /** * Inline diffs instead of +/- */ -exports.inlineDiffs = false; + exports.inlineDiffs = false; -/** + /** * Default color map. */ -exports.colors = { - 'pass': 90 - , 'fail': 31 - , 'bright pass': 92 - , 'bright fail': 91 - , 'bright yellow': 93 - , 'pending': 36 - , 'suite': 0 - , 'error title': 0 - , 'error message': 31 - , 'error stack': 90 - , 'checkmark': 32 - , 'fast': 90 - , 'medium': 33 - , 'slow': 31 - , 'green': 32 - , 'light': 90 - , 'diff gutter': 90 - , 'diff added': 42 - , 'diff removed': 41 -}; - -/** + exports.colors = { + pass: 90, + fail: 31, + 'bright pass': 92, + 'bright fail': 91, + 'bright yellow': 93, + pending: 36, + suite: 0, + 'error title': 0, + 'error message': 31, + 'error stack': 90, + checkmark: 32, + fast: 90, + medium: 33, + slow: 31, + green: 32, + light: 90, + 'diff gutter': 90, + 'diff added': 42, + 'diff removed': 41 + }; + + /** * Default symbol map. */ -exports.symbols = { - ok: '✓', - err: '✖', - dot: '․' -}; + exports.symbols = { + ok: '✓', + err: '✖', + dot: '․' + }; -// With node.js on Windows: use symbols available in terminal default fonts -if ('win32' == process.platform) { - exports.symbols.ok = '\u221A'; - exports.symbols.err = '\u00D7'; - exports.symbols.dot = '.'; -} + // With node.js on Windows: use symbols available in terminal default fonts + if (process.platform == 'win32') { + exports.symbols.ok = '\u221A'; + exports.symbols.err = '\u00D7'; + exports.symbols.dot = '.'; + } -/** + /** * Color `str` with the given `type`, * allowing colors to be disabled, * as well as user-defined color @@ -1991,115 +1995,115 @@ if ('win32' == process.platform) { * @api private */ -var color = exports.color = function(type, str) { - if (!exports.useColors) return str; - return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m'; -}; + var color = exports.color = function (type, str) { + if (!exports.useColors) { return str; } + return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m'; + }; -/** + /** * Expose term window size, with some * defaults for when stderr is not a tty. */ -exports.window = { - width: isatty - ? process.stdout.getWindowSize - ? process.stdout.getWindowSize(1)[0] - : tty.getWindowSize()[1] - : 75 -}; + exports.window = { + width: isatty + ? process.stdout.getWindowSize + ? process.stdout.getWindowSize(1)[0] + : tty.getWindowSize()[1] + : 75 + }; -/** + /** * Expose some basic cursor interactions * that are common among reporters. */ -exports.cursor = { - hide: function(){ - isatty && process.stdout.write('\u001b[?25l'); - }, + exports.cursor = { + hide: function () { + isatty && process.stdout.write('\u001b[?25l'); + }, - show: function(){ - isatty && process.stdout.write('\u001b[?25h'); - }, + show: function () { + isatty && process.stdout.write('\u001b[?25h'); + }, - deleteLine: function(){ - isatty && process.stdout.write('\u001b[2K'); - }, + deleteLine: function () { + isatty && process.stdout.write('\u001b[2K'); + }, - beginningOfLine: function(){ - isatty && process.stdout.write('\u001b[0G'); - }, + beginningOfLine: function () { + isatty && process.stdout.write('\u001b[0G'); + }, - CR: function(){ - if (isatty) { - exports.cursor.deleteLine(); - exports.cursor.beginningOfLine(); - } else { - process.stdout.write('\r'); - } - } -}; + CR: function () { + if (isatty) { + exports.cursor.deleteLine(); + exports.cursor.beginningOfLine(); + } else { + process.stdout.write('\r'); + } + } + }; -/** + /** * Outut the given `failures` as a list. * * @param {Array} failures * @api public */ -exports.list = function(failures){ - console.error(); - failures.forEach(function(test, i){ - // format - var fmt = color('error title', ' %s) %s:\n') + exports.list = function (failures) { + console.error(); + failures.forEach(function (test, i) { + // format + var fmt = color('error title', ' %s) %s:\n') + color('error message', ' %s') + color('error stack', '\n%s\n'); - // msg - var err = test.err - , message = err.message || '' - , stack = err.stack || message - , index = stack.indexOf(message) + message.length - , msg = stack.slice(0, index) - , actual = err.actual - , expected = err.expected - , escape = true; - - // uncaught - if (err.uncaught) { - msg = 'Uncaught ' + msg; - } - - // explicitly show diff - if (err.showDiff && sameType(actual, expected)) { - escape = false; - err.actual = actual = stringify(canonicalize(actual)); - err.expected = expected = stringify(canonicalize(expected)); - } - - // actual / expected diff - if ('string' == typeof actual && 'string' == typeof expected) { - fmt = color('error title', ' %s) %s:\n%s') + color('error stack', '\n%s\n'); - var match = message.match(/^([^:]+): expected/); - msg = '\n ' + color('error message', match ? match[1] : msg); - - if (exports.inlineDiffs) { - msg += inlineDiff(err, escape); - } else { - msg += unifiedDiff(err, escape); - } - } - - // indent stack trace without msg - stack = stack.slice(index ? index + 1 : index) - .replace(/^/gm, ' '); - - console.error(fmt, (i + 1), test.fullTitle(), msg, stack); - }); -}; - -/** + // msg + var err = test.err, + message = err.message || '', + stack = err.stack || message, + index = stack.indexOf(message) + message.length, + msg = stack.slice(0, index), + actual = err.actual, + expected = err.expected, + escape = true; + + // uncaught + if (err.uncaught) { + msg = 'Uncaught ' + msg; + } + + // explicitly show diff + if (err.showDiff && sameType(actual, expected)) { + escape = false; + err.actual = actual = stringify(canonicalize(actual)); + err.expected = expected = stringify(canonicalize(expected)); + } + + // actual / expected diff + if (typeof actual === 'string' && typeof expected === 'string') { + fmt = color('error title', ' %s) %s:\n%s') + color('error stack', '\n%s\n'); + var match = message.match(/^([^:]+): expected/); + msg = '\n ' + color('error message', match ? match[1] : msg); + + if (exports.inlineDiffs) { + msg += inlineDiff(err, escape); + } else { + msg += unifiedDiff(err, escape); + } + } + + // indent stack trace without msg + stack = stack.slice(index ? index + 1 : index) + .replace(/^/gm, ' '); + + console.error(fmt, (i + 1), test.fullTitle(), msg, stack); + }); + }; + + /** * Initialize a new `Base` reporter. * * All other reporters generally @@ -2111,106 +2115,106 @@ exports.list = function(failures){ * @api public */ -function Base(runner) { - var self = this - , stats = this.stats = { suites: 0, tests: 0, passes: 0, pending: 0, failures: 0 } - , failures = this.failures = []; + function Base(runner) { + var self = this, + stats = this.stats = { suites: 0, tests: 0, passes: 0, pending: 0, failures: 0 }, + failures = this.failures = []; - if (!runner) return; - this.runner = runner; + if (!runner) { return; } + this.runner = runner; - runner.stats = stats; + runner.stats = stats; - runner.on('start', function(){ - stats.start = new Date; - }); + runner.on('start', function () { + stats.start = new Date(); + }); - runner.on('suite', function(suite){ - stats.suites = stats.suites || 0; - suite.root || stats.suites++; - }); + runner.on('suite', function (suite) { + stats.suites = stats.suites || 0; + suite.root || stats.suites++; + }); - runner.on('test end', function(test){ - stats.tests = stats.tests || 0; - stats.tests++; - }); + runner.on('test end', function (test) { + stats.tests = stats.tests || 0; + stats.tests++; + }); - runner.on('pass', function(test){ - stats.passes = stats.passes || 0; + runner.on('pass', function (test) { + stats.passes = stats.passes || 0; - var medium = test.slow() / 2; - test.speed = test.duration > test.slow() - ? 'slow' - : test.duration > medium - ? 'medium' - : 'fast'; + var medium = test.slow() / 2; + test.speed = test.duration > test.slow() + ? 'slow' + : test.duration > medium + ? 'medium' + : 'fast'; - stats.passes++; - }); + stats.passes++; + }); - runner.on('fail', function(test, err){ - stats.failures = stats.failures || 0; - stats.failures++; - test.err = err; - failures.push(test); - }); + runner.on('fail', function (test, err) { + stats.failures = stats.failures || 0; + stats.failures++; + test.err = err; + failures.push(test); + }); - runner.on('end', function(){ - stats.end = new Date; - stats.duration = new Date - stats.start; - }); + runner.on('end', function () { + stats.end = new Date(); + stats.duration = new Date() - stats.start; + }); - runner.on('pending', function(){ - stats.pending++; - }); -} + runner.on('pending', function () { + stats.pending++; + }); + } -/** + /** * Output common epilogue used by many of * the bundled reporters. * * @api public */ -Base.prototype.epilogue = function(){ - var stats = this.stats; - var tests; - var fmt; + Base.prototype.epilogue = function () { + var stats = this.stats; + var tests; + var fmt; - console.log(); + console.log(); - // passes - fmt = color('bright pass', ' ') + // passes + fmt = color('bright pass', ' ') + color('green', ' %d passing') + color('light', ' (%s)'); - console.log(fmt, - stats.passes || 0, - ms(stats.duration)); + console.log(fmt, + stats.passes || 0, + ms(stats.duration)); - // pending - if (stats.pending) { - fmt = color('pending', ' ') + // pending + if (stats.pending) { + fmt = color('pending', ' ') + color('pending', ' %d pending'); - console.log(fmt, stats.pending); - } + console.log(fmt, stats.pending); + } - // failures - if (stats.failures) { - fmt = color('fail', ' %d failing'); + // failures + if (stats.failures) { + fmt = color('fail', ' %d failing'); - console.error(fmt, - stats.failures); + console.error(fmt, + stats.failures); - Base.list(this.failures); - console.error(); - } + Base.list(this.failures); + console.error(); + } - console.log(); -}; + console.log(); + }; -/** + /** * Pad the given `str` to `len`. * * @param {String} str @@ -2219,13 +2223,12 @@ Base.prototype.epilogue = function(){ * @api private */ -function pad(str, len) { - str = String(str); - return Array(len - str.length + 1).join(' ') + str; -} - + function pad(str, len) { + str = String(str); + return Array(len - str.length + 1).join(' ') + str; + } -/** + /** * Returns an inline diff between 2 strings with coloured ANSI output * * @param {Error} Error with actual/expected @@ -2233,20 +2236,20 @@ function pad(str, len) { * @api private */ -function inlineDiff(err, escape) { - var msg = errorDiff(err, 'WordsWithSpace', escape); + function inlineDiff(err, escape) { + var msg = errorDiff(err, 'WordsWithSpace', escape); - // linenos - var lines = msg.split('\n'); - if (lines.length > 4) { - var width = String(lines.length).length; - msg = lines.map(function(str, i){ - return pad(++i, width) + ' |' + ' ' + str; - }).join('\n'); - } + // linenos + var lines = msg.split('\n'); + if (lines.length > 4) { + var width = String(lines.length).length; + msg = lines.map(function (str, i) { + return pad(++i, width) + ' |' + ' ' + str; + }).join('\n'); + } - // legend - msg = '\n' + // legend + msg = '\n' + color('diff removed', 'actual') + ' ' + color('diff added', 'expected') @@ -2254,12 +2257,12 @@ function inlineDiff(err, escape) { + msg + '\n'; - // indent - msg = msg.replace(/^/gm, ' '); - return msg; -} + // indent + msg = msg.replace(/^/gm, ' '); + return msg; + } -/** + /** * Returns a unified diff between 2 strings * * @param {Error} Error with actual/expected @@ -2267,31 +2270,30 @@ function inlineDiff(err, escape) { * @api private */ -function unifiedDiff(err, escape) { - var indent = ' '; - function cleanUp(line) { - if (escape) { - line = escapeInvisibles(line); - } - if (line[0] === '+') return indent + colorLines('diff added', line); - if (line[0] === '-') return indent + colorLines('diff removed', line); - if (line.match(/\@\@/)) return null; - if (line.match(/\\ No newline/)) return null; - else return indent + line; - } - function notBlank(line) { - return line != null; - } - msg = diff.createPatch('string', err.actual, err.expected); - var lines = msg.split('\n').splice(4); - return '\n ' + function unifiedDiff(err, escape) { + var indent = ' '; + function cleanUp(line) { + if (escape) { + line = escapeInvisibles(line); + } + if (line[0] === '+') { return indent + colorLines('diff added', line); } + if (line[0] === '-') { return indent + colorLines('diff removed', line); } + if (line.match(/\@\@/)) { return null; } + if (line.match(/\\ No newline/)) { return null; } else { return indent + line; } + } + function notBlank(line) { + return line != null; + } + msg = diff.createPatch('string', err.actual, err.expected); + var lines = msg.split('\n').splice(4); + return '\n ' + colorLines('diff added', '+ expected') + ' ' + colorLines('diff removed', '- actual') + '\n\n' + lines.map(cleanUp).filter(notBlank).join('\n'); -} + } -/** + /** * Return a character diff for `err`. * * @param {Error} err @@ -2299,30 +2301,30 @@ function unifiedDiff(err, escape) { * @api private */ -function errorDiff(err, type, escape) { - var actual = escape ? escapeInvisibles(err.actual) : err.actual; - var expected = escape ? escapeInvisibles(err.expected) : err.expected; - return diff['diff' + type](actual, expected).map(function(str){ - if (str.added) return colorLines('diff added', str.value); - if (str.removed) return colorLines('diff removed', str.value); - return str.value; - }).join(''); -} + function errorDiff(err, type, escape) { + var actual = escape ? escapeInvisibles(err.actual) : err.actual; + var expected = escape ? escapeInvisibles(err.expected) : err.expected; + return diff['diff' + type](actual, expected).map(function (str) { + if (str.added) { return colorLines('diff added', str.value); } + if (str.removed) { return colorLines('diff removed', str.value); } + return str.value; + }).join(''); + } -/** + /** * Returns a string with all invisible characters in plain text * * @param {String} line * @return {String} * @api private */ -function escapeInvisibles(line) { - return line.replace(/\t/g, '') - .replace(/\r/g, '') - .replace(/\n/g, '\n'); -} + function escapeInvisibles(line) { + return line.replace(/\t/g, '') + .replace(/\r/g, '') + .replace(/\n/g, '\n'); + } -/** + /** * Color lines for `str`, using the color `name`. * * @param {String} name @@ -2331,13 +2333,13 @@ function escapeInvisibles(line) { * @api private */ -function colorLines(name, str) { - return str.split('\n').map(function(str){ - return color(name, str); - }).join('\n'); -} + function colorLines(name, str) { + return str.split('\n').map(function (str) { + return color(name, str); + }).join('\n'); + } -/** + /** * Stringify `obj`. * * @param {Object} obj @@ -2345,46 +2347,46 @@ function colorLines(name, str) { * @api private */ -function stringify(obj) { - if (obj instanceof RegExp) return obj.toString(); - return JSON.stringify(obj, null, 2); -} + function stringify(obj) { + if (obj instanceof RegExp) { return obj.toString(); } + return JSON.stringify(obj, null, 2); + } -/** + /** * Return a new object that has the keys in sorted order. * @param {Object} obj * @return {Object} * @api private */ - function canonicalize(obj, stack) { - stack = stack || []; + function canonicalize(obj, stack) { + stack = stack || []; - if (utils.indexOf(stack, obj) !== -1) return obj; + if (utils.indexOf(stack, obj) !== -1) { return obj; } - var canonicalizedObj; + var canonicalizedObj; - if ('[object Array]' == {}.toString.call(obj)) { - stack.push(obj); - canonicalizedObj = utils.map(obj, function(item) { - return canonicalize(item, stack); - }); - stack.pop(); - } else if (typeof obj === 'object' && obj !== null) { - stack.push(obj); - canonicalizedObj = {}; - utils.forEach(utils.keys(obj).sort(), function(key) { - canonicalizedObj[key] = canonicalize(obj[key], stack); - }); - stack.pop(); - } else { - canonicalizedObj = obj; - } + if ({}.toString.call(obj) == '[object Array]') { + stack.push(obj); + canonicalizedObj = utils.map(obj, function (item) { + return canonicalize(item, stack); + }); + stack.pop(); + } else if (typeof obj === 'object' && obj !== null) { + stack.push(obj); + canonicalizedObj = {}; + utils.forEach(utils.keys(obj).sort(), function (key) { + canonicalizedObj[key] = canonicalize(obj[key], stack); + }); + stack.pop(); + } else { + canonicalizedObj = obj; + } - return canonicalizedObj; - } + return canonicalizedObj; + } -/** + /** * Check that a / b have the same type. * * @param {Object} a @@ -2393,513 +2395,512 @@ function stringify(obj) { * @api private */ -function sameType(a, b) { - a = Object.prototype.toString.call(a); - b = Object.prototype.toString.call(b); - return a == b; -} - + function sameType(a, b) { + a = Object.prototype.toString.call(a); + b = Object.prototype.toString.call(b); + return a == b; + } -}); // module: reporters/base.js + }); // module: reporters/base.js -require.register("reporters/doc.js", function(module, exports, require){ + require.register('reporters/doc.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var Base = require('./base') - , utils = require('../utils'); + var Base = require('./base'), + utils = require('../utils'); -/** + /** * Expose `Doc`. */ -exports = module.exports = Doc; + exports = module.exports = Doc; -/** + /** * Initialize a new `Doc` reporter. * * @param {Runner} runner * @api public */ -function Doc(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , indents = 2; - - function indent() { - return Array(indents).join(' '); - } + function Doc(runner) { + Base.call(this, runner); - runner.on('suite', function(suite){ - if (suite.root) return; - ++indents; - console.log('%s
', indent()); - ++indents; - console.log('%s

%s

', indent(), utils.escape(suite.title)); - console.log('%s
', indent()); - }); + var self = this, + stats = this.stats, + total = runner.total, + indents = 2; - runner.on('suite end', function(suite){ - if (suite.root) return; - console.log('%s
', indent()); - --indents; - console.log('%s
', indent()); - --indents; - }); + function indent() { + return Array(indents).join(' '); + } - runner.on('pass', function(test){ - console.log('%s
%s
', indent(), utils.escape(test.title)); - var code = utils.escape(utils.clean(test.fn.toString())); - console.log('%s
%s
', indent(), code); - }); -} + runner.on('suite', function (suite) { + if (suite.root) { return; } + ++indents; + console.log('%s
', indent()); + ++indents; + console.log('%s

%s

', indent(), utils.escape(suite.title)); + console.log('%s
', indent()); + }); + + runner.on('suite end', function (suite) { + if (suite.root) { return; } + console.log('%s
', indent()); + --indents; + console.log('%s
', indent()); + --indents; + }); + + runner.on('pass', function (test) { + console.log('%s
%s
', indent(), utils.escape(test.title)); + var code = utils.escape(utils.clean(test.fn.toString())); + console.log('%s
%s
', indent(), code); + }); + } -}); // module: reporters/doc.js + }); // module: reporters/doc.js -require.register("reporters/dot.js", function(module, exports, require){ + require.register('reporters/dot.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var Base = require('./base') - , color = Base.color; + var Base = require('./base'), + color = Base.color; -/** + /** * Expose `Dot`. */ -exports = module.exports = Dot; + exports = module.exports = Dot; -/** + /** * Initialize a new `Dot` matrix test reporter. * * @param {Runner} runner * @api public */ -function Dot(runner) { - Base.call(this, runner); + function Dot(runner) { + Base.call(this, runner); - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , n = 0; + var self = this, + stats = this.stats, + width = Base.window.width * 0.75 | 0, + n = 0; - runner.on('start', function(){ - process.stdout.write('\n '); - }); + runner.on('start', function () { + process.stdout.write('\n '); + }); - runner.on('pending', function(test){ - process.stdout.write(color('pending', Base.symbols.dot)); - }); + runner.on('pending', function (test) { + process.stdout.write(color('pending', Base.symbols.dot)); + }); - runner.on('pass', function(test){ - if (++n % width == 0) process.stdout.write('\n '); - if ('slow' == test.speed) { - process.stdout.write(color('bright yellow', Base.symbols.dot)); - } else { - process.stdout.write(color(test.speed, Base.symbols.dot)); - } - }); + runner.on('pass', function (test) { + if (++n % width == 0) { process.stdout.write('\n '); } + if (test.speed == 'slow') { + process.stdout.write(color('bright yellow', Base.symbols.dot)); + } else { + process.stdout.write(color(test.speed, Base.symbols.dot)); + } + }); - runner.on('fail', function(test, err){ - if (++n % width == 0) process.stdout.write('\n '); - process.stdout.write(color('fail', Base.symbols.dot)); - }); + runner.on('fail', function (test, err) { + if (++n % width == 0) { process.stdout.write('\n '); } + process.stdout.write(color('fail', Base.symbols.dot)); + }); - runner.on('end', function(){ - console.log(); - self.epilogue(); - }); -} + runner.on('end', function () { + console.log(); + self.epilogue(); + }); + } -/** + /** * Inherit from `Base.prototype`. */ -function F(){}; -F.prototype = Base.prototype; -Dot.prototype = new F; -Dot.prototype.constructor = Dot; + function F() {} + F.prototype = Base.prototype; + Dot.prototype = new F(); + Dot.prototype.constructor = Dot; -}); // module: reporters/dot.js + }); // module: reporters/dot.js -require.register("reporters/html-cov.js", function(module, exports, require){ + require.register('reporters/html-cov.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var JSONCov = require('./json-cov') - , fs = require('browser/fs'); + var JSONCov = require('./json-cov'), + fs = require('browser/fs'); -/** + /** * Expose `HTMLCov`. */ -exports = module.exports = HTMLCov; + exports = module.exports = HTMLCov; -/** + /** * Initialize a new `JsCoverage` reporter. * * @param {Runner} runner * @api public */ -function HTMLCov(runner) { - var jade = require('jade') - , file = __dirname + '/templates/coverage.jade' - , str = fs.readFileSync(file, 'utf8') - , fn = jade.compile(str, { filename: file }) - , self = this; + function HTMLCov(runner) { + var jade = require('jade'), + file = __dirname + '/templates/coverage.jade', + str = fs.readFileSync(file, 'utf8'), + fn = jade.compile(str, { filename: file }), + self = this; - JSONCov.call(this, runner, false); + JSONCov.call(this, runner, false); - runner.on('end', function(){ - process.stdout.write(fn({ - cov: self.cov - , coverageClass: coverageClass - })); - }); -} + runner.on('end', function () { + process.stdout.write(fn({ + cov: self.cov, + coverageClass: coverageClass + })); + }); + } -/** + /** * Return coverage class for `n`. * * @return {String} * @api private */ -function coverageClass(n) { - if (n >= 75) return 'high'; - if (n >= 50) return 'medium'; - if (n >= 25) return 'low'; - return 'terrible'; -} -}); // module: reporters/html-cov.js + function coverageClass(n) { + if (n >= 75) { return 'high'; } + if (n >= 50) { return 'medium'; } + if (n >= 25) { return 'low'; } + return 'terrible'; + } + }); // module: reporters/html-cov.js -require.register("reporters/html.js", function(module, exports, require){ + require.register('reporters/html.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var Base = require('./base') - , utils = require('../utils') - , Progress = require('../browser/progress') - , escape = utils.escape; + var Base = require('./base'), + utils = require('../utils'), + Progress = require('../browser/progress'), + escape = utils.escape; -/** + /** * Save timer references to avoid Sinon interfering (see GH-237). */ -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; + var Date = global.Date, + setTimeout = global.setTimeout, + setInterval = global.setInterval, + clearTimeout = global.clearTimeout, + clearInterval = global.clearInterval; -/** + /** * Expose `HTML`. */ -exports = module.exports = HTML; + exports = module.exports = HTML; -/** + /** * Stats template. */ -var statsTemplate = '
    ' + var statsTemplate = ''; -/** + /** * Initialize a new `HTML` reporter. * * @param {Runner} runner * @api public */ -function HTML(runner, root) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , stat = fragment(statsTemplate) - , items = stat.getElementsByTagName('li') - , passes = items[1].getElementsByTagName('em')[0] - , passesLink = items[1].getElementsByTagName('a')[0] - , failures = items[2].getElementsByTagName('em')[0] - , failuresLink = items[2].getElementsByTagName('a')[0] - , duration = items[3].getElementsByTagName('em')[0] - , canvas = stat.getElementsByTagName('canvas')[0] - , report = fragment('
      ') - , stack = [report] - , progress - , ctx - - root = root || document.getElementById('mocha'); - - if (canvas.getContext) { - var ratio = window.devicePixelRatio || 1; - canvas.style.width = canvas.width; - canvas.style.height = canvas.height; - canvas.width *= ratio; - canvas.height *= ratio; - ctx = canvas.getContext('2d'); - ctx.scale(ratio, ratio); - progress = new Progress; - } - - if (!root) return error('#mocha div missing, add it to your document'); - - // pass toggle - on(passesLink, 'click', function(){ - unhide(); - var name = /pass/.test(report.className) ? '' : ' pass'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) hideSuitesWithout('test pass'); - }); - - // failure toggle - on(failuresLink, 'click', function(){ - unhide(); - var name = /fail/.test(report.className) ? '' : ' fail'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) hideSuitesWithout('test fail'); - }); - - root.appendChild(stat); - root.appendChild(report); - - if (progress) progress.size(40); - - runner.on('suite', function(suite){ - if (suite.root) return; - - // suite - var url = self.suiteURL(suite); - var el = fragment('
    • %s

    • ', url, escape(suite.title)); - - // container - stack[0].appendChild(el); - stack.unshift(document.createElement('ul')); - el.appendChild(stack[0]); - }); - - runner.on('suite end', function(suite){ - if (suite.root) return; - stack.shift(); - }); - - runner.on('fail', function(test, err){ - if ('hook' == test.type) runner.emit('test end', test); - }); - - runner.on('test end', function(test){ - // TODO: add to stats - var percent = stats.tests / this.total * 100 | 0; - if (progress) progress.update(percent).draw(ctx); - - // update stats - var ms = new Date - stats.start; - text(passes, stats.passes); - text(failures, stats.failures); - text(duration, (ms / 1000).toFixed(2)); - - // test - if ('passed' == test.state) { - var url = self.testURL(test); - var el = fragment('
    • %e%ems ‣

    • ', test.speed, test.title, test.duration, url); - } else if (test.pending) { - var el = fragment('
    • %e

    • ', test.title); - } else { - var el = fragment('
    • %e ‣

    • ', test.title, encodeURIComponent(test.fullTitle())); - var str = test.err.stack || test.err.toString(); - - // FF / Opera do not add the message - if (!~str.indexOf(test.err.message)) { - str = test.err.message + '\n' + str; - } - - // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we - // check for the result of the stringifying. - if ('[object Error]' == str) str = test.err.message; - - // Safari doesn't give you a stack. Let's at least provide a source line. - if (!test.err.stack && test.err.sourceURL && test.err.line !== undefined) { - str += "\n(" + test.err.sourceURL + ":" + test.err.line + ")"; - } - - el.appendChild(fragment('
      %e
      ', str)); - } - - // toggle code - // TODO: defer - if (!test.pending) { - var h2 = el.getElementsByTagName('h2')[0]; - - on(h2, 'click', function(){ - pre.style.display = 'none' == pre.style.display - ? 'block' - : 'none'; - }); - - var pre = fragment('
      %e
      ', utils.clean(test.fn.toString())); - el.appendChild(pre); - pre.style.display = 'none'; - } - - // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack. - if (stack[0]) stack[0].appendChild(el); - }); -} - -/** + function HTML(runner, root) { + Base.call(this, runner); + + var self = this, + stats = this.stats, + total = runner.total, + stat = fragment(statsTemplate), + items = stat.getElementsByTagName('li'), + passes = items[1].getElementsByTagName('em')[0], + passesLink = items[1].getElementsByTagName('a')[0], + failures = items[2].getElementsByTagName('em')[0], + failuresLink = items[2].getElementsByTagName('a')[0], + duration = items[3].getElementsByTagName('em')[0], + canvas = stat.getElementsByTagName('canvas')[0], + report = fragment('
        '), + stack = [ report ], + progress, + ctx; + + root = root || document.getElementById('mocha'); + + if (canvas.getContext) { + var ratio = window.devicePixelRatio || 1; + canvas.style.width = canvas.width; + canvas.style.height = canvas.height; + canvas.width *= ratio; + canvas.height *= ratio; + ctx = canvas.getContext('2d'); + ctx.scale(ratio, ratio); + progress = new Progress(); + } + + if (!root) { return error('#mocha div missing, add it to your document'); } + + // pass toggle + on(passesLink, 'click', function () { + unhide(); + var name = /pass/.test(report.className) ? '' : ' pass'; + report.className = report.className.replace(/fail|pass/g, '') + name; + if (report.className.trim()) { hideSuitesWithout('test pass'); } + }); + + // failure toggle + on(failuresLink, 'click', function () { + unhide(); + var name = /fail/.test(report.className) ? '' : ' fail'; + report.className = report.className.replace(/fail|pass/g, '') + name; + if (report.className.trim()) { hideSuitesWithout('test fail'); } + }); + + root.appendChild(stat); + root.appendChild(report); + + if (progress) { progress.size(40); } + + runner.on('suite', function (suite) { + if (suite.root) { return; } + + // suite + var url = self.suiteURL(suite); + var el = fragment('
      • %s

      • ', url, escape(suite.title)); + + // container + stack[0].appendChild(el); + stack.unshift(document.createElement('ul')); + el.appendChild(stack[0]); + }); + + runner.on('suite end', function (suite) { + if (suite.root) { return; } + stack.shift(); + }); + + runner.on('fail', function (test, err) { + if (test.type == 'hook') { runner.emit('test end', test); } + }); + + runner.on('test end', function (test) { + // TODO: add to stats + var percent = stats.tests / this.total * 100 | 0; + if (progress) { progress.update(percent).draw(ctx); } + + // update stats + var ms = new Date() - stats.start; + text(passes, stats.passes); + text(failures, stats.failures); + text(duration, (ms / 1000).toFixed(2)); + + // test + if (test.state == 'passed') { + var url = self.testURL(test); + var el = fragment('
      • %e%ems ‣

      • ', test.speed, test.title, test.duration, url); + } else if (test.pending) { + var el = fragment('
      • %e

      • ', test.title); + } else { + var el = fragment('
      • %e ‣

      • ', test.title, encodeURIComponent(test.fullTitle())); + var str = test.err.stack || test.err.toString(); + + // FF / Opera do not add the message + if (!~str.indexOf(test.err.message)) { + str = test.err.message + '\n' + str; + } + + // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we + // check for the result of the stringifying. + if (str == '[object Error]') { str = test.err.message; } + + // Safari doesn't give you a stack. Let's at least provide a source line. + if (!test.err.stack && test.err.sourceURL && test.err.line !== undefined) { + str += '\n(' + test.err.sourceURL + ':' + test.err.line + ')'; + } + + el.appendChild(fragment('
        %e
        ', str)); + } + + // toggle code + // TODO: defer + if (!test.pending) { + var h2 = el.getElementsByTagName('h2')[0]; + + on(h2, 'click', function () { + pre.style.display = pre.style.display == 'none' + ? 'block' + : 'none'; + }); + + var pre = fragment('
        %e
        ', utils.clean(test.fn.toString())); + el.appendChild(pre); + pre.style.display = 'none'; + } + + // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack. + if (stack[0]) { stack[0].appendChild(el); } + }); + } + + /** * Provide suite URL * * @param {Object} [suite] */ -HTML.prototype.suiteURL = function(suite){ - return '?grep=' + encodeURIComponent(suite.fullTitle()); -}; + HTML.prototype.suiteURL = function (suite) { + return '?grep=' + encodeURIComponent(suite.fullTitle()); + }; -/** + /** * Provide test URL * * @param {Object} [test] */ -HTML.prototype.testURL = function(test){ - return '?grep=' + encodeURIComponent(test.fullTitle()); -}; + HTML.prototype.testURL = function (test) { + return '?grep=' + encodeURIComponent(test.fullTitle()); + }; -/** + /** * Display error `msg`. */ -function error(msg) { - document.body.appendChild(fragment('
        %s
        ', msg)); -} + function error(msg) { + document.body.appendChild(fragment('
        %s
        ', msg)); + } -/** + /** * Return a DOM fragment from `html`. */ -function fragment(html) { - var args = arguments - , div = document.createElement('div') - , i = 1; + function fragment(html) { + var args = arguments, + div = document.createElement('div'), + i = 1; - div.innerHTML = html.replace(/%([se])/g, function(_, type){ - switch (type) { - case 's': return String(args[i++]); - case 'e': return escape(args[i++]); - } - }); + div.innerHTML = html.replace(/%([se])/g, function (_, type) { + switch (type) { + case 's': return String(args[i++]); + case 'e': return escape(args[i++]); + } + }); - return div.firstChild; -} + return div.firstChild; + } -/** + /** * Check for suites that do not have elements * with `classname`, and hide them. */ -function hideSuitesWithout(classname) { - var suites = document.getElementsByClassName('suite'); - for (var i = 0; i < suites.length; i++) { - var els = suites[i].getElementsByClassName(classname); - if (0 == els.length) suites[i].className += ' hidden'; - } -} + function hideSuitesWithout(classname) { + var suites = document.getElementsByClassName('suite'); + for (var i = 0; i < suites.length; i++) { + var els = suites[i].getElementsByClassName(classname); + if (els.length == 0) { suites[i].className += ' hidden'; } + } + } -/** + /** * Unhide .hidden suites. */ -function unhide() { - var els = document.getElementsByClassName('suite hidden'); - for (var i = 0; i < els.length; ++i) { - els[i].className = els[i].className.replace('suite hidden', 'suite'); - } -} + function unhide() { + var els = document.getElementsByClassName('suite hidden'); + for (var i = 0; i < els.length; ++i) { + els[i].className = els[i].className.replace('suite hidden', 'suite'); + } + } -/** + /** * Set `el` text to `str`. */ -function text(el, str) { - if (el.textContent) { - el.textContent = str; - } else { - el.innerText = str; - } -} + function text(el, str) { + if (el.textContent) { + el.textContent = str; + } else { + el.innerText = str; + } + } -/** + /** * Listen on `event` with callback `fn`. */ -function on(el, event, fn) { - if (el.addEventListener) { - el.addEventListener(event, fn, false); - } else { - el.attachEvent('on' + event, fn); - } -} - -}); // module: reporters/html.js - -require.register("reporters/index.js", function(module, exports, require){ - -exports.Base = require('./base'); -exports.Dot = require('./dot'); -exports.Doc = require('./doc'); -exports.TAP = require('./tap'); -exports.JSON = require('./json'); -exports.HTML = require('./html'); -exports.List = require('./list'); -exports.Min = require('./min'); -exports.Spec = require('./spec'); -exports.Nyan = require('./nyan'); -exports.XUnit = require('./xunit'); -exports.Markdown = require('./markdown'); -exports.Progress = require('./progress'); -exports.Landing = require('./landing'); -exports.JSONCov = require('./json-cov'); -exports.HTMLCov = require('./html-cov'); -exports.JSONStream = require('./json-stream'); - -}); // module: reporters/index.js - -require.register("reporters/json-cov.js", function(module, exports, require){ - -/** + function on(el, event, fn) { + if (el.addEventListener) { + el.addEventListener(event, fn, false); + } else { + el.attachEvent('on' + event, fn); + } + } + + }); // module: reporters/html.js + + require.register('reporters/index.js', function (module, exports, require) { + + exports.Base = require('./base'); + exports.Dot = require('./dot'); + exports.Doc = require('./doc'); + exports.TAP = require('./tap'); + exports.JSON = require('./json'); + exports.HTML = require('./html'); + exports.List = require('./list'); + exports.Min = require('./min'); + exports.Spec = require('./spec'); + exports.Nyan = require('./nyan'); + exports.XUnit = require('./xunit'); + exports.Markdown = require('./markdown'); + exports.Progress = require('./progress'); + exports.Landing = require('./landing'); + exports.JSONCov = require('./json-cov'); + exports.HTMLCov = require('./html-cov'); + exports.JSONStream = require('./json-stream'); + + }); // module: reporters/index.js + + require.register('reporters/json-cov.js', function (module, exports, require) { + + /** * Module dependencies. */ -var Base = require('./base'); + var Base = require('./base'); -/** + /** * Expose `JSONCov`. */ -exports = module.exports = JSONCov; + exports = module.exports = JSONCov; -/** + /** * Initialize a new `JsCoverage` reporter. * * @param {Runner} runner @@ -2907,41 +2908,41 @@ exports = module.exports = JSONCov; * @api public */ -function JSONCov(runner, output) { - var self = this - , output = 1 == arguments.length ? true : output; + function JSONCov(runner, output) { + var self = this, + output = arguments.length == 1 ? true : output; - Base.call(this, runner); + Base.call(this, runner); - var tests = [] - , failures = [] - , passes = []; + var tests = [], + failures = [], + passes = []; - runner.on('test end', function(test){ - tests.push(test); - }); + runner.on('test end', function (test) { + tests.push(test); + }); - runner.on('pass', function(test){ - passes.push(test); - }); + runner.on('pass', function (test) { + passes.push(test); + }); - runner.on('fail', function(test){ - failures.push(test); - }); + runner.on('fail', function (test) { + failures.push(test); + }); - runner.on('end', function(){ - var cov = global._$jscoverage || {}; - var result = self.cov = map(cov); - result.stats = self.stats; - result.tests = tests.map(clean); - result.failures = failures.map(clean); - result.passes = passes.map(clean); - if (!output) return; - process.stdout.write(JSON.stringify(result, null, 2 )); - }); -} + runner.on('end', function () { + var cov = global._$jscoverage || {}; + var result = self.cov = map(cov); + result.stats = self.stats; + result.tests = tests.map(clean); + result.failures = failures.map(clean); + result.passes = passes.map(clean); + if (!output) { return; } + process.stdout.write(JSON.stringify(result, null, 2)); + }); + } -/** + /** * Map jscoverage data to a JSON structure * suitable for reporting. * @@ -2950,36 +2951,36 @@ function JSONCov(runner, output) { * @api private */ -function map(cov) { - var ret = { - instrumentation: 'node-jscoverage' - , sloc: 0 - , hits: 0 - , misses: 0 - , coverage: 0 - , files: [] - }; - - for (var filename in cov) { - var data = coverage(filename, cov[filename]); - ret.files.push(data); - ret.hits += data.hits; - ret.misses += data.misses; - ret.sloc += data.sloc; - } - - ret.files.sort(function(a, b) { - return a.filename.localeCompare(b.filename); - }); - - if (ret.sloc > 0) { - ret.coverage = (ret.hits / ret.sloc) * 100; - } - - return ret; -}; - -/** + function map(cov) { + var ret = { + instrumentation: 'node-jscoverage', + sloc: 0, + hits: 0, + misses: 0, + coverage: 0, + files: [] + }; + + for (var filename in cov) { + var data = coverage(filename, cov[filename]); + ret.files.push(data); + ret.hits += data.hits; + ret.misses += data.misses; + ret.sloc += data.sloc; + } + + ret.files.sort(function (a, b) { + return a.filename.localeCompare(b.filename); + }); + + if (ret.sloc > 0) { + ret.coverage = (ret.hits / ret.sloc) * 100; + } + + return ret; + } + + /** * Map jscoverage data for a single source file * to a JSON structure suitable for reporting. * @@ -2989,41 +2990,41 @@ function map(cov) { * @api private */ -function coverage(filename, data) { - var ret = { - filename: filename, - coverage: 0, - hits: 0, - misses: 0, - sloc: 0, - source: {} - }; - - data.source.forEach(function(line, num){ - num++; - - if (data[num] === 0) { - ret.misses++; - ret.sloc++; - } else if (data[num] !== undefined) { - ret.hits++; - ret.sloc++; - } - - ret.source[num] = { - source: line - , coverage: data[num] === undefined - ? '' - : data[num] - }; - }); - - ret.coverage = ret.hits / ret.sloc * 100; - - return ret; -} - -/** + function coverage(filename, data) { + var ret = { + filename: filename, + coverage: 0, + hits: 0, + misses: 0, + sloc: 0, + source: {} + }; + + data.source.forEach(function (line, num) { + num++; + + if (data[num] === 0) { + ret.misses++; + ret.sloc++; + } else if (data[num] !== undefined) { + ret.hits++; + ret.sloc++; + } + + ret.source[num] = { + source: line, + coverage: data[num] === undefined + ? '' + : data[num] + }; + }); + + ret.coverage = ret.hits / ret.sloc * 100; + + return ret; + } + + /** * Return a plain-object representation of `test` * free of cyclic properties etc. * @@ -3032,63 +3033,63 @@ function coverage(filename, data) { * @api private */ -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} + function clean(test) { + return { + title: test.title, + fullTitle: test.fullTitle(), + duration: test.duration + }; + } -}); // module: reporters/json-cov.js + }); // module: reporters/json-cov.js -require.register("reporters/json-stream.js", function(module, exports, require){ + require.register('reporters/json-stream.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var Base = require('./base') - , color = Base.color; + var Base = require('./base'), + color = Base.color; -/** + /** * Expose `List`. */ -exports = module.exports = List; + exports = module.exports = List; -/** + /** * Initialize a new `List` test reporter. * * @param {Runner} runner * @api public */ -function List(runner) { - Base.call(this, runner); + function List(runner) { + Base.call(this, runner); - var self = this - , stats = this.stats - , total = runner.total; + var self = this, + stats = this.stats, + total = runner.total; - runner.on('start', function(){ - console.log(JSON.stringify(['start', { total: total }])); - }); + runner.on('start', function () { + console.log(JSON.stringify([ 'start', { total: total } ])); + }); - runner.on('pass', function(test){ - console.log(JSON.stringify(['pass', clean(test)])); - }); + runner.on('pass', function (test) { + console.log(JSON.stringify([ 'pass', clean(test) ])); + }); - runner.on('fail', function(test, err){ - console.log(JSON.stringify(['fail', clean(test)])); - }); + runner.on('fail', function (test, err) { + console.log(JSON.stringify([ 'fail', clean(test) ])); + }); - runner.on('end', function(){ - process.stdout.write(JSON.stringify(['end', self.stats])); - }); -} + runner.on('end', function () { + process.stdout.write(JSON.stringify([ 'end', self.stats ])); + }); + } -/** + /** * Return a plain-object representation of `test` * free of cyclic properties etc. * @@ -3097,71 +3098,71 @@ function List(runner) { * @api private */ -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} -}); // module: reporters/json-stream.js + function clean(test) { + return { + title: test.title, + fullTitle: test.fullTitle(), + duration: test.duration + }; + } + }); // module: reporters/json-stream.js -require.register("reporters/json.js", function(module, exports, require){ + require.register('reporters/json.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; + var Base = require('./base'), + cursor = Base.cursor, + color = Base.color; -/** + /** * Expose `JSON`. */ -exports = module.exports = JSONReporter; + exports = module.exports = JSONReporter; -/** + /** * Initialize a new `JSON` reporter. * * @param {Runner} runner * @api public */ -function JSONReporter(runner) { - var self = this; - Base.call(this, runner); + function JSONReporter(runner) { + var self = this; + Base.call(this, runner); - var tests = [] - , failures = [] - , passes = []; + var tests = [], + failures = [], + passes = []; - runner.on('test end', function(test){ - tests.push(test); - }); + runner.on('test end', function (test) { + tests.push(test); + }); - runner.on('pass', function(test){ - passes.push(test); - }); + runner.on('pass', function (test) { + passes.push(test); + }); - runner.on('fail', function(test){ - failures.push(test); - }); + runner.on('fail', function (test) { + failures.push(test); + }); - runner.on('end', function(){ - var obj = { - stats: self.stats - , tests: tests.map(clean) - , failures: failures.map(clean) - , passes: passes.map(clean) - }; + runner.on('end', function () { + var obj = { + stats: self.stats, + tests: tests.map(clean), + failures: failures.map(clean), + passes: passes.map(clean) + }; - process.stdout.write(JSON.stringify(obj, null, 2)); - }); -} + process.stdout.write(JSON.stringify(obj, null, 2)); + }); + } -/** + /** * Return a plain-object representation of `test` * free of cyclic properties etc. * @@ -3170,566 +3171,564 @@ function JSONReporter(runner) { * @api private */ -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} -}); // module: reporters/json.js + function clean(test) { + return { + title: test.title, + fullTitle: test.fullTitle(), + duration: test.duration + }; + } + }); // module: reporters/json.js -require.register("reporters/landing.js", function(module, exports, require){ + require.register('reporters/landing.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; + var Base = require('./base'), + cursor = Base.cursor, + color = Base.color; -/** + /** * Expose `Landing`. */ -exports = module.exports = Landing; + exports = module.exports = Landing; -/** + /** * Airplane color. */ -Base.colors.plane = 0; + Base.colors.plane = 0; -/** + /** * Airplane crash color. */ -Base.colors['plane crash'] = 31; + Base.colors['plane crash'] = 31; -/** + /** * Runway color. */ -Base.colors.runway = 90; + Base.colors.runway = 90; -/** + /** * Initialize a new `Landing` reporter. * * @param {Runner} runner * @api public */ -function Landing(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , total = runner.total - , stream = process.stdout - , plane = color('plane', '✈') - , crashed = -1 - , n = 0; - - function runway() { - var buf = Array(width).join('-'); - return ' ' + color('runway', buf); - } - - runner.on('start', function(){ - stream.write('\n '); - cursor.hide(); - }); - - runner.on('test end', function(test){ - // check if the plane crashed - var col = -1 == crashed - ? width * ++n / total | 0 - : crashed; - - // show the crash - if ('failed' == test.state) { - plane = color('plane crash', '✈'); - crashed = col; - } - - // render landing strip - stream.write('\u001b[4F\n\n'); - stream.write(runway()); - stream.write('\n '); - stream.write(color('runway', Array(col).join('⋅'))); - stream.write(plane) - stream.write(color('runway', Array(width - col).join('⋅') + '\n')); - stream.write(runway()); - stream.write('\u001b[0m'); - }); - - runner.on('end', function(){ - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** + function Landing(runner) { + Base.call(this, runner); + + var self = this, + stats = this.stats, + width = Base.window.width * 0.75 | 0, + total = runner.total, + stream = process.stdout, + plane = color('plane', '✈'), + crashed = -1, + n = 0; + + function runway() { + var buf = Array(width).join('-'); + return ' ' + color('runway', buf); + } + + runner.on('start', function () { + stream.write('\n '); + cursor.hide(); + }); + + runner.on('test end', function (test) { + // check if the plane crashed + var col = crashed == -1 + ? width * ++n / total | 0 + : crashed; + + // show the crash + if (test.state == 'failed') { + plane = color('plane crash', '✈'); + crashed = col; + } + + // render landing strip + stream.write('\u001b[4F\n\n'); + stream.write(runway()); + stream.write('\n '); + stream.write(color('runway', Array(col).join('⋅'))); + stream.write(plane); + stream.write(color('runway', Array(width - col).join('⋅') + '\n')); + stream.write(runway()); + stream.write('\u001b[0m'); + }); + + runner.on('end', function () { + cursor.show(); + console.log(); + self.epilogue(); + }); + } + + /** * Inherit from `Base.prototype`. */ -function F(){}; -F.prototype = Base.prototype; -Landing.prototype = new F; -Landing.prototype.constructor = Landing; + function F() {} + F.prototype = Base.prototype; + Landing.prototype = new F(); + Landing.prototype.constructor = Landing; -}); // module: reporters/landing.js + }); // module: reporters/landing.js -require.register("reporters/list.js", function(module, exports, require){ + require.register('reporters/list.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; + var Base = require('./base'), + cursor = Base.cursor, + color = Base.color; -/** + /** * Expose `List`. */ -exports = module.exports = List; + exports = module.exports = List; -/** + /** * Initialize a new `List` test reporter. * * @param {Runner} runner * @api public */ -function List(runner) { - Base.call(this, runner); + function List(runner) { + Base.call(this, runner); - var self = this - , stats = this.stats - , n = 0; + var self = this, + stats = this.stats, + n = 0; - runner.on('start', function(){ - console.log(); - }); + runner.on('start', function () { + console.log(); + }); - runner.on('test', function(test){ - process.stdout.write(color('pass', ' ' + test.fullTitle() + ': ')); - }); + runner.on('test', function (test) { + process.stdout.write(color('pass', ' ' + test.fullTitle() + ': ')); + }); - runner.on('pending', function(test){ - var fmt = color('checkmark', ' -') + runner.on('pending', function (test) { + var fmt = color('checkmark', ' -') + color('pending', ' %s'); - console.log(fmt, test.fullTitle()); - }); + console.log(fmt, test.fullTitle()); + }); - runner.on('pass', function(test){ - var fmt = color('checkmark', ' '+Base.symbols.dot) + runner.on('pass', function (test) { + var fmt = color('checkmark', ' ' + Base.symbols.dot) + color('pass', ' %s: ') + color(test.speed, '%dms'); - cursor.CR(); - console.log(fmt, test.fullTitle(), test.duration); - }); + cursor.CR(); + console.log(fmt, test.fullTitle(), test.duration); + }); - runner.on('fail', function(test, err){ - cursor.CR(); - console.log(color('fail', ' %d) %s'), ++n, test.fullTitle()); - }); + runner.on('fail', function (test, err) { + cursor.CR(); + console.log(color('fail', ' %d) %s'), ++n, test.fullTitle()); + }); - runner.on('end', self.epilogue.bind(self)); -} + runner.on('end', self.epilogue.bind(self)); + } -/** + /** * Inherit from `Base.prototype`. */ -function F(){}; -F.prototype = Base.prototype; -List.prototype = new F; -List.prototype.constructor = List; + function F() {} + F.prototype = Base.prototype; + List.prototype = new F(); + List.prototype.constructor = List; + }); // module: reporters/list.js -}); // module: reporters/list.js - -require.register("reporters/markdown.js", function(module, exports, require){ -/** + require.register('reporters/markdown.js', function (module, exports, require) { + /** * Module dependencies. */ -var Base = require('./base') - , utils = require('../utils'); + var Base = require('./base'), + utils = require('../utils'); -/** + /** * Expose `Markdown`. */ -exports = module.exports = Markdown; + exports = module.exports = Markdown; -/** + /** * Initialize a new `Markdown` reporter. * * @param {Runner} runner * @api public */ -function Markdown(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , level = 0 - , buf = ''; - - function title(str) { - return Array(level).join('#') + ' ' + str; - } - - function indent() { - return Array(level).join(' '); - } - - function mapTOC(suite, obj) { - var ret = obj; - obj = obj[suite.title] = obj[suite.title] || { suite: suite }; - suite.suites.forEach(function(suite){ - mapTOC(suite, obj); - }); - return ret; - } - - function stringifyTOC(obj, level) { - ++level; - var buf = ''; - var link; - for (var key in obj) { - if ('suite' == key) continue; - if (key) link = ' - [' + key + '](#' + utils.slug(obj[key].suite.fullTitle()) + ')\n'; - if (key) buf += Array(level).join(' ') + link; - buf += stringifyTOC(obj[key], level); - } - --level; - return buf; - } - - function generateTOC(suite) { - var obj = mapTOC(suite, {}); - return stringifyTOC(obj, 0); - } - - generateTOC(runner.suite); - - runner.on('suite', function(suite){ - ++level; - var slug = utils.slug(suite.fullTitle()); - buf += '' + '\n'; - buf += title(suite.title) + '\n'; - }); - - runner.on('suite end', function(suite){ - --level; - }); - - runner.on('pass', function(test){ - var code = utils.clean(test.fn.toString()); - buf += test.title + '.\n'; - buf += '\n```js\n'; - buf += code + '\n'; - buf += '```\n\n'; - }); - - runner.on('end', function(){ - process.stdout.write('# TOC\n'); - process.stdout.write(generateTOC(runner.suite)); - process.stdout.write(buf); - }); -} -}); // module: reporters/markdown.js - -require.register("reporters/min.js", function(module, exports, require){ - -/** + function Markdown(runner) { + Base.call(this, runner); + + var self = this, + stats = this.stats, + level = 0, + buf = ''; + + function title(str) { + return Array(level).join('#') + ' ' + str; + } + + function indent() { + return Array(level).join(' '); + } + + function mapTOC(suite, obj) { + var ret = obj; + obj = obj[suite.title] = obj[suite.title] || { suite: suite }; + suite.suites.forEach(function (suite) { + mapTOC(suite, obj); + }); + return ret; + } + + function stringifyTOC(obj, level) { + ++level; + var buf = ''; + var link; + for (var key in obj) { + if (key == 'suite') { continue; } + if (key) { link = ' - [' + key + '](#' + utils.slug(obj[key].suite.fullTitle()) + ')\n'; } + if (key) { buf += Array(level).join(' ') + link; } + buf += stringifyTOC(obj[key], level); + } + --level; + return buf; + } + + function generateTOC(suite) { + var obj = mapTOC(suite, {}); + return stringifyTOC(obj, 0); + } + + generateTOC(runner.suite); + + runner.on('suite', function (suite) { + ++level; + var slug = utils.slug(suite.fullTitle()); + buf += '' + '\n'; + buf += title(suite.title) + '\n'; + }); + + runner.on('suite end', function (suite) { + --level; + }); + + runner.on('pass', function (test) { + var code = utils.clean(test.fn.toString()); + buf += test.title + '.\n'; + buf += '\n```js\n'; + buf += code + '\n'; + buf += '```\n\n'; + }); + + runner.on('end', function () { + process.stdout.write('# TOC\n'); + process.stdout.write(generateTOC(runner.suite)); + process.stdout.write(buf); + }); + } + }); // module: reporters/markdown.js + + require.register('reporters/min.js', function (module, exports, require) { + + /** * Module dependencies. */ -var Base = require('./base'); + var Base = require('./base'); -/** + /** * Expose `Min`. */ -exports = module.exports = Min; + exports = module.exports = Min; -/** + /** * Initialize a new `Min` minimal test reporter (best used with --watch). * * @param {Runner} runner * @api public */ -function Min(runner) { - Base.call(this, runner); + function Min(runner) { + Base.call(this, runner); - runner.on('start', function(){ - // clear screen - process.stdout.write('\u001b[2J'); - // set cursor position - process.stdout.write('\u001b[1;3H'); - }); + runner.on('start', function () { + // clear screen + process.stdout.write('\u001b[2J'); + // set cursor position + process.stdout.write('\u001b[1;3H'); + }); - runner.on('end', this.epilogue.bind(this)); -} + runner.on('end', this.epilogue.bind(this)); + } -/** + /** * Inherit from `Base.prototype`. */ -function F(){}; -F.prototype = Base.prototype; -Min.prototype = new F; -Min.prototype.constructor = Min; + function F() {} + F.prototype = Base.prototype; + Min.prototype = new F(); + Min.prototype.constructor = Min; + }); // module: reporters/min.js -}); // module: reporters/min.js - -require.register("reporters/nyan.js", function(module, exports, require){ -/** + require.register('reporters/nyan.js', function (module, exports, require) { + /** * Module dependencies. */ -var Base = require('./base') - , color = Base.color; + var Base = require('./base'), + color = Base.color; -/** + /** * Expose `Dot`. */ -exports = module.exports = NyanCat; + exports = module.exports = NyanCat; -/** + /** * Initialize a new `Dot` matrix test reporter. * * @param {Runner} runner * @api public */ -function NyanCat(runner) { - Base.call(this, runner); - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , rainbowColors = this.rainbowColors = self.generateColors() - , colorIndex = this.colorIndex = 0 - , numerOfLines = this.numberOfLines = 4 - , trajectories = this.trajectories = [[], [], [], []] - , nyanCatWidth = this.nyanCatWidth = 11 - , trajectoryWidthMax = this.trajectoryWidthMax = (width - nyanCatWidth) - , scoreboardWidth = this.scoreboardWidth = 5 - , tick = this.tick = 0 - , n = 0; - - runner.on('start', function(){ - Base.cursor.hide(); - self.draw(); - }); - - runner.on('pending', function(test){ - self.draw(); - }); - - runner.on('pass', function(test){ - self.draw(); - }); - - runner.on('fail', function(test, err){ - self.draw(); - }); - - runner.on('end', function(){ - Base.cursor.show(); - for (var i = 0; i < self.numberOfLines; i++) write('\n'); - self.epilogue(); - }); -} - -/** + function NyanCat(runner) { + Base.call(this, runner); + var self = this, + stats = this.stats, + width = Base.window.width * 0.75 | 0, + rainbowColors = this.rainbowColors = self.generateColors(), + colorIndex = this.colorIndex = 0, + numerOfLines = this.numberOfLines = 4, + trajectories = this.trajectories = [ [], [], [], [] ], + nyanCatWidth = this.nyanCatWidth = 11, + trajectoryWidthMax = this.trajectoryWidthMax = (width - nyanCatWidth), + scoreboardWidth = this.scoreboardWidth = 5, + tick = this.tick = 0, + n = 0; + + runner.on('start', function () { + Base.cursor.hide(); + self.draw(); + }); + + runner.on('pending', function (test) { + self.draw(); + }); + + runner.on('pass', function (test) { + self.draw(); + }); + + runner.on('fail', function (test, err) { + self.draw(); + }); + + runner.on('end', function () { + Base.cursor.show(); + for (var i = 0; i < self.numberOfLines; i++) { write('\n'); } + self.epilogue(); + }); + } + + /** * Draw the nyan cat * * @api private */ -NyanCat.prototype.draw = function(){ - this.appendRainbow(); - this.drawScoreboard(); - this.drawRainbow(); - this.drawNyanCat(); - this.tick = !this.tick; -}; + NyanCat.prototype.draw = function () { + this.appendRainbow(); + this.drawScoreboard(); + this.drawRainbow(); + this.drawNyanCat(); + this.tick = !this.tick; + }; -/** + /** * Draw the "scoreboard" showing the number * of passes, failures and pending tests. * * @api private */ -NyanCat.prototype.drawScoreboard = function(){ - var stats = this.stats; - var colors = Base.colors; + NyanCat.prototype.drawScoreboard = function () { + var stats = this.stats; + var colors = Base.colors; - function draw(color, n) { - write(' '); - write('\u001b[' + color + 'm' + n + '\u001b[0m'); - write('\n'); - } + function draw(color, n) { + write(' '); + write('\u001b[' + color + 'm' + n + '\u001b[0m'); + write('\n'); + } - draw(colors.green, stats.passes); - draw(colors.fail, stats.failures); - draw(colors.pending, stats.pending); - write('\n'); + draw(colors.green, stats.passes); + draw(colors.fail, stats.failures); + draw(colors.pending, stats.pending); + write('\n'); - this.cursorUp(this.numberOfLines); -}; + this.cursorUp(this.numberOfLines); + }; -/** + /** * Append the rainbow. * * @api private */ -NyanCat.prototype.appendRainbow = function(){ - var segment = this.tick ? '_' : '-'; - var rainbowified = this.rainbowify(segment); + NyanCat.prototype.appendRainbow = function () { + var segment = this.tick ? '_' : '-'; + var rainbowified = this.rainbowify(segment); - for (var index = 0; index < this.numberOfLines; index++) { - var trajectory = this.trajectories[index]; - if (trajectory.length >= this.trajectoryWidthMax) trajectory.shift(); - trajectory.push(rainbowified); - } -}; + for (var index = 0; index < this.numberOfLines; index++) { + var trajectory = this.trajectories[index]; + if (trajectory.length >= this.trajectoryWidthMax) { trajectory.shift(); } + trajectory.push(rainbowified); + } + }; -/** + /** * Draw the rainbow. * * @api private */ -NyanCat.prototype.drawRainbow = function(){ - var self = this; + NyanCat.prototype.drawRainbow = function () { + var self = this; - this.trajectories.forEach(function(line, index) { - write('\u001b[' + self.scoreboardWidth + 'C'); - write(line.join('')); - write('\n'); - }); + this.trajectories.forEach(function (line, index) { + write('\u001b[' + self.scoreboardWidth + 'C'); + write(line.join('')); + write('\n'); + }); - this.cursorUp(this.numberOfLines); -}; + this.cursorUp(this.numberOfLines); + }; -/** + /** * Draw the nyan cat * * @api private */ -NyanCat.prototype.drawNyanCat = function() { - var self = this; - var startWidth = this.scoreboardWidth + this.trajectories[0].length; - var color = '\u001b[' + startWidth + 'C'; - var padding = ''; + NyanCat.prototype.drawNyanCat = function () { + var self = this; + var startWidth = this.scoreboardWidth + this.trajectories[0].length; + var color = '\u001b[' + startWidth + 'C'; + var padding = ''; - write(color); - write('_,------,'); - write('\n'); + write(color); + write('_,------,'); + write('\n'); - write(color); - padding = self.tick ? ' ' : ' '; - write('_|' + padding + '/\\_/\\ '); - write('\n'); + write(color); + padding = self.tick ? ' ' : ' '; + write('_|' + padding + '/\\_/\\ '); + write('\n'); - write(color); - padding = self.tick ? '_' : '__'; - var tail = self.tick ? '~' : '^'; - var face; - write(tail + '|' + padding + this.face() + ' '); - write('\n'); + write(color); + padding = self.tick ? '_' : '__'; + var tail = self.tick ? '~' : '^'; + var face; + write(tail + '|' + padding + this.face() + ' '); + write('\n'); - write(color); - padding = self.tick ? ' ' : ' '; - write(padding + '"" "" '); - write('\n'); + write(color); + padding = self.tick ? ' ' : ' '; + write(padding + '"" "" '); + write('\n'); - this.cursorUp(this.numberOfLines); -}; + this.cursorUp(this.numberOfLines); + }; -/** + /** * Draw nyan cat face. * * @return {String} * @api private */ -NyanCat.prototype.face = function() { - var stats = this.stats; - if (stats.failures) { - return '( x .x)'; - } else if (stats.pending) { - return '( o .o)'; - } else if(stats.passes) { - return '( ^ .^)'; - } else { - return '( - .-)'; - } -} - -/** + NyanCat.prototype.face = function () { + var stats = this.stats; + if (stats.failures) { + return '( x .x)'; + } else if (stats.pending) { + return '( o .o)'; + } else if (stats.passes) { + return '( ^ .^)'; + } else { + return '( - .-)'; + } + }; + + /** * Move cursor up `n`. * * @param {Number} n * @api private */ -NyanCat.prototype.cursorUp = function(n) { - write('\u001b[' + n + 'A'); -}; + NyanCat.prototype.cursorUp = function (n) { + write('\u001b[' + n + 'A'); + }; -/** + /** * Move cursor down `n`. * * @param {Number} n * @api private */ -NyanCat.prototype.cursorDown = function(n) { - write('\u001b[' + n + 'B'); -}; + NyanCat.prototype.cursorDown = function (n) { + write('\u001b[' + n + 'B'); + }; -/** + /** * Generate rainbow colors. * * @return {Array} * @api private */ -NyanCat.prototype.generateColors = function(){ - var colors = []; + NyanCat.prototype.generateColors = function () { + var colors = []; - for (var i = 0; i < (6 * 7); i++) { - var pi3 = Math.floor(Math.PI / 3); - var n = (i * (1.0 / 6)); - var r = Math.floor(3 * Math.sin(n) + 3); - var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3); - var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3); - colors.push(36 * r + 6 * g + b + 16); - } + for (var i = 0; i < (6 * 7); i++) { + var pi3 = Math.floor(Math.PI / 3); + var n = (i * (1.0 / 6)); + var r = Math.floor(3 * Math.sin(n) + 3); + var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3); + var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3); + colors.push(36 * r + 6 * g + b + 16); + } - return colors; -}; + return colors; + }; -/** + /** * Apply rainbow to the given `str`. * * @param {String} str @@ -3737,55 +3736,54 @@ NyanCat.prototype.generateColors = function(){ * @api private */ -NyanCat.prototype.rainbowify = function(str){ - var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length]; - this.colorIndex += 1; - return '\u001b[38;5;' + color + 'm' + str + '\u001b[0m'; -}; + NyanCat.prototype.rainbowify = function (str) { + var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length]; + this.colorIndex += 1; + return '\u001b[38;5;' + color + 'm' + str + '\u001b[0m'; + }; -/** + /** * Stdout helper. */ -function write(string) { - process.stdout.write(string); -} + function write(string) { + process.stdout.write(string); + } -/** + /** * Inherit from `Base.prototype`. */ -function F(){}; -F.prototype = Base.prototype; -NyanCat.prototype = new F; -NyanCat.prototype.constructor = NyanCat; + function F() {} + F.prototype = Base.prototype; + NyanCat.prototype = new F(); + NyanCat.prototype.constructor = NyanCat; + }); // module: reporters/nyan.js -}); // module: reporters/nyan.js + require.register('reporters/progress.js', function (module, exports, require) { -require.register("reporters/progress.js", function(module, exports, require){ - -/** + /** * Module dependencies. */ -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; + var Base = require('./base'), + cursor = Base.cursor, + color = Base.color; -/** + /** * Expose `Progress`. */ -exports = module.exports = Progress; + exports = module.exports = Progress; -/** + /** * General progress bar color. */ -Base.colors.progress = 90; + Base.colors.progress = 90; -/** + /** * Initialize a new `Progress` bar test reporter. * * @param {Runner} runner @@ -3793,225 +3791,223 @@ Base.colors.progress = 90; * @api public */ -function Progress(runner, options) { - Base.call(this, runner); - - var self = this - , options = options || {} - , stats = this.stats - , width = Base.window.width * .50 | 0 - , total = runner.total - , complete = 0 - , max = Math.max; - - // default chars - options.open = options.open || '['; - options.complete = options.complete || '▬'; - options.incomplete = options.incomplete || Base.symbols.dot; - options.close = options.close || ']'; - options.verbose = false; - - // tests started - runner.on('start', function(){ - console.log(); - cursor.hide(); - }); - - // tests complete - runner.on('test end', function(){ - complete++; - var incomplete = total - complete - , percent = complete / total - , n = width * percent | 0 - , i = width - n; - - cursor.CR(); - process.stdout.write('\u001b[J'); - process.stdout.write(color('progress', ' ' + options.open)); - process.stdout.write(Array(n).join(options.complete)); - process.stdout.write(Array(i).join(options.incomplete)); - process.stdout.write(color('progress', options.close)); - if (options.verbose) { - process.stdout.write(color('progress', ' ' + complete + ' of ' + total)); - } - }); - - // tests are complete, output some stats - // and the failures if any - runner.on('end', function(){ - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** + function Progress(runner, options) { + Base.call(this, runner); + + var self = this, + options = options || {}, + stats = this.stats, + width = Base.window.width * 0.50 | 0, + total = runner.total, + complete = 0, + max = Math.max; + + // default chars + options.open = options.open || '['; + options.complete = options.complete || '▬'; + options.incomplete = options.incomplete || Base.symbols.dot; + options.close = options.close || ']'; + options.verbose = false; + + // tests started + runner.on('start', function () { + console.log(); + cursor.hide(); + }); + + // tests complete + runner.on('test end', function () { + complete++; + var incomplete = total - complete, + percent = complete / total, + n = width * percent | 0, + i = width - n; + + cursor.CR(); + process.stdout.write('\u001b[J'); + process.stdout.write(color('progress', ' ' + options.open)); + process.stdout.write(Array(n).join(options.complete)); + process.stdout.write(Array(i).join(options.incomplete)); + process.stdout.write(color('progress', options.close)); + if (options.verbose) { + process.stdout.write(color('progress', ' ' + complete + ' of ' + total)); + } + }); + + // tests are complete, output some stats + // and the failures if any + runner.on('end', function () { + cursor.show(); + console.log(); + self.epilogue(); + }); + } + + /** * Inherit from `Base.prototype`. */ -function F(){}; -F.prototype = Base.prototype; -Progress.prototype = new F; -Progress.prototype.constructor = Progress; + function F() {} + F.prototype = Base.prototype; + Progress.prototype = new F(); + Progress.prototype.constructor = Progress; + }); // module: reporters/progress.js -}); // module: reporters/progress.js + require.register('reporters/spec.js', function (module, exports, require) { -require.register("reporters/spec.js", function(module, exports, require){ - -/** + /** * Module dependencies. */ -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; + var Base = require('./base'), + cursor = Base.cursor, + color = Base.color; -/** + /** * Expose `Spec`. */ -exports = module.exports = Spec; + exports = module.exports = Spec; -/** + /** * Initialize a new `Spec` test reporter. * * @param {Runner} runner * @api public */ -function Spec(runner) { - Base.call(this, runner); + function Spec(runner) { + Base.call(this, runner); - var self = this - , stats = this.stats - , indents = 0 - , n = 0; + var self = this, + stats = this.stats, + indents = 0, + n = 0; - function indent() { - return Array(indents).join(' ') - } + function indent() { + return Array(indents).join(' '); + } - runner.on('start', function(){ - console.log(); - }); + runner.on('start', function () { + console.log(); + }); - runner.on('suite', function(suite){ - ++indents; - console.log(color('suite', '%s%s'), indent(), suite.title); - }); + runner.on('suite', function (suite) { + ++indents; + console.log(color('suite', '%s%s'), indent(), suite.title); + }); - runner.on('suite end', function(suite){ - --indents; - if (1 == indents) console.log(); - }); + runner.on('suite end', function (suite) { + --indents; + if (indents == 1) { console.log(); } + }); - runner.on('pending', function(test){ - var fmt = indent() + color('pending', ' - %s'); - console.log(fmt, test.title); - }); + runner.on('pending', function (test) { + var fmt = indent() + color('pending', ' - %s'); + console.log(fmt, test.title); + }); - runner.on('pass', function(test){ - if ('fast' == test.speed) { - var fmt = indent() + runner.on('pass', function (test) { + if (test.speed == 'fast') { + var fmt = indent() + color('checkmark', ' ' + Base.symbols.ok) + color('pass', ' %s '); - cursor.CR(); - console.log(fmt, test.title); - } else { - var fmt = indent() + cursor.CR(); + console.log(fmt, test.title); + } else { + var fmt = indent() + color('checkmark', ' ' + Base.symbols.ok) + color('pass', ' %s ') + color(test.speed, '(%dms)'); - cursor.CR(); - console.log(fmt, test.title, test.duration); - } - }); + cursor.CR(); + console.log(fmt, test.title, test.duration); + } + }); - runner.on('fail', function(test, err){ - cursor.CR(); - console.log(indent() + color('fail', ' %d) %s'), ++n, test.title); - }); + runner.on('fail', function (test, err) { + cursor.CR(); + console.log(indent() + color('fail', ' %d) %s'), ++n, test.title); + }); - runner.on('end', self.epilogue.bind(self)); -} + runner.on('end', self.epilogue.bind(self)); + } -/** + /** * Inherit from `Base.prototype`. */ -function F(){}; -F.prototype = Base.prototype; -Spec.prototype = new F; -Spec.prototype.constructor = Spec; - + function F() {} + F.prototype = Base.prototype; + Spec.prototype = new F(); + Spec.prototype.constructor = Spec; -}); // module: reporters/spec.js + }); // module: reporters/spec.js -require.register("reporters/tap.js", function(module, exports, require){ + require.register('reporters/tap.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; + var Base = require('./base'), + cursor = Base.cursor, + color = Base.color; -/** + /** * Expose `TAP`. */ -exports = module.exports = TAP; + exports = module.exports = TAP; -/** + /** * Initialize a new `TAP` reporter. * * @param {Runner} runner * @api public */ -function TAP(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , n = 1 - , passes = 0 - , failures = 0; - - runner.on('start', function(){ - var total = runner.grepTotal(runner.suite); - console.log('%d..%d', 1, total); - }); - - runner.on('test end', function(){ - ++n; - }); - - runner.on('pending', function(test){ - console.log('ok %d %s # SKIP -', n, title(test)); - }); - - runner.on('pass', function(test){ - passes++; - console.log('ok %d %s', n, title(test)); - }); - - runner.on('fail', function(test, err){ - failures++; - console.log('not ok %d %s', n, title(test)); - if (err.stack) console.log(err.stack.replace(/^/gm, ' ')); - }); - - runner.on('end', function(){ - console.log('# tests ' + (passes + failures)); - console.log('# pass ' + passes); - console.log('# fail ' + failures); - }); -} + function TAP(runner) { + Base.call(this, runner); + + var self = this, + stats = this.stats, + n = 1, + passes = 0, + failures = 0; + + runner.on('start', function () { + var total = runner.grepTotal(runner.suite); + console.log('%d..%d', 1, total); + }); + + runner.on('test end', function () { + ++n; + }); + + runner.on('pending', function (test) { + console.log('ok %d %s # SKIP -', n, title(test)); + }); + + runner.on('pass', function (test) { + passes++; + console.log('ok %d %s', n, title(test)); + }); + + runner.on('fail', function (test, err) { + failures++; + console.log('not ok %d %s', n, title(test)); + if (err.stack) { console.log(err.stack.replace(/^/gm, ' ')); } + }); + + runner.on('end', function () { + console.log('# tests ' + (passes + failures)); + console.log('# pass ' + passes); + console.log('# fail ' + failures); + }); + } -/** + /** * Return a TAP-safe title of `test` * * @param {Object} test @@ -4019,172 +4015,171 @@ function TAP(runner) { * @api private */ -function title(test) { - return test.fullTitle().replace(/#/g, ''); -} + function title(test) { + return test.fullTitle().replace(/#/g, ''); + } -}); // module: reporters/tap.js + }); // module: reporters/tap.js -require.register("reporters/xunit.js", function(module, exports, require){ + require.register('reporters/xunit.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var Base = require('./base') - , utils = require('../utils') - , escape = utils.escape; + var Base = require('./base'), + utils = require('../utils'), + escape = utils.escape; -/** + /** * Save timer references to avoid Sinon interfering (see GH-237). */ -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; + var Date = global.Date, + setTimeout = global.setTimeout, + setInterval = global.setInterval, + clearTimeout = global.clearTimeout, + clearInterval = global.clearInterval; -/** + /** * Expose `XUnit`. */ -exports = module.exports = XUnit; + exports = module.exports = XUnit; -/** + /** * Initialize a new `XUnit` reporter. * * @param {Runner} runner * @api public */ -function XUnit(runner) { - Base.call(this, runner); - var stats = this.stats - , tests = [] - , self = this; - - runner.on('pending', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - tests.push(test); - }); - - runner.on('fail', function(test){ - tests.push(test); - }); - - runner.on('end', function(){ - console.log(tag('testsuite', { - name: 'Mocha Tests' - , tests: stats.tests - , failures: stats.failures - , errors: stats.failures - , skipped: stats.tests - stats.failures - stats.passes - , timestamp: (new Date).toUTCString() - , time: (stats.duration / 1000) || 0 - }, false)); - - tests.forEach(test); - console.log(''); - }); -} - -/** + function XUnit(runner) { + Base.call(this, runner); + var stats = this.stats, + tests = [], + self = this; + + runner.on('pending', function (test) { + tests.push(test); + }); + + runner.on('pass', function (test) { + tests.push(test); + }); + + runner.on('fail', function (test) { + tests.push(test); + }); + + runner.on('end', function () { + console.log(tag('testsuite', { + name: 'Mocha Tests', + tests: stats.tests, + failures: stats.failures, + errors: stats.failures, + skipped: stats.tests - stats.failures - stats.passes, + timestamp: (new Date()).toUTCString(), + time: (stats.duration / 1000) || 0 + }, false)); + + tests.forEach(test); + console.log(''); + }); + } + + /** * Inherit from `Base.prototype`. */ -function F(){}; -F.prototype = Base.prototype; -XUnit.prototype = new F; -XUnit.prototype.constructor = XUnit; - + function F() {} + F.prototype = Base.prototype; + XUnit.prototype = new F(); + XUnit.prototype.constructor = XUnit; -/** + /** * Output tag for the given `test.` */ -function test(test) { - var attrs = { - classname: test.parent.fullTitle() - , name: test.title - , time: (test.duration / 1000) || 0 - }; - - if ('failed' == test.state) { - var err = test.err; - attrs.message = escape(err.message); - console.log(tag('testcase', attrs, false, tag('failure', attrs, false, cdata(err.stack)))); - } else if (test.pending) { - console.log(tag('testcase', attrs, false, tag('skipped', {}, true))); - } else { - console.log(tag('testcase', attrs, true) ); - } -} - -/** + function test(test) { + var attrs = { + classname: test.parent.fullTitle(), + name: test.title, + time: (test.duration / 1000) || 0 + }; + + if (test.state == 'failed') { + var err = test.err; + attrs.message = escape(err.message); + console.log(tag('testcase', attrs, false, tag('failure', attrs, false, cdata(err.stack)))); + } else if (test.pending) { + console.log(tag('testcase', attrs, false, tag('skipped', {}, true))); + } else { + console.log(tag('testcase', attrs, true)); + } + } + + /** * HTML tag helper. */ -function tag(name, attrs, close, content) { - var end = close ? '/>' : '>' - , pairs = [] - , tag; + function tag(name, attrs, close, content) { + var end = close ? '/>' : '>', + pairs = [], + tag; - for (var key in attrs) { - pairs.push(key + '="' + escape(attrs[key]) + '"'); - } + for (var key in attrs) { + pairs.push(key + '="' + escape(attrs[key]) + '"'); + } - tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end; - if (content) tag += content + ''; -} + function cdata(str) { + return ''; + } -}); // module: reporters/xunit.js + }); // module: reporters/xunit.js -require.register("runnable.js", function(module, exports, require){ + require.register('runnable.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('mocha:runnable') - , milliseconds = require('./ms'); + var EventEmitter = require('browser/events').EventEmitter, + debug = require('browser/debug')('mocha:runnable'), + milliseconds = require('./ms'); -/** + /** * Save timer references to avoid Sinon interfering (see GH-237). */ -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; + var Date = global.Date, + setTimeout = global.setTimeout, + setInterval = global.setInterval, + clearTimeout = global.clearTimeout, + clearInterval = global.clearInterval; -/** + /** * Object#toString(). */ -var toString = Object.prototype.toString; + var toString = Object.prototype.toString; -/** + /** * Expose `Runnable`. */ -module.exports = Runnable; + module.exports = Runnable; -/** + /** * Initialize a new `Runnable` with the given `title` and callback `fn`. * * @param {String} title @@ -4192,27 +4187,26 @@ module.exports = Runnable; * @api private */ -function Runnable(title, fn) { - this.title = title; - this.fn = fn; - this.async = fn && fn.length; - this.sync = ! this.async; - this._timeout = 2000; - this._slow = 75; - this.timedOut = false; -} + function Runnable(title, fn) { + this.title = title; + this.fn = fn; + this.async = fn && fn.length; + this.sync = !this.async; + this._timeout = 2000; + this._slow = 75; + this.timedOut = false; + } -/** + /** * Inherit from `EventEmitter.prototype`. */ -function F(){}; -F.prototype = EventEmitter.prototype; -Runnable.prototype = new F; -Runnable.prototype.constructor = Runnable; - + function F() {} + F.prototype = EventEmitter.prototype; + Runnable.prototype = new F(); + Runnable.prototype.constructor = Runnable; -/** + /** * Set & get timeout `ms`. * * @param {Number|String} ms @@ -4220,16 +4214,16 @@ Runnable.prototype.constructor = Runnable; * @api private */ -Runnable.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = ms; - if (this.timer) this.resetTimeout(); - return this; -}; + Runnable.prototype.timeout = function (ms) { + if (arguments.length == 0) { return this._timeout; } + if (typeof ms === 'string') { ms = milliseconds(ms); } + debug('timeout %d', ms); + this._timeout = ms; + if (this.timer) { this.resetTimeout(); } + return this; + }; -/** + /** * Set & get slow `ms`. * * @param {Number|String} ms @@ -4237,15 +4231,15 @@ Runnable.prototype.timeout = function(ms){ * @api private */ -Runnable.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._slow = ms; - return this; -}; + Runnable.prototype.slow = function (ms) { + if (arguments.length === 0) { return this._slow; } + if (typeof ms === 'string') { ms = milliseconds(ms); } + debug('timeout %d', ms); + this._slow = ms; + return this; + }; -/** + /** * Return the full title generated by recursively * concatenating the parent's full title. * @@ -4253,172 +4247,172 @@ Runnable.prototype.slow = function(ms){ * @api public */ -Runnable.prototype.fullTitle = function(){ - return this.parent.fullTitle() + ' ' + this.title; -}; + Runnable.prototype.fullTitle = function () { + return this.parent.fullTitle() + ' ' + this.title; + }; -/** + /** * Clear the timeout. * * @api private */ -Runnable.prototype.clearTimeout = function(){ - clearTimeout(this.timer); -}; + Runnable.prototype.clearTimeout = function () { + clearTimeout(this.timer); + }; -/** + /** * Inspect the runnable void of private properties. * * @return {String} * @api private */ -Runnable.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - if ('_' == key[0]) return; - if ('parent' == key) return '#'; - if ('ctx' == key) return '#'; - return val; - }, 2); -}; + Runnable.prototype.inspect = function () { + return JSON.stringify(this, function (key, val) { + if (key[0] == '_') { return; } + if (key == 'parent') { return '#'; } + if (key == 'ctx') { return '#'; } + return val; + }, 2); + }; -/** + /** * Reset the timeout. * * @api private */ -Runnable.prototype.resetTimeout = function(){ - var self = this; - var ms = this.timeout() || 1e9; + Runnable.prototype.resetTimeout = function () { + var self = this; + var ms = this.timeout() || 1e9; - this.clearTimeout(); - this.timer = setTimeout(function(){ - self.callback(new Error('timeout of ' + ms + 'ms exceeded')); - self.timedOut = true; - }, ms); -}; + this.clearTimeout(); + this.timer = setTimeout(function () { + self.callback(new Error('timeout of ' + ms + 'ms exceeded')); + self.timedOut = true; + }, ms); + }; -/** + /** * Whitelist these globals for this test run * * @api private */ -Runnable.prototype.globals = function(arr){ - var self = this; - this._allowedGlobals = arr; -}; + Runnable.prototype.globals = function (arr) { + var self = this; + this._allowedGlobals = arr; + }; -/** + /** * Run the test and invoke `fn(err)`. * * @param {Function} fn * @api private */ -Runnable.prototype.run = function(fn){ - var self = this - , ms = this.timeout() - , start = new Date - , ctx = this.ctx - , finished - , emitted; - - if (ctx) ctx.runnable(this); - - // timeout - if (this.async) { - if (ms) { - this.timer = setTimeout(function(){ - done(new Error('timeout of ' + ms + 'ms exceeded')); - self.timedOut = true; - }, ms); - } - } - - // called multiple times - function multiple(err) { - if (emitted) return; - emitted = true; - self.emit('error', err || new Error('done() called multiple times')); - } - - // finished - function done(err) { - if (self.timedOut) return; - if (finished) return multiple(err); - self.clearTimeout(); - self.duration = new Date - start; - finished = true; - fn(err); - } - - // for .resetTimeout() - this.callback = done; - - // async - if (this.async) { - try { - this.fn.call(ctx, function(err){ - if (err instanceof Error || toString.call(err) === "[object Error]") return done(err); - if (null != err) return done(new Error('done() invoked with non-Error: ' + err)); - done(); - }); - } catch (err) { - done(err); - } - return; - } - - if (this.asyncOnly) { - return done(new Error('--async-only option in use without declaring `done()`')); - } - - // sync - try { - if (!this.pending) this.fn.call(ctx); - this.duration = new Date - start; - fn(); - } catch (err) { - fn(err); - } -}; - -}); // module: runnable.js - -require.register("runner.js", function(module, exports, require){ -/** + Runnable.prototype.run = function (fn) { + var self = this, + ms = this.timeout(), + start = new Date(), + ctx = this.ctx, + finished, + emitted; + + if (ctx) { ctx.runnable(this); } + + // timeout + if (this.async) { + if (ms) { + this.timer = setTimeout(function () { + done(new Error('timeout of ' + ms + 'ms exceeded')); + self.timedOut = true; + }, ms); + } + } + + // called multiple times + function multiple(err) { + if (emitted) { return; } + emitted = true; + self.emit('error', err || new Error('done() called multiple times')); + } + + // finished + function done(err) { + if (self.timedOut) { return; } + if (finished) { return multiple(err); } + self.clearTimeout(); + self.duration = new Date() - start; + finished = true; + fn(err); + } + + // for .resetTimeout() + this.callback = done; + + // async + if (this.async) { + try { + this.fn.call(ctx, function (err) { + if (err instanceof Error || toString.call(err) === '[object Error]') { return done(err); } + if (err != null) { return done(new Error('done() invoked with non-Error: ' + err)); } + done(); + }); + } catch (err) { + done(err); + } + return; + } + + if (this.asyncOnly) { + return done(new Error('--async-only option in use without declaring `done()`')); + } + + // sync + try { + if (!this.pending) { this.fn.call(ctx); } + this.duration = new Date() - start; + fn(); + } catch (err) { + fn(err); + } + }; + + }); // module: runnable.js + + require.register('runner.js', function (module, exports, require) { + /** * Module dependencies. */ -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('mocha:runner') - , Test = require('./test') - , utils = require('./utils') - , filter = utils.filter - , keys = utils.keys; + var EventEmitter = require('browser/events').EventEmitter, + debug = require('browser/debug')('mocha:runner'), + Test = require('./test'), + utils = require('./utils'), + filter = utils.filter, + keys = utils.keys; -/** + /** * Non-enumerable globals. */ -var globals = [ - 'setTimeout', - 'clearTimeout', - 'setInterval', - 'clearInterval', - 'XMLHttpRequest', - 'Date' -]; + var globals = [ + 'setTimeout', + 'clearTimeout', + 'setInterval', + 'clearInterval', + 'XMLHttpRequest', + 'Date' + ]; -/** + /** * Expose `Runner`. */ -module.exports = Runner; + module.exports = Runner; -/** + /** * Initialize a `Runner` for the given `suite`. * * Events: @@ -4438,39 +4432,38 @@ module.exports = Runner; * @api public */ -function Runner(suite) { - var self = this; - this._globals = []; - this._abort = false; - this.suite = suite; - this.total = suite.total(); - this.failures = 0; - this.on('test end', function(test){ self.checkGlobals(test); }); - this.on('hook end', function(hook){ self.checkGlobals(hook); }); - this.grep(/.*/); - this.globals(this.globalProps().concat(extraGlobals())); -} - -/** + function Runner(suite) { + var self = this; + this._globals = []; + this._abort = false; + this.suite = suite; + this.total = suite.total(); + this.failures = 0; + this.on('test end', function (test) { self.checkGlobals(test); }); + this.on('hook end', function (hook) { self.checkGlobals(hook); }); + this.grep(/.*/); + this.globals(this.globalProps().concat(extraGlobals())); + } + + /** * Wrapper for setImmediate, process.nextTick, or browser polyfill. * * @param {Function} fn * @api private */ -Runner.immediately = global.setImmediate || process.nextTick; + Runner.immediately = global.setImmediate || process.nextTick; -/** + /** * Inherit from `EventEmitter.prototype`. */ -function F(){}; -F.prototype = EventEmitter.prototype; -Runner.prototype = new F; -Runner.prototype.constructor = Runner; - + function F() {} + F.prototype = EventEmitter.prototype; + Runner.prototype = new F(); + Runner.prototype.constructor = Runner; -/** + /** * Run tests with full titles matching `re`. Updates runner.total * with number of tests matched. * @@ -4480,15 +4473,15 @@ Runner.prototype.constructor = Runner; * @api public */ -Runner.prototype.grep = function(re, invert){ - debug('grep %s', re); - this._grep = re; - this._invert = invert; - this.total = this.grepTotal(this.suite); - return this; -}; + Runner.prototype.grep = function (re, invert) { + debug('grep %s', re); + this._grep = re; + this._invert = invert; + this.total = this.grepTotal(this.suite); + return this; + }; -/** + /** * Returns the number of tests matching the grep search for the * given suite. * @@ -4497,39 +4490,39 @@ Runner.prototype.grep = function(re, invert){ * @api public */ -Runner.prototype.grepTotal = function(suite) { - var self = this; - var total = 0; + Runner.prototype.grepTotal = function (suite) { + var self = this; + var total = 0; - suite.eachTest(function(test){ - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (match) total++; - }); + suite.eachTest(function (test) { + var match = self._grep.test(test.fullTitle()); + if (self._invert) { match = !match; } + if (match) { total++; } + }); - return total; -}; + return total; + }; -/** + /** * Return a list of global properties. * * @return {Array} * @api private */ -Runner.prototype.globalProps = function() { - var props = utils.keys(global); + Runner.prototype.globalProps = function () { + var props = utils.keys(global); - // non-enumerables - for (var i = 0; i < globals.length; ++i) { - if (~utils.indexOf(props, globals[i])) continue; - props.push(globals[i]); - } + // non-enumerables + for (var i = 0; i < globals.length; ++i) { + if (~utils.indexOf(props, globals[i])) { continue; } + props.push(globals[i]); + } - return props; -}; + return props; + }; -/** + /** * Allow the given `arr` of globals. * * @param {Array} arr @@ -4537,45 +4530,45 @@ Runner.prototype.globalProps = function() { * @api public */ -Runner.prototype.globals = function(arr){ - if (0 == arguments.length) return this._globals; - debug('globals %j', arr); - this._globals = this._globals.concat(arr); - return this; -}; + Runner.prototype.globals = function (arr) { + if (arguments.length == 0) { return this._globals; } + debug('globals %j', arr); + this._globals = this._globals.concat(arr); + return this; + }; -/** + /** * Check for global variable leaks. * * @api private */ -Runner.prototype.checkGlobals = function(test){ - if (this.ignoreLeaks) return; - var ok = this._globals; + Runner.prototype.checkGlobals = function (test) { + if (this.ignoreLeaks) { return; } + var ok = this._globals; - var globals = this.globalProps(); - var isNode = process.kill; - var leaks; + var globals = this.globalProps(); + var isNode = process.kill; + var leaks; - if (test) { - ok = ok.concat(test._allowedGlobals || []); - } + if (test) { + ok = ok.concat(test._allowedGlobals || []); + } - if(this.prevGlobalsLength == globals.length) return; - this.prevGlobalsLength = globals.length; + if (this.prevGlobalsLength == globals.length) { return; } + this.prevGlobalsLength = globals.length; - leaks = filterLeaks(ok, globals); - this._globals = this._globals.concat(leaks); + leaks = filterLeaks(ok, globals); + this._globals = this._globals.concat(leaks); - if (leaks.length > 1) { - this.fail(test, new Error('global leaks detected: ' + leaks.join(', ') + '')); - } else if (leaks.length) { - this.fail(test, new Error('global leak detected: ' + leaks[0])); - } -}; + if (leaks.length > 1) { + this.fail(test, new Error('global leaks detected: ' + leaks.join(', ') + '')); + } else if (leaks.length) { + this.fail(test, new Error('global leak detected: ' + leaks[0])); + } + }; -/** + /** * Fail the given `test`. * * @param {Test} test @@ -4583,18 +4576,18 @@ Runner.prototype.checkGlobals = function(test){ * @api private */ -Runner.prototype.fail = function(test, err){ - ++this.failures; - test.state = 'failed'; + Runner.prototype.fail = function (test, err) { + ++this.failures; + test.state = 'failed'; - if ('string' == typeof err) { - err = new Error('the string "' + err + '" was thrown, throw an Error :)'); - } + if (typeof err === 'string') { + err = new Error('the string "' + err + '" was thrown, throw an Error :)'); + } - this.emit('fail', test, err); -}; + this.emit('fail', test, err); + }; -/** + /** * Fail the given `hook` with `err`. * * Hook failures work in the following pattern: @@ -4615,14 +4608,14 @@ Runner.prototype.fail = function(test, err){ * @api private */ -Runner.prototype.failHook = function(hook, err){ - this.fail(hook, err); - if (this.suite.bail()) { - this.emit('end'); - } -}; + Runner.prototype.failHook = function (hook, err) { + this.fail(hook, err); + if (this.suite.bail()) { + this.emit('end'); + } + }; -/** + /** * Run hook `name` callbacks and then invoke `fn()`. * * @param {String} name @@ -4630,48 +4623,48 @@ Runner.prototype.failHook = function(hook, err){ * @api private */ -Runner.prototype.hook = function(name, fn){ - var suite = this.suite - , hooks = suite['_' + name] - , self = this - , timer; - - function next(i) { - var hook = hooks[i]; - if (!hook) return fn(); - if (self.failures && suite.bail()) return fn(); - self.currentRunnable = hook; - - hook.ctx.currentTest = self.test; - - self.emit('hook', hook); - - hook.on('error', function(err){ - self.failHook(hook, err); - }); - - hook.run(function(err){ - hook.removeAllListeners('error'); - var testError = hook.error(); - if (testError) self.fail(self.test, testError); - if (err) { - self.failHook(hook, err); - - // stop executing hooks, notify callee of hook err - return fn(err); - } - self.emit('hook end', hook); - delete hook.ctx.currentTest; - next(++i); - }); - } - - Runner.immediately(function(){ - next(0); - }); -}; - -/** + Runner.prototype.hook = function (name, fn) { + var suite = this.suite, + hooks = suite['_' + name], + self = this, + timer; + + function next(i) { + var hook = hooks[i]; + if (!hook) { return fn(); } + if (self.failures && suite.bail()) { return fn(); } + self.currentRunnable = hook; + + hook.ctx.currentTest = self.test; + + self.emit('hook', hook); + + hook.on('error', function (err) { + self.failHook(hook, err); + }); + + hook.run(function (err) { + hook.removeAllListeners('error'); + var testError = hook.error(); + if (testError) { self.fail(self.test, testError); } + if (err) { + self.failHook(hook, err); + + // stop executing hooks, notify callee of hook err + return fn(err); + } + self.emit('hook end', hook); + delete hook.ctx.currentTest; + next(++i); + }); + } + + Runner.immediately(function () { + next(0); + }); + }; + + /** * Run hook `name` for the given array of `suites` * in order, and callback `fn(err, errSuite)`. * @@ -4681,33 +4674,33 @@ Runner.prototype.hook = function(name, fn){ * @api private */ -Runner.prototype.hooks = function(name, suites, fn){ - var self = this - , orig = this.suite; + Runner.prototype.hooks = function (name, suites, fn) { + var self = this, + orig = this.suite; - function next(suite) { - self.suite = suite; + function next(suite) { + self.suite = suite; - if (!suite) { - self.suite = orig; - return fn(); - } + if (!suite) { + self.suite = orig; + return fn(); + } - self.hook(name, function(err){ - if (err) { - var errSuite = self.suite; - self.suite = orig; - return fn(err, errSuite); - } + self.hook(name, function (err) { + if (err) { + var errSuite = self.suite; + self.suite = orig; + return fn(err, errSuite); + } - next(suites.pop()); - }); - } + next(suites.pop()); + }); + } - next(suites.pop()); -}; + next(suites.pop()); + }; -/** + /** * Run hooks from the top level down. * * @param {String} name @@ -4715,12 +4708,12 @@ Runner.prototype.hooks = function(name, suites, fn){ * @api private */ -Runner.prototype.hookUp = function(name, fn){ - var suites = [this.suite].concat(this.parents()).reverse(); - this.hooks(name, suites, fn); -}; + Runner.prototype.hookUp = function (name, fn) { + var suites = [ this.suite ].concat(this.parents()).reverse(); + this.hooks(name, suites, fn); + }; -/** + /** * Run hooks from the bottom up. * * @param {String} name @@ -4728,12 +4721,12 @@ Runner.prototype.hookUp = function(name, fn){ * @api private */ -Runner.prototype.hookDown = function(name, fn){ - var suites = [this.suite].concat(this.parents()); - this.hooks(name, suites, fn); -}; + Runner.prototype.hookDown = function (name, fn) { + var suites = [ this.suite ].concat(this.parents()); + this.hooks(name, suites, fn); + }; -/** + /** * Return an array of parent Suites from * closest to furthest. * @@ -4741,37 +4734,37 @@ Runner.prototype.hookDown = function(name, fn){ * @api private */ -Runner.prototype.parents = function(){ - var suite = this.suite - , suites = []; - while (suite = suite.parent) suites.push(suite); - return suites; -}; + Runner.prototype.parents = function () { + var suite = this.suite, + suites = []; + while (suite = suite.parent) { suites.push(suite); } + return suites; + }; -/** + /** * Run the current test and callback `fn(err)`. * * @param {Function} fn * @api private */ -Runner.prototype.runTest = function(fn){ - var test = this.test - , self = this; + Runner.prototype.runTest = function (fn) { + var test = this.test, + self = this; - if (this.asyncOnly) test.asyncOnly = true; + if (this.asyncOnly) { test.asyncOnly = true; } - try { - test.on('error', function(err){ - self.fail(test, err); - }); - test.run(fn); - } catch (err) { - fn(err); - } -}; + try { + test.on('error', function (err) { + self.fail(test, err); + }); + test.run(fn); + } catch (err) { + fn(err); + } + }; -/** + /** * Run tests in the given `suite` and invoke * the callback `fn()` when complete. * @@ -4780,91 +4773,90 @@ Runner.prototype.runTest = function(fn){ * @api private */ -Runner.prototype.runTests = function(suite, fn){ - var self = this - , tests = suite.tests.slice() - , test; - - - function hookErr(err, errSuite, after) { - // before/after Each hook for errSuite failed: - var orig = self.suite; - - // for failed 'after each' hook start from errSuite parent, - // otherwise start from errSuite itself - self.suite = after ? errSuite.parent : errSuite; - - if (self.suite) { - // call hookUp afterEach - self.hookUp('afterEach', function(err2, errSuite2) { - self.suite = orig; - // some hooks may fail even now - if (err2) return hookErr(err2, errSuite2, true); - // report error suite - fn(errSuite); - }); - } else { - // there is no need calling other 'after each' hooks - self.suite = orig; - fn(errSuite); - } - } - - function next(err, errSuite) { - // if we bail after first err - if (self.failures && suite._bail) return fn(); - - if (self._abort) return fn(); - - if (err) return hookErr(err, errSuite, true); - - // next test - test = tests.shift(); - - // all done - if (!test) return fn(); - - // grep - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (!match) return next(); - - // pending - if (test.pending) { - self.emit('pending', test); - self.emit('test end', test); - return next(); - } - - // execute test and hook(s) - self.emit('test', self.test = test); - self.hookDown('beforeEach', function(err, errSuite){ - - if (err) return hookErr(err, errSuite, false); - - self.currentRunnable = self.test; - self.runTest(function(err){ - test = self.test; - - if (err) { - self.fail(test, err); - self.emit('test end', test); - return self.hookUp('afterEach', next); - } - - test.state = 'passed'; - self.emit('pass', test); - self.emit('test end', test); - self.hookUp('afterEach', next); - }); - }); - } - - this.next = next; - next(); -}; - -/** + Runner.prototype.runTests = function (suite, fn) { + var self = this, + tests = suite.tests.slice(), + test; + + function hookErr(err, errSuite, after) { + // before/after Each hook for errSuite failed: + var orig = self.suite; + + // for failed 'after each' hook start from errSuite parent, + // otherwise start from errSuite itself + self.suite = after ? errSuite.parent : errSuite; + + if (self.suite) { + // call hookUp afterEach + self.hookUp('afterEach', function (err2, errSuite2) { + self.suite = orig; + // some hooks may fail even now + if (err2) { return hookErr(err2, errSuite2, true); } + // report error suite + fn(errSuite); + }); + } else { + // there is no need calling other 'after each' hooks + self.suite = orig; + fn(errSuite); + } + } + + function next(err, errSuite) { + // if we bail after first err + if (self.failures && suite._bail) { return fn(); } + + if (self._abort) { return fn(); } + + if (err) { return hookErr(err, errSuite, true); } + + // next test + test = tests.shift(); + + // all done + if (!test) { return fn(); } + + // grep + var match = self._grep.test(test.fullTitle()); + if (self._invert) { match = !match; } + if (!match) { return next(); } + + // pending + if (test.pending) { + self.emit('pending', test); + self.emit('test end', test); + return next(); + } + + // execute test and hook(s) + self.emit('test', self.test = test); + self.hookDown('beforeEach', function (err, errSuite) { + + if (err) { return hookErr(err, errSuite, false); } + + self.currentRunnable = self.test; + self.runTest(function (err) { + test = self.test; + + if (err) { + self.fail(test, err); + self.emit('test end', test); + return self.hookUp('afterEach', next); + } + + test.state = 'passed'; + self.emit('pass', test); + self.emit('test end', test); + self.hookUp('afterEach', next); + }); + }); + } + + this.next = next; + next(); + }; + + /** * Run the given `suite` and invoke the * callback `fn()` when complete. * @@ -4873,79 +4865,79 @@ Runner.prototype.runTests = function(suite, fn){ * @api private */ -Runner.prototype.runSuite = function(suite, fn){ - var total = this.grepTotal(suite) - , self = this - , i = 0; - - debug('run suite %s', suite.fullTitle()); - - if (!total) return fn(); - - this.emit('suite', this.suite = suite); - - function next(errSuite) { - if (errSuite) { - // current suite failed on a hook from errSuite - if (errSuite == suite) { - // if errSuite is current suite - // continue to the next sibling suite - return done(); - } else { - // errSuite is among the parents of current suite - // stop execution of errSuite and all sub-suites - return done(errSuite); - } - } - - if (self._abort) return done(); - - var curr = suite.suites[i++]; - if (!curr) return done(); - self.runSuite(curr, next); - } - - function done(errSuite) { - self.suite = suite; - self.hook('afterAll', function(){ - self.emit('suite end', suite); - fn(errSuite); - }); - } - - this.hook('beforeAll', function(err){ - if (err) return done(); - self.runTests(suite, next); - }); -}; - -/** + Runner.prototype.runSuite = function (suite, fn) { + var total = this.grepTotal(suite), + self = this, + i = 0; + + debug('run suite %s', suite.fullTitle()); + + if (!total) { return fn(); } + + this.emit('suite', this.suite = suite); + + function next(errSuite) { + if (errSuite) { + // current suite failed on a hook from errSuite + if (errSuite == suite) { + // if errSuite is current suite + // continue to the next sibling suite + return done(); + } else { + // errSuite is among the parents of current suite + // stop execution of errSuite and all sub-suites + return done(errSuite); + } + } + + if (self._abort) { return done(); } + + var curr = suite.suites[i++]; + if (!curr) { return done(); } + self.runSuite(curr, next); + } + + function done(errSuite) { + self.suite = suite; + self.hook('afterAll', function () { + self.emit('suite end', suite); + fn(errSuite); + }); + } + + this.hook('beforeAll', function (err) { + if (err) { return done(); } + self.runTests(suite, next); + }); + }; + + /** * Handle uncaught exceptions. * * @param {Error} err * @api private */ -Runner.prototype.uncaught = function(err){ - debug('uncaught exception %s', err.message); - var runnable = this.currentRunnable; - if (!runnable || 'failed' == runnable.state) return; - runnable.clearTimeout(); - err.uncaught = true; - this.fail(runnable, err); + Runner.prototype.uncaught = function (err) { + debug('uncaught exception %s', err.message); + var runnable = this.currentRunnable; + if (!runnable || runnable.state == 'failed') { return; } + runnable.clearTimeout(); + err.uncaught = true; + this.fail(runnable, err); - // recover from test - if ('test' == runnable.type) { - this.emit('test end', runnable); - this.hookUp('afterEach', this.next); - return; - } + // recover from test + if (runnable.type == 'test') { + this.emit('test end', runnable); + this.hookUp('afterEach', this.next); + return; + } - // bail on hooks - this.emit('end'); -}; + // bail on hooks + this.emit('end'); + }; -/** + /** * Run the root suite and invoke `fn(failures)` * on completion. * @@ -4954,48 +4946,48 @@ Runner.prototype.uncaught = function(err){ * @api public */ -Runner.prototype.run = function(fn){ - var self = this - , fn = fn || function(){}; + Runner.prototype.run = function (fn) { + var self = this, + fn = fn || function () {}; - function uncaught(err){ - self.uncaught(err); - } + function uncaught(err) { + self.uncaught(err); + } - debug('start'); + debug('start'); - // callback - this.on('end', function(){ - debug('end'); - process.removeListener('uncaughtException', uncaught); - fn(self.failures); - }); + // callback + this.on('end', function () { + debug('end'); + process.removeListener('uncaughtException', uncaught); + fn(self.failures); + }); - // run suites - this.emit('start'); - this.runSuite(this.suite, function(){ - debug('finished running'); - self.emit('end'); - }); + // run suites + this.emit('start'); + this.runSuite(this.suite, function () { + debug('finished running'); + self.emit('end'); + }); - // uncaught exception - process.on('uncaughtException', uncaught); + // uncaught exception + process.on('uncaughtException', uncaught); - return this; -}; + return this; + }; -/** + /** * Cleanly abort execution * * @return {Runner} for chaining * @api public */ -Runner.prototype.abort = function(){ - debug('aborting'); - this._abort = true; -} + Runner.prototype.abort = function () { + debug('aborting'); + this._abort = true; + }; -/** + /** * Filter leaks with the given globals flagged as `ok`. * * @param {Array} ok @@ -5004,77 +4996,77 @@ Runner.prototype.abort = function(){ * @api private */ -function filterLeaks(ok, globals) { - return filter(globals, function(key){ - // Firefox and Chrome exposes iframes as index inside the window object - if (/^d+/.test(key)) return false; + function filterLeaks(ok, globals) { + return filter(globals, function (key) { + // Firefox and Chrome exposes iframes as index inside the window object + if (/^d+/.test(key)) { return false; } - // in firefox - // if runner runs in an iframe, this iframe's window.getInterface method not init at first - // it is assigned in some seconds - if (global.navigator && /^getInterface/.test(key)) return false; + // in firefox + // if runner runs in an iframe, this iframe's window.getInterface method not init at first + // it is assigned in some seconds + if (global.navigator && /^getInterface/.test(key)) { return false; } - // an iframe could be approached by window[iframeIndex] - // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak - if (global.navigator && /^\d+/.test(key)) return false; + // an iframe could be approached by window[iframeIndex] + // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak + if (global.navigator && /^\d+/.test(key)) { return false; } - // Opera and IE expose global variables for HTML element IDs (issue #243) - if (/^mocha-/.test(key)) return false; + // Opera and IE expose global variables for HTML element IDs (issue #243) + if (/^mocha-/.test(key)) { return false; } - var matched = filter(ok, function(ok){ - if (~ok.indexOf('*')) return 0 == key.indexOf(ok.split('*')[0]); - return key == ok; - }); - return matched.length == 0 && (!global.navigator || 'onerror' !== key); - }); -} + var matched = filter(ok, function (ok) { + if (~ok.indexOf('*')) { return key.indexOf(ok.split('*')[0]) == 0; } + return key == ok; + }); + return matched.length == 0 && (!global.navigator || key !== 'onerror'); + }); + } -/** + /** * Array of globals dependent on the environment. * * @return {Array} * @api private */ - function extraGlobals() { - if (typeof(process) === 'object' && - typeof(process.version) === 'string') { + function extraGlobals() { + if (typeof(process) === 'object' + && typeof(process.version) === 'string') { - var nodeVersion = process.version.split('.').reduce(function(a, v) { - return a << 8 | v; - }); + var nodeVersion = process.version.split('.').reduce(function (a, v) { + return a << 8 | v; + }); - // 'errno' was renamed to process._errno in v0.9.11. + // 'errno' was renamed to process._errno in v0.9.11. - if (nodeVersion < 0x00090B) { - return ['errno']; - } - } + if (nodeVersion < 0x00090B) { + return [ 'errno' ]; + } + } - return []; - } + return []; + } -}); // module: runner.js + }); // module: runner.js -require.register("suite.js", function(module, exports, require){ + require.register('suite.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('mocha:suite') - , milliseconds = require('./ms') - , utils = require('./utils') - , Hook = require('./hook'); + var EventEmitter = require('browser/events').EventEmitter, + debug = require('browser/debug')('mocha:suite'), + milliseconds = require('./ms'), + utils = require('./utils'), + Hook = require('./hook'); -/** + /** * Expose `Suite`. */ -exports = module.exports = Suite; + exports = module.exports = Suite; -/** + /** * Create a new `Suite` with the given `title` * and parent `Suite`. When a suite with the * same title is already present, that suite @@ -5087,16 +5079,16 @@ exports = module.exports = Suite; * @api public */ -exports.create = function(parent, title){ - var suite = new Suite(title, parent.ctx); - suite.parent = parent; - if (parent.pending) suite.pending = true; - title = suite.fullTitle(); - parent.addSuite(suite); - return suite; -}; + exports.create = function (parent, title) { + var suite = new Suite(title, parent.ctx); + suite.parent = parent; + if (parent.pending) { suite.pending = true; } + title = suite.fullTitle(); + parent.addSuite(suite); + return suite; + }; -/** + /** * Initialize a new `Suite` with the given * `title` and `ctx`. * @@ -5105,50 +5097,49 @@ exports.create = function(parent, title){ * @api private */ -function Suite(title, ctx) { - this.title = title; - this.ctx = ctx; - this.suites = []; - this.tests = []; - this.pending = false; - this._beforeEach = []; - this._beforeAll = []; - this._afterEach = []; - this._afterAll = []; - this.root = !title; - this._timeout = 2000; - this._slow = 75; - this._bail = false; -} - -/** + function Suite(title, ctx) { + this.title = title; + this.ctx = ctx; + this.suites = []; + this.tests = []; + this.pending = false; + this._beforeEach = []; + this._beforeAll = []; + this._afterEach = []; + this._afterAll = []; + this.root = !title; + this._timeout = 2000; + this._slow = 75; + this._bail = false; + } + + /** * Inherit from `EventEmitter.prototype`. */ -function F(){}; -F.prototype = EventEmitter.prototype; -Suite.prototype = new F; -Suite.prototype.constructor = Suite; - + function F() {} + F.prototype = EventEmitter.prototype; + Suite.prototype = new F(); + Suite.prototype.constructor = Suite; -/** + /** * Return a clone of this `Suite`. * * @return {Suite} * @api private */ -Suite.prototype.clone = function(){ - var suite = new Suite(this.title); - debug('clone'); - suite.ctx = this.ctx; - suite.timeout(this.timeout()); - suite.slow(this.slow()); - suite.bail(this.bail()); - return suite; -}; + Suite.prototype.clone = function () { + var suite = new Suite(this.title); + debug('clone'); + suite.ctx = this.ctx; + suite.timeout(this.timeout()); + suite.slow(this.slow()); + suite.bail(this.bail()); + return suite; + }; -/** + /** * Set timeout `ms` or short-hand such as "2s". * * @param {Number|String} ms @@ -5156,15 +5147,15 @@ Suite.prototype.clone = function(){ * @api private */ -Suite.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = parseInt(ms, 10); - return this; -}; + Suite.prototype.timeout = function (ms) { + if (arguments.length == 0) { return this._timeout; } + if (typeof ms === 'string') { ms = milliseconds(ms); } + debug('timeout %d', ms); + this._timeout = parseInt(ms, 10); + return this; + }; -/** + /** * Set slow `ms` or short-hand such as "2s". * * @param {Number|String} ms @@ -5172,15 +5163,15 @@ Suite.prototype.timeout = function(ms){ * @api private */ -Suite.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('slow %d', ms); - this._slow = ms; - return this; -}; + Suite.prototype.slow = function (ms) { + if (arguments.length === 0) { return this._slow; } + if (typeof ms === 'string') { ms = milliseconds(ms); } + debug('slow %d', ms); + this._slow = ms; + return this; + }; -/** + /** * Sets whether to bail after first error. * * @parma {Boolean} bail @@ -5188,14 +5179,14 @@ Suite.prototype.slow = function(ms){ * @api private */ -Suite.prototype.bail = function(bail){ - if (0 == arguments.length) return this._bail; - debug('bail %s', bail); - this._bail = bail; - return this; -}; + Suite.prototype.bail = function (bail) { + if (arguments.length == 0) { return this._bail; } + debug('bail %s', bail); + this._bail = bail; + return this; + }; -/** + /** * Run `fn(test[, done])` before running tests. * * @param {Function} fn @@ -5203,19 +5194,19 @@ Suite.prototype.bail = function(bail){ * @api private */ -Suite.prototype.beforeAll = function(fn){ - if (this.pending) return this; - var hook = new Hook('"before all" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeAll.push(hook); - this.emit('beforeAll', hook); - return this; -}; + Suite.prototype.beforeAll = function (fn) { + if (this.pending) { return this; } + var hook = new Hook('"before all" hook', fn); + hook.parent = this; + hook.timeout(this.timeout()); + hook.slow(this.slow()); + hook.ctx = this.ctx; + this._beforeAll.push(hook); + this.emit('beforeAll', hook); + return this; + }; -/** + /** * Run `fn(test[, done])` after running tests. * * @param {Function} fn @@ -5223,19 +5214,19 @@ Suite.prototype.beforeAll = function(fn){ * @api private */ -Suite.prototype.afterAll = function(fn){ - if (this.pending) return this; - var hook = new Hook('"after all" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterAll.push(hook); - this.emit('afterAll', hook); - return this; -}; + Suite.prototype.afterAll = function (fn) { + if (this.pending) { return this; } + var hook = new Hook('"after all" hook', fn); + hook.parent = this; + hook.timeout(this.timeout()); + hook.slow(this.slow()); + hook.ctx = this.ctx; + this._afterAll.push(hook); + this.emit('afterAll', hook); + return this; + }; -/** + /** * Run `fn(test[, done])` before each test case. * * @param {Function} fn @@ -5243,19 +5234,19 @@ Suite.prototype.afterAll = function(fn){ * @api private */ -Suite.prototype.beforeEach = function(fn){ - if (this.pending) return this; - var hook = new Hook('"before each" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeEach.push(hook); - this.emit('beforeEach', hook); - return this; -}; + Suite.prototype.beforeEach = function (fn) { + if (this.pending) { return this; } + var hook = new Hook('"before each" hook', fn); + hook.parent = this; + hook.timeout(this.timeout()); + hook.slow(this.slow()); + hook.ctx = this.ctx; + this._beforeEach.push(hook); + this.emit('beforeEach', hook); + return this; + }; -/** + /** * Run `fn(test[, done])` after each test case. * * @param {Function} fn @@ -5263,19 +5254,19 @@ Suite.prototype.beforeEach = function(fn){ * @api private */ -Suite.prototype.afterEach = function(fn){ - if (this.pending) return this; - var hook = new Hook('"after each" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterEach.push(hook); - this.emit('afterEach', hook); - return this; -}; + Suite.prototype.afterEach = function (fn) { + if (this.pending) { return this; } + var hook = new Hook('"after each" hook', fn); + hook.parent = this; + hook.timeout(this.timeout()); + hook.slow(this.slow()); + hook.ctx = this.ctx; + this._afterEach.push(hook); + this.emit('afterEach', hook); + return this; + }; -/** + /** * Add a test `suite`. * * @param {Suite} suite @@ -5283,17 +5274,17 @@ Suite.prototype.afterEach = function(fn){ * @api private */ -Suite.prototype.addSuite = function(suite){ - suite.parent = this; - suite.timeout(this.timeout()); - suite.slow(this.slow()); - suite.bail(this.bail()); - this.suites.push(suite); - this.emit('suite', suite); - return this; -}; + Suite.prototype.addSuite = function (suite) { + suite.parent = this; + suite.timeout(this.timeout()); + suite.slow(this.slow()); + suite.bail(this.bail()); + this.suites.push(suite); + this.emit('suite', suite); + return this; + }; -/** + /** * Add a `test` to this suite. * * @param {Test} test @@ -5301,17 +5292,17 @@ Suite.prototype.addSuite = function(suite){ * @api private */ -Suite.prototype.addTest = function(test){ - test.parent = this; - test.timeout(this.timeout()); - test.slow(this.slow()); - test.ctx = this.ctx; - this.tests.push(test); - this.emit('test', test); - return this; -}; + Suite.prototype.addTest = function (test) { + test.parent = this; + test.timeout(this.timeout()); + test.slow(this.slow()); + test.ctx = this.ctx; + this.tests.push(test); + this.emit('test', test); + return this; + }; -/** + /** * Return the full title generated by recursively * concatenating the parent's full title. * @@ -5319,28 +5310,28 @@ Suite.prototype.addTest = function(test){ * @api public */ -Suite.prototype.fullTitle = function(){ - if (this.parent) { - var full = this.parent.fullTitle(); - if (full) return full + ' ' + this.title; - } - return this.title; -}; + Suite.prototype.fullTitle = function () { + if (this.parent) { + var full = this.parent.fullTitle(); + if (full) { return full + ' ' + this.title; } + } + return this.title; + }; -/** + /** * Return the total number of tests. * * @return {Number} * @api public */ -Suite.prototype.total = function(){ - return utils.reduce(this.suites, function(sum, suite){ - return sum + suite.total(); - }, 0) + this.tests.length; -}; + Suite.prototype.total = function () { + return utils.reduce(this.suites, function (sum, suite) { + return sum + suite.total(); + }, 0) + this.tests.length; + }; -/** + /** * Iterates through each suite recursively to find * all tests. Applies a function in the format * `fn(test)`. @@ -5350,31 +5341,31 @@ Suite.prototype.total = function(){ * @api private */ -Suite.prototype.eachTest = function(fn){ - utils.forEach(this.tests, fn); - utils.forEach(this.suites, function(suite){ - suite.eachTest(fn); - }); - return this; -}; + Suite.prototype.eachTest = function (fn) { + utils.forEach(this.tests, fn); + utils.forEach(this.suites, function (suite) { + suite.eachTest(fn); + }); + return this; + }; -}); // module: suite.js + }); // module: suite.js -require.register("test.js", function(module, exports, require){ + require.register('test.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var Runnable = require('./runnable'); + var Runnable = require('./runnable'); -/** + /** * Expose `Test`. */ -module.exports = Test; + module.exports = Test; -/** + /** * Initialize a new `Test` with the given `title` and callback `fn`. * * @param {String} title @@ -5382,41 +5373,40 @@ module.exports = Test; * @api private */ -function Test(title, fn) { - Runnable.call(this, title, fn); - this.pending = !fn; - this.type = 'test'; -} + function Test(title, fn) { + Runnable.call(this, title, fn); + this.pending = !fn; + this.type = 'test'; + } -/** + /** * Inherit from `Runnable.prototype`. */ -function F(){}; -F.prototype = Runnable.prototype; -Test.prototype = new F; -Test.prototype.constructor = Test; + function F() {} + F.prototype = Runnable.prototype; + Test.prototype = new F(); + Test.prototype.constructor = Test; + }); // module: test.js -}); // module: test.js - -require.register("utils.js", function(module, exports, require){ -/** + require.register('utils.js', function (module, exports, require) { + /** * Module dependencies. */ -var fs = require('browser/fs') - , path = require('browser/path') - , join = path.join - , debug = require('browser/debug')('mocha:watch'); + var fs = require('browser/fs'), + path = require('browser/path'), + join = path.join, + debug = require('browser/debug')('mocha:watch'); -/** + /** * Ignored directories. */ -var ignore = ['node_modules', '.git']; + var ignore = [ 'node_modules', '.git' ]; -/** + /** * Escape special characters in the given string of html. * * @param {String} html @@ -5424,15 +5414,15 @@ var ignore = ['node_modules', '.git']; * @api private */ -exports.escape = function(html){ - return String(html) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(//g, '>'); -}; + exports.escape = function (html) { + return String(html) + .replace(/&/g, '&') + .replace(/"/g, '"') + .replace(//g, '>'); + }; -/** + /** * Array#forEach (<=IE8) * * @param {Array} array @@ -5441,12 +5431,11 @@ exports.escape = function(html){ * @api private */ -exports.forEach = function(arr, fn, scope){ - for (var i = 0, l = arr.length; i < l; i++) - fn.call(scope, arr[i], i); -}; + exports.forEach = function (arr, fn, scope) { + for (var i = 0, l = arr.length; i < l; i++) { fn.call(scope, arr[i], i); } + }; -/** + /** * Array#map (<=IE8) * * @param {Array} array @@ -5455,14 +5444,13 @@ exports.forEach = function(arr, fn, scope){ * @api private */ -exports.map = function(arr, fn, scope){ - var result = []; - for (var i = 0, l = arr.length; i < l; i++) - result.push(fn.call(scope, arr[i], i)); - return result; -}; + exports.map = function (arr, fn, scope) { + var result = []; + for (var i = 0, l = arr.length; i < l; i++) { result.push(fn.call(scope, arr[i], i)); } + return result; + }; -/** + /** * Array#indexOf (<=IE8) * * @parma {Array} arr @@ -5471,15 +5459,14 @@ exports.map = function(arr, fn, scope){ * @api private */ -exports.indexOf = function(arr, obj, start){ - for (var i = start || 0, l = arr.length; i < l; i++) { - if (arr[i] === obj) - return i; - } - return -1; -}; + exports.indexOf = function (arr, obj, start) { + for (var i = start || 0, l = arr.length; i < l; i++) { + if (arr[i] === obj) { return i; } + } + return -1; + }; -/** + /** * Array#reduce (<=IE8) * * @param {Array} array @@ -5488,17 +5475,17 @@ exports.indexOf = function(arr, obj, start){ * @api private */ -exports.reduce = function(arr, fn, val){ - var rval = val; + exports.reduce = function (arr, fn, val) { + var rval = val; - for (var i = 0, l = arr.length; i < l; i++) { - rval = fn(rval, arr[i], i, arr); - } + for (var i = 0, l = arr.length; i < l; i++) { + rval = fn(rval, arr[i], i, arr); + } - return rval; -}; + return rval; + }; -/** + /** * Array#filter (<=IE8) * * @param {Array} array @@ -5506,18 +5493,18 @@ exports.reduce = function(arr, fn, val){ * @api private */ -exports.filter = function(arr, fn){ - var ret = []; + exports.filter = function (arr, fn) { + var ret = []; - for (var i = 0, l = arr.length; i < l; i++) { - var val = arr[i]; - if (fn(val, i, arr)) ret.push(val); - } + for (var i = 0, l = arr.length; i < l; i++) { + var val = arr[i]; + if (fn(val, i, arr)) { ret.push(val); } + } - return ret; -}; + return ret; + }; -/** + /** * Object.keys (<=IE8) * * @param {Object} obj @@ -5525,20 +5512,20 @@ exports.filter = function(arr, fn){ * @api private */ -exports.keys = Object.keys || function(obj) { - var keys = [] - , has = Object.prototype.hasOwnProperty // for `window` on <=IE8 + exports.keys = Object.keys || function (obj) { + var keys = [], + has = Object.prototype.hasOwnProperty; // for `window` on <=IE8 - for (var key in obj) { - if (has.call(obj, key)) { - keys.push(key); - } - } + for (var key in obj) { + if (has.call(obj, key)) { + keys.push(key); + } + } - return keys; -}; + return keys; + }; -/** + /** * Watch the given `files` for changes * and invoke `fn(file)` on modification. * @@ -5547,49 +5534,49 @@ exports.keys = Object.keys || function(obj) { * @api private */ -exports.watch = function(files, fn){ - var options = { interval: 100 }; - files.forEach(function(file){ - debug('file %s', file); - fs.watchFile(file, options, function(curr, prev){ - if (prev.mtime < curr.mtime) fn(file); - }); - }); -}; + exports.watch = function (files, fn) { + var options = { interval: 100 }; + files.forEach(function (file) { + debug('file %s', file); + fs.watchFile(file, options, function (curr, prev) { + if (prev.mtime < curr.mtime) { fn(file); } + }); + }); + }; -/** + /** * Ignored files. */ -function ignored(path){ - return !~ignore.indexOf(path); -} + function ignored(path) { + return !~ignore.indexOf(path); + } -/** + /** * Lookup files in the given `dir`. * * @return {Array} * @api private */ -exports.files = function(dir, ret){ - ret = ret || []; + exports.files = function (dir, ret) { + ret = ret || []; - fs.readdirSync(dir) - .filter(ignored) - .forEach(function(path){ - path = join(dir, path); - if (fs.statSync(path).isDirectory()) { - exports.files(path, ret); - } else if (path.match(/\.(js|coffee|litcoffee|coffee.md)$/)) { - ret.push(path); - } - }); + fs.readdirSync(dir) + .filter(ignored) + .forEach(function (path) { + path = join(dir, path); + if (fs.statSync(path).isDirectory()) { + exports.files(path, ret); + } else if (path.match(/\.(js|coffee|litcoffee|coffee.md)$/)) { + ret.push(path); + } + }); - return ret; -}; + return ret; + }; -/** + /** * Compute a slug from the given `str`. * * @param {String} str @@ -5597,34 +5584,34 @@ exports.files = function(dir, ret){ * @api private */ -exports.slug = function(str){ - return str - .toLowerCase() - .replace(/ +/g, '-') - .replace(/[^-\w]/g, ''); -}; + exports.slug = function (str) { + return str + .toLowerCase() + .replace(/ +/g, '-') + .replace(/[^-\w]/g, ''); + }; -/** + /** * Strip the function definition from `str`, * and re-indent for pre whitespace. */ -exports.clean = function(str) { - str = str - .replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/^\uFEFF/, '') - .replace(/^function *\(.*\) *{/, '') - .replace(/\s+\}$/, ''); + exports.clean = function (str) { + str = str + .replace(/\r\n?|[\n\u2028\u2029]/g, '\n').replace(/^\uFEFF/, '') + .replace(/^function *\(.*\) *{/, '') + .replace(/\s+\}$/, ''); - var spaces = str.match(/^\n?( *)/)[1].length - , tabs = str.match(/^\n?(\t*)/)[1].length - , re = new RegExp('^\n?' + (tabs ? '\t' : ' ') + '{' + (tabs ? tabs : spaces) + '}', 'gm'); + var spaces = str.match(/^\n?( *)/)[1].length, + tabs = str.match(/^\n?(\t*)/)[1].length, + re = new RegExp('^\n?' + (tabs ? '\t' : ' ') + '{' + (tabs ? tabs : spaces) + '}', 'gm'); - str = str.replace(re, ''); + str = str.replace(re, ''); - return exports.trim(str); -}; + return exports.trim(str); + }; -/** + /** * Escape regular expression characters in `str`. * * @param {String} str @@ -5632,11 +5619,11 @@ exports.clean = function(str) { * @api private */ -exports.escapeRegexp = function(str){ - return str.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&"); -}; + exports.escapeRegexp = function (str) { + return str.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&'); + }; -/** + /** * Trim the given `str`. * * @param {String} str @@ -5644,11 +5631,11 @@ exports.escapeRegexp = function(str){ * @api private */ -exports.trim = function(str){ - return str.replace(/^\s+|\s+$/g, ''); -}; + exports.trim = function (str) { + return str.replace(/^\s+|\s+$/g, ''); + }; -/** + /** * Parse the given `qs`. * * @param {String} qs @@ -5656,18 +5643,18 @@ exports.trim = function(str){ * @api private */ -exports.parseQuery = function(qs){ - return exports.reduce(qs.replace('?', '').split('&'), function(obj, pair){ - var i = pair.indexOf('=') - , key = pair.slice(0, i) - , val = pair.slice(++i); + exports.parseQuery = function (qs) { + return exports.reduce(qs.replace('?', '').split('&'), function (obj, pair) { + var i = pair.indexOf('='), + key = pair.slice(0, i), + val = pair.slice(++i); - obj[key] = decodeURIComponent(val); - return obj; - }, {}); -}; + obj[key] = decodeURIComponent(val); + return obj; + }, {}); + }; -/** + /** * Highlight the given string of `js`. * * @param {String} js @@ -5675,47 +5662,47 @@ exports.parseQuery = function(qs){ * @api private */ -function highlight(js) { - return js - .replace(//g, '>') - .replace(/\/\/(.*)/gm, '//$1') - .replace(/('.*?')/gm, '$1') - .replace(/(\d+\.\d+)/gm, '$1') - .replace(/(\d+)/gm, '$1') - .replace(/\bnew *(\w+)/gm, 'new $1') - .replace(/\b(function|new|throw|return|var|if|else)\b/gm, '$1') -} + function highlight(js) { + return js + .replace(//g, '>') + .replace(/\/\/(.*)/gm, '//$1') + .replace(/('.*?')/gm, '$1') + .replace(/(\d+\.\d+)/gm, '$1') + .replace(/(\d+)/gm, '$1') + .replace(/\bnew *(\w+)/gm, 'new $1') + .replace(/\b(function|new|throw|return|var|if|else)\b/gm, '$1'); + } -/** + /** * Highlight the contents of tag `name`. * * @param {String} name * @api private */ -exports.highlightTags = function(name) { - var code = document.getElementsByTagName(name); - for (var i = 0, len = code.length; i < len; ++i) { - code[i].innerHTML = highlight(code[i].innerHTML); - } -}; + exports.highlightTags = function (name) { + var code = document.getElementsByTagName(name); + for (var i = 0, len = code.length; i < len; ++i) { + code[i].innerHTML = highlight(code[i].innerHTML); + } + }; -}); // module: utils.js -// The global object is "self" in Web Workers. -global = (function() { return this; })(); + }); // module: utils.js + // The global object is "self" in Web Workers. + global = (function () { return this; }()); -/** + /** * Save timer references to avoid Sinon interfering (see GH-237). */ -var Date = global.Date; -var setTimeout = global.setTimeout; -var setInterval = global.setInterval; -var clearTimeout = global.clearTimeout; -var clearInterval = global.clearInterval; + var Date = global.Date; + var setTimeout = global.setTimeout; + var setInterval = global.setInterval; + var clearTimeout = global.clearTimeout; + var clearInterval = global.clearInterval; -/** + /** * Node shims. * * These are meant only to allow @@ -5724,192 +5711,192 @@ var clearInterval = global.clearInterval; * the browser. */ -var process = {}; -process.exit = function(status){}; -process.stdout = {}; + var process = {}; + process.exit = function (status) {}; + process.stdout = {}; -var uncaughtExceptionHandlers = []; + var uncaughtExceptionHandlers = []; -/** + /** * Remove uncaughtException listener. */ -process.removeListener = function(e, fn){ - if ('uncaughtException' == e) { - global.onerror = function() {}; - var i = Mocha.utils.indexOf(uncaughtExceptionHandlers, fn); - if (i != -1) { uncaughtExceptionHandlers.splice(i, 1); } - } -}; + process.removeListener = function (e, fn) { + if (e == 'uncaughtException') { + global.onerror = function () {}; + var i = Mocha.utils.indexOf(uncaughtExceptionHandlers, fn); + if (i != -1) { uncaughtExceptionHandlers.splice(i, 1); } + } + }; -/** + /** * Implements uncaughtException listener. */ -process.on = function(e, fn){ - if ('uncaughtException' == e) { - global.onerror = function(err, url, line){ - fn(new Error(err + ' (' + url + ':' + line + ')')); - return true; - }; - uncaughtExceptionHandlers.push(fn); - } -}; + process.on = function (e, fn) { + if (e == 'uncaughtException') { + global.onerror = function (err, url, line) { + fn(new Error(err + ' (' + url + ':' + line + ')')); + return true; + }; + uncaughtExceptionHandlers.push(fn); + } + }; -/** + /** * Expose mocha. */ -var Mocha = global.Mocha = require('mocha'), - mocha = global.mocha = new Mocha({ reporter: 'html' }); + var Mocha = global.Mocha = require('mocha'), + mocha = global.mocha = new Mocha({ reporter: 'html' }); -// The BDD UI is registered by default, but no UI will be functional in the -// browser without an explicit call to the overridden `mocha.ui` (see below). -// Ensure that this default UI does not expose its methods to the global scope. -mocha.suite.removeAllListeners('pre-require'); + // The BDD UI is registered by default, but no UI will be functional in the + // browser without an explicit call to the overridden `mocha.ui` (see below). + // Ensure that this default UI does not expose its methods to the global scope. + mocha.suite.removeAllListeners('pre-require'); -var immediateQueue = [] - , immediateTimeout; + var immediateQueue = [], + immediateTimeout; -function timeslice() { - var immediateStart = new Date().getTime(); - while (immediateQueue.length && (new Date().getTime() - immediateStart) < 100) { - immediateQueue.shift()(); - } - if (immediateQueue.length) { - immediateTimeout = setTimeout(timeslice, 0); - } else { - immediateTimeout = null; - } -} + function timeslice() { + var immediateStart = new Date().getTime(); + while (immediateQueue.length && (new Date().getTime() - immediateStart) < 100) { + immediateQueue.shift()(); + } + if (immediateQueue.length) { + immediateTimeout = setTimeout(timeslice, 0); + } else { + immediateTimeout = null; + } + } -/** + /** * High-performance override of Runner.immediately. */ -Mocha.Runner.immediately = function(callback) { - immediateQueue.push(callback); - if (!immediateTimeout) { - immediateTimeout = setTimeout(timeslice, 0); - } -}; + Mocha.Runner.immediately = function (callback) { + immediateQueue.push(callback); + if (!immediateTimeout) { + immediateTimeout = setTimeout(timeslice, 0); + } + }; -/** + /** * Function to allow assertion libraries to throw errors directly into mocha. * This is useful when running tests in a browser because window.onerror will * only receive the 'message' attribute of the Error. */ -mocha.throwError = function(err) { - Mocha.utils.forEach(uncaughtExceptionHandlers, function (fn) { - fn(err); - }); - throw err; -}; + mocha.throwError = function (err) { + Mocha.utils.forEach(uncaughtExceptionHandlers, function (fn) { + fn(err); + }); + throw err; + }; -/** + /** * Override ui to ensure that the ui functions are initialized. * Normally this would happen in Mocha.prototype.loadFiles. */ -mocha.ui = function(ui){ - Mocha.prototype.ui.call(this, ui); - this.suite.emit('pre-require', global, null, this); - return this; -}; + mocha.ui = function (ui) { + Mocha.prototype.ui.call(this, ui); + this.suite.emit('pre-require', global, null, this); + return this; + }; -/** + /** * Setup mocha with the given setting options. */ -mocha.setup = function(opts){ - if ('string' == typeof opts) opts = { ui: opts }; - for (var opt in opts) this[opt](opts[opt]); - return this; -}; + mocha.setup = function (opts) { + if (typeof opts === 'string') { opts = { ui: opts }; } + for (var opt in opts) { this[opt](opts[opt]); } + return this; + }; -/** + /** * Run mocha, returning the Runner. */ -mocha.run = function(fn){ - var options = mocha.options; - mocha.globals('location'); + mocha.run = function (fn) { + var options = mocha.options; + mocha.globals('location'); - var query = Mocha.utils.parseQuery(global.location.search || ''); - if (query.grep) mocha.grep(query.grep); - if (query.invert) mocha.invert(); + var query = Mocha.utils.parseQuery(global.location.search || ''); + if (query.grep) { mocha.grep(query.grep); } + if (query.invert) { mocha.invert(); } - return Mocha.prototype.run.call(mocha, function(){ - // The DOM Document is not available in Web Workers. - if (global.document) { - Mocha.utils.highlightTags('code'); - } - if (fn) fn(); - }); -}; + return Mocha.prototype.run.call(mocha, function () { + // The DOM Document is not available in Web Workers. + if (global.document) { + Mocha.utils.highlightTags('code'); + } + if (fn) { fn(); } + }); + }; -/** + /** * Expose the process shim. */ -Mocha.process = process; -require.register("reporters/ti-json.js", function(module, exports, require){ + Mocha.process = process; + require.register('reporters/ti-json.js', function (module, exports, require) { -/** + /** * Module dependencies. */ -var Base = require('./base'), - cursor = require('titanium/util').cursor, - color = Base.color; + var Base = require('./base'), + cursor = require('titanium/util').cursor, + color = Base.color; -/** + /** * Expose `JSON`. */ -exports = module.exports = TiJSONReporter; + exports = module.exports = TiJSONReporter; -/** + /** * Initialize a new `TiJSON` reporter. * * @param {Runner} runner * @api public */ -function TiJSONReporter(runner) { - var self = this; - Base.call(this, runner); + function TiJSONReporter(runner) { + var self = this; + Base.call(this, runner); - var tests = [], - failures = [], - passes = []; + var tests = [], + failures = [], + passes = []; - runner.on('test end', function(test){ - tests.push(test); - }); + runner.on('test end', function (test) { + tests.push(test); + }); - runner.on('pass', function(test){ - passes.push(test); - }); + runner.on('pass', function (test) { + passes.push(test); + }); - runner.on('fail', function(test){ - failures.push(test); - }); + runner.on('fail', function (test) { + failures.push(test); + }); - runner.on('end', function(){ - var obj = { - stats: self.stats, - tests: tests.map(clean), - failures: failures.map(clean), - passes: passes.map(clean) - }; + runner.on('end', function () { + var obj = { + stats: self.stats, + tests: tests.map(clean), + failures: failures.map(clean), + passes: passes.map(clean) + }; - console.log(cursor.resetLine + JSON.stringify(obj, null, 2)); - runner.results = obj; - }); -} + console.log(cursor.resetLine + JSON.stringify(obj, null, 2)); + runner.results = obj; + }); + } -/** + /** * Return a plain-object representation of `test` * free of cyclic properties etc. * @@ -5918,647 +5905,642 @@ function TiJSONReporter(runner) { * @api private */ -function clean(test) { - return { - title: test.title, - fullTitle: test.fullTitle(), - duration: test.duration - }; -} -}); // module: reporters/ti-json.js -// Create a titanium compatible reporter based on spec -require.register("reporters/ti-spec-studio.js", function(module, exports, require){ + function clean(test) { + return { + title: test.title, + fullTitle: test.fullTitle(), + duration: test.duration + }; + } + }); // module: reporters/ti-json.js + // Create a titanium compatible reporter based on spec + require.register('reporters/ti-spec-studio.js', function (module, exports, require) { /** * Module dependencies. */ - var Base = require('./base'), - cursor = require('titanium/util').cursor; + var Base = require('./base'), + cursor = require('titanium/util').cursor; - /** + /** * Expose `TiSpecStudio`. */ - exports = module.exports = TiSpecStudio; + exports = module.exports = TiSpecStudio; - /** + /** * Initialize a new `TiSpecStudio` test reporter. * * @param {Runner} runner * @api public */ - function TiSpecStudio(runner) { - Base.call(this, runner); + function TiSpecStudio(runner) { + Base.call(this, runner); - var self = this, - stats = this.stats, - indents = 0, - n = 0; + var self = this, + stats = this.stats, + indents = 0, + n = 0; - function NL() { - Ti.API.info(cursor.reset + ' ' + cursor.reset); - } + function NL() { + Ti.API.info(cursor.reset + ' ' + cursor.reset); + } - function indent() { - return cursor.reset + new Array(indents).join(' ') + cursor.reset; - } + function indent() { + return cursor.reset + new Array(indents).join(' ') + cursor.reset; + } - runner.on('start', function(){ - NL(); - }); + runner.on('start', function () { + NL(); + }); - runner.on('suite', function(suite){ - ++indents; - Ti.API.info(indent() + suite.title); - }); + runner.on('suite', function (suite) { + ++indents; + Ti.API.info(indent() + suite.title); + }); - runner.on('suite end', function(suite){ - --indents; - if (1 === indents) { NL(); } - }); + runner.on('suite end', function (suite) { + --indents; + if (indents === 1) { NL(); } + }); - runner.on('pending', function(test){ - Ti.API.warn(indent() + ' - ' + test.title + ' (pending)'); - }); + runner.on('pending', function (test) { + Ti.API.warn(indent() + ' - ' + test.title + ' (pending)'); + }); - runner.on('pass', function(test){ - if ('fast' === test.speed) { - Ti.API.info(indent() + ' + ' + test.title); - } else { - Ti.API.info(indent() + ' + ' + test.title + ' (' + test.duration + 'ms)'); - } - }); + runner.on('pass', function (test) { + if (test.speed === 'fast') { + Ti.API.info(indent() + ' + ' + test.title); + } else { + Ti.API.info(indent() + ' + ' + test.title + ' (' + test.duration + 'ms)'); + } + }); - runner.on('fail', function(test, err){ - Ti.API.error(indent() + ' ' + (++n) + ') ' + test.title); - }); + runner.on('fail', function (test, err) { + Ti.API.error(indent() + ' ' + (++n) + ') ' + test.title); + }); - runner.on('end', function() { - self.epilogue(); - }); - } + runner.on('end', function () { + self.epilogue(); + }); + } - /** + /** * Inherit from `Base.prototype`. */ - function F(){} - F.prototype = Base.prototype; - TiSpecStudio.prototype = new F(); - TiSpecStudio.prototype.constructor = TiSpecStudio; + function F() {} + F.prototype = Base.prototype; + TiSpecStudio.prototype = new F(); + TiSpecStudio.prototype.constructor = TiSpecStudio; -}); // module: reporters/ti-spec-studio.js + }); // module: reporters/ti-spec-studio.js -// Create a titanium compatible reporter based on spec -require.register("reporters/ti-spec.js", function(module, exports, require){ + // Create a titanium compatible reporter based on spec + require.register('reporters/ti-spec.js', function (module, exports, require) { /** * Module dependencies. */ - var Base = require('./base'), - cursor = require('titanium/util').cursor, - color = Base.color; + var Base = require('./base'), + cursor = require('titanium/util').cursor, + color = Base.color; - /** + /** * Expose `TiSpec`. */ - exports = module.exports = TiSpec; + exports = module.exports = TiSpec; - /** + /** * Initialize a new `TiSpec` test reporter. * * @param {Runner} runner * @api public */ - function TiSpec(runner) { - Base.call(this, runner); + function TiSpec(runner) { + Base.call(this, runner); + + var self = this, + stats = this.stats, + indents = 0, + n = 0; + + function NL() { + log(cursor.reset + ' ' + cursor.reset); + } + + function upOne() { + return cursor.previousLine + cursor.resetLine; + } + + function indent() { + return new Array(indents).join(' '); + } + + function log(msg) { + console.log(cursor.resetLine + msg); + } + + runner.on('start', function () { + NL(); + }); + + runner.on('suite', function (suite) { + ++indents; + log(color('suite', indent() + suite.title)); + }); + + runner.on('suite end', function (suite) { + --indents; + if (indents === 1) { NL(); } + }); + + runner.on('test', function (test) { + log(color('pass', indent() + ' o ' + test.title + ': ')); + }); + + runner.on('pending', function (test) { + log(color('pending', indent() + ' - ' + test.title)); + }); + + runner.on('pass', function (test) { + if (test.speed === 'fast') { + log(upOne() + color('checkmark', indent() + ' +') + color('pass', ' ' + test.title + ' ')); + } else { + log(upOne() + color('checkmark', indent() + ' +') + color('pass', ' ' + test.title + ' ') + + color(test.speed, '(' + test.duration + 'ms)')); + } + }); + + runner.on('fail', function (test, err) { + log(color('fail', upOne() + indent() + ' ' + (++n) + ') ' + test.title)); + }); + + runner.on('end', function () { + self.epilogue(); + }); + } + + /** + * Inherit from `Base.prototype`. + */ + + function F() {} + F.prototype = Base.prototype; + TiSpec.prototype = new F(); + TiSpec.prototype.constructor = TiSpec; + + }); // module: reporters/ti-spec.js + + require.register('titanium/util.js', function (module, exports, require) { - var self = this, - stats = this.stats, - indents = 0, - n = 0; + exports.cursor = { + previousLine: '\u001b[1F', + beginningOfLine: '\u001b[0G', + eraseLine: '\u001b[2K', + reset: '\u001b[0m' + }; + exports.cursor.resetLine = exports.cursor.beginningOfLine + exports.cursor.eraseLine; - function NL() { - log(cursor.reset + ' ' + cursor.reset); + function objectToString(o) { + return Object.prototype.toString.call(o); } - function upOne() { - return cursor.previousLine + cursor.resetLine; + function isArray(ar) { + return Array.isArray(ar); } - function indent() { - return new Array(indents).join(' '); + function isString(o) { + return typeof o === 'string'; } - function log(msg) { - console.log(cursor.resetLine + msg); + function isBoolean(o) { + return typeof o === 'boolean'; } - runner.on('start', function(){ - NL(); - }); + function isUndefined(arg) { + return arg === void 0; + } - runner.on('suite', function(suite){ - ++indents; - log(color('suite', indent() + suite.title)); - }); + function isNull(arg) { + return arg === null; + } - runner.on('suite end', function(suite){ - --indents; - if (1 === indents) { NL(); } - }); + function isObject(arg) { + return typeof arg === 'object' && arg !== null; + } - runner.on('test', function(test){ - log(color('pass', indent() + ' o ' + test.title + ': ')); - }); + function isFunction(arg) { + return typeof arg === 'function'; + } - runner.on('pending', function(test){ - log(color('pending', indent() + ' - ' + test.title)); - }); + function isNumber(arg) { + return typeof arg === 'number'; + } - runner.on('pass', function(test){ - if ('fast' === test.speed) { - log(upOne() + color('checkmark', indent() + ' +') + color('pass', ' ' + test.title + ' ')); - } else { - log(upOne() + color('checkmark', indent() + ' +') + color('pass', ' ' + test.title + ' ') + - color(test.speed, '(' + test.duration + 'ms)')); + function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; + } + + function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; + } + + function isError(e) { + return isObject(e) + && (objectToString(e) === '[object Error]' || e instanceof Error); + } + + function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; + } + + function arrayToHash(array) { + var hash = {}; + + array.forEach(function (val, idx) { + hash[val] = true; + }); + + return hash; + } + + function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } } - }); + keys.forEach(function (key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; + } - runner.on('fail', function(test, err){ - log(color('fail', upOne() + indent() + ' ' + (++n) + ') ' + test.title)); - }); + function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function (line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function (line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, '\\\'') + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, '\''); + name = ctx.stylize(name, 'string'); + } + } - runner.on('end', function() { - self.epilogue(); - }); - } + return name + ': ' + str; + } - /** - * Inherit from `Base.prototype`. - */ + var formatRegExp = /%[sdj%]/g; + exports.format = function (f) { + var i; + if (!isString(f)) { + var objects = []; + for (i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(' '); + } + + i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function (x) { + if (x === '%%') { return '%'; } + if (i >= len) { return x; } + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; + }; + + function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } + } + + function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: function (s) { return s; } + }; + // legacy... + if (arguments.length >= 3) { ctx.depth = arguments[2]; } + if (arguments.length >= 4) { ctx.colors = arguments[3]; } + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + exports._extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) { ctx.showHidden = false; } + if (isUndefined(ctx.depth)) { ctx.depth = 2; } + if (isUndefined(ctx.colors)) { ctx.colors = false; } + if (isUndefined(ctx.customInspect)) { ctx.customInspect = true; } + if (ctx.colors) { ctx.stylize = stylizeWithColor; } + return formatValue(ctx, obj, ctx.depth); + } - function F(){} - F.prototype = Base.prototype; - TiSpec.prototype = new F(); - TiSpec.prototype.constructor = TiSpec; - -}); // module: reporters/ti-spec.js - - -require.register("titanium/util.js", function(module, exports, require){ - - exports.cursor = { - previousLine: '\u001b[1F', - beginningOfLine: '\u001b[0G', - eraseLine: '\u001b[2K', - reset: '\u001b[0m' - }; - exports.cursor.resetLine = exports.cursor.beginningOfLine + exports.cursor.eraseLine; - - function objectToString(o) { - return Object.prototype.toString.call(o); - } - - function isArray(ar) { - return Array.isArray(ar); - } - - function isString(o) { - return typeof o === 'string'; - } - - function isBoolean(o) { - return typeof o === 'boolean'; - } - - function isUndefined(arg) { - return arg === void 0; - } - - function isNull(arg) { - return arg === null; - } - - function isObject(arg) { - return typeof arg === 'object' && arg !== null; - } - - function isFunction(arg) { - return typeof arg === 'function'; - } - - function isNumber(arg) { - return typeof arg === 'number'; - } - - function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; - } - - function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; - } - - function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); - } - - function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; - } - - function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; - } - - function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; - } - - function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; - } - - var formatRegExp = /%[sdj%]/g; - exports.format = function(f) { - var i; - if (!isString(f)) { - var objects = []; - for (i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; - }; - - function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } - } - - function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: function(s) { return s; } - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); - } - - function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && + function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect + && value + && isFunction(value.inspect) // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && + && value.inspect !== exports.inspect // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length === 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); - } - - function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; - } - - function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) { - // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, - // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . - if (value === 0 && 1 / value < 0) - return ctx.stylize('-0', 'number'); - return ctx.stylize('' + value, 'number'); - } - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); - } - -}); - -// stub location that mocha uses -global.location = {}; - -// reset the suites each time mocha is run -var _mochaRun = mocha.run; -mocha.run = function(fn) { - return _mochaRun.call(this, function() { - mocha.suite.suites.length = 0; - if (fn) { fn(); } - }); -}; - -mocha.reporter = function(r) { - Mocha.prototype.reporter.call(this, r); - this._ti_reporter = r; - return this; -}; - -mocha.outputFile = function(outputFile) { - this._ti_output_file = outputFile; -}; - -mocha.quiet = function(val) { - this._ti_quiet = val; -}; - -// Override the console functions with node.js-style formatting. This allows us to use some of mocha's existing -// reporters with only a few modifications, like I do with spec. -var console = {}; -var types = ['info','log','error','warn','trace']; - -// Use node.js-style util.format() for each console function call -function createConsoleLogger(type) { - console[type] = function() { - var util = require('titanium/util'), - args = Array.prototype.slice.call(arguments, 0), - rawArgs = args.slice(0), - isStudio = /\-studio$/.test(mocha._ti_reporter); - - if (!mocha._ti_quiet) { - if (args.length === 0) { - if (isStudio) { - args.push(util.cursor.reset + ' ' + util.cursor.reset); + && !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '', + array = false, + braces = [ '{', '}' ]; + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = [ '[', ']' ]; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length === 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); } else { - args.push(util.cursor.resetLine); + return ctx.stylize('[Object]', 'special'); } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); } else { - var prefix = util.cursor.resetLine; - if (!isStudio) { - // Clear the existing line of text using ANSI codes, get rid of those pesky [INFO] prefixes - args[0] = prefix + (args[0] || '').toString().split(/(?:\r\n|\n|\r)/).join('\n' + prefix); - } + output = keys.map(function (key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); + } + + function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function (prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) { numLinesEst++; } + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; } - // Use the util.js format() port to get node.js-like console functions - Ti.API.log(type === 'log' ? 'info' : type, util.format.apply(this, args)); + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; } - // If the output file exists, write the content to the file as well - if (mocha._ti_output_file) { - mocha._ti_output_file.append(util.format.apply(this, rawArgs).replace(/\x1B\[[0-9;]*[a-zA-Z]/g, '')); + function formatPrimitive(ctx, value) { + if (isUndefined(value)) { return ctx.stylize('undefined', 'undefined'); } + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, '\\\'') + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) { + // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, + // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . + if (value === 0 && 1 / value < 0) { return ctx.stylize('-0', 'number'); } + return ctx.stylize('' + value, 'number'); + } + if (isBoolean(value)) { return ctx.stylize('' + value, 'boolean'); } + // For some reason typeof null is "object", so special case here. + if (isNull(value)) { return ctx.stylize('null', 'null'); } } + + }); + + // stub location that mocha uses + global.location = {}; + + // reset the suites each time mocha is run + var _mochaRun = mocha.run; + mocha.run = function (fn) { + return _mochaRun.call(this, function () { + mocha.suite.suites.length = 0; + if (fn) { fn(); } + }); + }; + + mocha.reporter = function (r) { + Mocha.prototype.reporter.call(this, r); + this._ti_reporter = r; + return this; + }; + + mocha.outputFile = function (outputFile) { + this._ti_output_file = outputFile; + }; + + mocha.quiet = function (val) { + this._ti_quiet = val; }; -} - -for (var i = 0; i < types.length; i++) { - createConsoleLogger(types[i]); -} - -// set the ti-spec reporter by default -mocha.setup({ - ui: 'bdd', - reporter: 'ti-spec' -}); -})(); \ No newline at end of file + + // Override the console functions with node.js-style formatting. This allows us to use some of mocha's existing + // reporters with only a few modifications, like I do with spec. + var console = {}; + var types = [ 'info', 'log', 'error', 'warn', 'trace' ]; + + // Use node.js-style util.format() for each console function call + function createConsoleLogger(type) { + console[type] = function () { + var util = require('titanium/util'), + args = Array.prototype.slice.call(arguments, 0), + rawArgs = args.slice(0), + isStudio = /\-studio$/.test(mocha._ti_reporter); + + if (!mocha._ti_quiet) { + if (args.length === 0) { + if (isStudio) { + args.push(util.cursor.reset + ' ' + util.cursor.reset); + } else { + args.push(util.cursor.resetLine); + } + } else { + var prefix = util.cursor.resetLine; + if (!isStudio) { + // Clear the existing line of text using ANSI codes, get rid of those pesky [INFO] prefixes + args[0] = prefix + (args[0] || '').toString().split(/(?:\r\n|\n|\r)/).join('\n' + prefix); + } + } + + // Use the util.js format() port to get node.js-like console functions + Ti.API.log(type === 'log' ? 'info' : type, util.format.apply(this, args)); + } + + // If the output file exists, write the content to the file as well + if (mocha._ti_output_file) { + mocha._ti_output_file.append(util.format.apply(this, rawArgs).replace(/\x1B\[[0-9;]*[a-zA-Z]/g, '')); + } + }; + } + + for (var i = 0; i < types.length; i++) { + createConsoleLogger(types[i]); + } + + // set the ti-spec reporter by default + mocha.setup({ + ui: 'bdd', + reporter: 'ti-spec' + }); +}()); diff --git a/app/lib/themoviedb.js b/app/lib/themoviedb.js index 61045dd..d1536f6 100644 --- a/app/lib/themoviedb.js +++ b/app/lib/themoviedb.js @@ -1,1613 +1,1612 @@ var theMovieDb = {}; theMovieDb.common = { - api_key: "b31a733f2ca3cca5cf04cfdf1650a6d0", - base_uri: "http://api.themoviedb.org/3/", - images_uri: "http://image.tmdb.org/t/p/", - timeout: 5000, - generateQuery: function (options) { - 'use strict'; - var myOptions, query, option; - - myOptions = options || {}; - query = "?api_key=" + theMovieDb.common.api_key; - - if (Object.keys(myOptions).length > 0) { - for (option in myOptions) { - if (myOptions.hasOwnProperty(option) && option !== "id" && option !== "body") { - query = query + "&" + option + "=" + myOptions[option]; - } - } - } - return query; - }, - validateCallbacks: function (callbacks) { - 'use strict'; - if (typeof callbacks[0] !== "function" || typeof callbacks[1] !== "function") { - throw "Success and error parameters must be functions!"; - } - }, - validateRequired: function (args, argsReq, opt, optReq, allOpt) { - 'use strict'; - var i, allOptional; - - allOptional = allOpt || false; - - if (args.length !== argsReq) { - throw "The method requires " + argsReq + " arguments and you are sending " + args.length + "!"; - } - - if (allOptional) { - return; - } - - if (argsReq > 2) { - for (i = 0; i < optReq.length; i = i + 1) { - if (!opt.hasOwnProperty(optReq[i])) { - throw optReq[i] + " is a required parameter and is not present in the options!"; - } - } - } - }, - getImage: function (options) { - 'use strict'; - return theMovieDb.common.images_uri + options.size + "/" + options.file; - }, - client: function (options, success, error) { - 'use strict'; - var method, status, xhr; - - method = options.method || "GET"; - status = options.status || 200; - // xhr = new XMLHttpRequest(); - xhr = Ti.Network.createHTTPClient(); - - xhr.ontimeout = function () { - error('{"status_code":408,"status_message":"Request timed out"}'); - }; - - xhr.open(method, theMovieDb.common.base_uri + options.url, true); - - if(options.method === "POST") { - xhr.setRequestHeader("Content-Type", "application/json"); - xhr.setRequestHeader("Accept", "application/json"); - } - - xhr.timeout = theMovieDb.common.timeout; - - xhr.onload = function (e) { - if (xhr.readyState === 4) { - if (xhr.status === status) { - success(xhr.responseText); - } else { - error(xhr.responseText); - } - } else { - error(xhr.responseText); - } - }; - - xhr.onerror = function (e) { - error(xhr.responseText); - }; - if (options.method === "POST") { - xhr.send(JSON.stringify(options.body)); - } else { - xhr.send(null); - } - } + api_key: 'b31a733f2ca3cca5cf04cfdf1650a6d0', + base_uri: 'http://api.themoviedb.org/3/', + images_uri: 'http://image.tmdb.org/t/p/', + timeout: 5000, + generateQuery: function (options) { + 'use strict'; + var myOptions, query, option; + + myOptions = options || {}; + query = '?api_key=' + theMovieDb.common.api_key; + + if (Object.keys(myOptions).length > 0) { + for (option in myOptions) { + if (myOptions.hasOwnProperty(option) && option !== 'id' && option !== 'body') { + query = query + '&' + option + '=' + myOptions[option]; + } + } + } + return query; + }, + validateCallbacks: function (callbacks) { + 'use strict'; + if (typeof callbacks[0] !== 'function' || typeof callbacks[1] !== 'function') { + throw 'Success and error parameters must be functions!'; + } + }, + validateRequired: function (args, argsReq, opt, optReq, allOpt) { + 'use strict'; + var i, allOptional; + + allOptional = allOpt || false; + + if (args.length !== argsReq) { + throw 'The method requires ' + argsReq + ' arguments and you are sending ' + args.length + '!'; + } + + if (allOptional) { + return; + } + + if (argsReq > 2) { + for (i = 0; i < optReq.length; i += 1) { + if (!opt.hasOwnProperty(optReq[i])) { + throw optReq[i] + ' is a required parameter and is not present in the options!'; + } + } + } + }, + getImage: function (options) { + 'use strict'; + return theMovieDb.common.images_uri + options.size + '/' + options.file; + }, + client: function (options, success, error) { + 'use strict'; + var method, status, xhr; + + method = options.method || 'GET'; + status = options.status || 200; + // xhr = new XMLHttpRequest(); + xhr = Ti.Network.createHTTPClient(); + + xhr.ontimeout = function () { + error('{"status_code":408,"status_message":"Request timed out"}'); + }; + + xhr.open(method, theMovieDb.common.base_uri + options.url, true); + + if (options.method === 'POST') { + xhr.setRequestHeader('Content-Type', 'application/json'); + xhr.setRequestHeader('Accept', 'application/json'); + } + + xhr.timeout = theMovieDb.common.timeout; + + xhr.onload = function (e) { + if (xhr.readyState === 4) { + if (xhr.status === status) { + success(xhr.responseText); + } else { + error(xhr.responseText); + } + } else { + error(xhr.responseText); + } + }; + + xhr.onerror = function (e) { + error(xhr.responseText); + }; + if (options.method === 'POST') { + xhr.send(JSON.stringify(options.body)); + } else { + xhr.send(null); + } + } }; theMovieDb.configurations = { - getConfiguration: function (success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 2); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "configuration" + theMovieDb.common.generateQuery() - }, - success, - error - ); - } + getConfiguration: function (success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 2); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'configuration' + theMovieDb.common.generateQuery() + }, + success, + error + ); + } }; theMovieDb.account = { - getInformation: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["session_id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "account" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getLists: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["session_id", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "account/" + options.id + "/lists" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getFavoritesMovies: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["session_id", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "account/" + options.id + "/favorite_movies" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - addFavorite: function (options, success, error) { - 'use strict'; - var body; - - theMovieDb.common.validateRequired(arguments, 3, options, ["session_id", "id", "movie_id", "favorite"]); - - theMovieDb.common.validateCallbacks([success, error]); - - body = { - "movie_id": options.movie_id, - "favorite": options.favorite - } - - - theMovieDb.common.client( - { - url: "account/" + options.id + "/favorite" + theMovieDb.common.generateQuery(options), - status: 201, - method: "POST", - body: body - }, - success, - error - ); - }, - getRatedMovies: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["session_id", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "account/" + options.id + "/rated_movies" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getWatchlist: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["session_id", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "account/" + options.id + "/movie_watchlist" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - addMovieToWatchlist: function (options, success, error) { - 'use strict'; - - var body; - - theMovieDb.common.validateRequired(arguments, 3, options, ["session_id", "id", "movie_id", "movie_watchlist"]); - - theMovieDb.common.validateCallbacks([success, error]); - - body = { - "movie_id": options.movie_id, - "movie_watchlist": options.movie_watchlist - } - - theMovieDb.common.client( - { - url: "account/" + options.id + "/movie_watchlist" + theMovieDb.common.generateQuery(options), - method: "POST", - status: 201, - body: body - }, - success, - error - ); - } + getInformation: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'account' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getLists: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'account/' + options.id + '/lists' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getFavoritesMovies: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'account/' + options.id + '/favorite_movies' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + addFavorite: function (options, success, error) { + 'use strict'; + var body; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id', 'movie_id', 'favorite' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + body = { + movie_id: options.movie_id, + favorite: options.favorite + }; + + theMovieDb.common.client( + { + url: 'account/' + options.id + '/favorite' + theMovieDb.common.generateQuery(options), + status: 201, + method: 'POST', + body: body + }, + success, + error + ); + }, + getRatedMovies: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'account/' + options.id + '/rated_movies' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getWatchlist: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'account/' + options.id + '/movie_watchlist' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + addMovieToWatchlist: function (options, success, error) { + 'use strict'; + + var body; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id', 'movie_id', 'movie_watchlist' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + body = { + movie_id: options.movie_id, + movie_watchlist: options.movie_watchlist + }; + + theMovieDb.common.client( + { + url: 'account/' + options.id + '/movie_watchlist' + theMovieDb.common.generateQuery(options), + method: 'POST', + status: 201, + body: body + }, + success, + error + ); + } }; theMovieDb.authentication = { - generateToken: function (success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 2); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "authentication/token/new" + theMovieDb.common.generateQuery() - }, - success, - error - ); - }, - askPermissions: function(options){ - 'use strict'; - - window.open("https://www.themoviedb.org/authenticate/" + options.token + "?redirect_to=" + options.redirect_to); - - }, - validateUser: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["request_token", "username", "password"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "authentication/token/validate_with_login" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - generateSession: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["request_token"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "authentication/session/new" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - generateGuestSession: function (success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 2); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "authentication/guest_session/new" + theMovieDb.common.generateQuery() - }, - success, - error - ); - } + generateToken: function (success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 2); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'authentication/token/new' + theMovieDb.common.generateQuery() + }, + success, + error + ); + }, + askPermissions: function (options) { + 'use strict'; + + window.open('https://www.themoviedb.org/authenticate/' + options.token + '?redirect_to=' + options.redirect_to); + + }, + validateUser: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'request_token', 'username', 'password' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'authentication/token/validate_with_login' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + generateSession: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'request_token' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'authentication/session/new' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + generateGuestSession: function (success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 2); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'authentication/guest_session/new' + theMovieDb.common.generateQuery() + }, + success, + error + ); + } }; theMovieDb.certifications = { - getList: function (success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 2); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "certification/movie/list" + theMovieDb.common.generateQuery() - }, - success, - error - ); - } + getList: function (success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 2); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'certification/movie/list' + theMovieDb.common.generateQuery() + }, + success, + error + ); + } }; theMovieDb.changes = { - getMovieChanges: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, "", "", true); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/changes" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getPersonChanges: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, "", "", true); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "person/changes" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getMovieChanges: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/changes' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getPersonChanges: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/changes' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.collections = { - getCollection: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "collection/" + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCollectionImages: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "collection/" + options.id + "/images" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } - + getCollection: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'collection/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCollectionImages: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'collection/' + options.id + '/images' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } + }; theMovieDb.companies = { - getCompany: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "company/" + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCompanyMovies: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "company/" + options.id + "/movies" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } - + getCompany: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'company/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCompanyMovies: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'company/' + options.id + '/movies' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } + }; theMovieDb.credits = { - getCredit: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "credit/" + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getCredit: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'credit/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.discover = { - getMovies: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, "", "", true); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "discover/movie" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTvShows: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, "", "", true); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "discover/tv" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } - + getMovies: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'discover/movie' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTvShows: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'discover/tv' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } + }; theMovieDb.find = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id", "external_source"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "find/" + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id', 'external_source' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'find/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.genres = { - getList: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, "", "", true); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "genre/list" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getMovies: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "genre/" + options.id + "/movies" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } - + getList: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'genre/list' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getMovies: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'genre/' + options.id + '/movies' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } + }; theMovieDb.jobs = { - getList: function (success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 2); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "job/list" + theMovieDb.common.generateQuery() - }, - success, - error - ); - } + getList: function (success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 2); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'job/list' + theMovieDb.common.generateQuery() + }, + success, + error + ); + } }; theMovieDb.keywords = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "keyword/" + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getMovies: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "keyword/" + options.id + "/movies" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'keyword/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getMovies: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'keyword/' + options.id + '/movies' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.lists = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "list/" + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getStatusById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id", "movie_id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "list/" + options.id + "/item_status" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - addList: function (options, success, error) { - 'use strict'; - - var body; - - theMovieDb.common.validateRequired(arguments, 3, options, ["session_id", "name", "description"]); - - theMovieDb.common.validateCallbacks([success, error]); - - body = { - "name": options.name, - "description": options.description - }; - - delete options.name; - delete options.description; - - if(options.hasOwnProperty("language")) { - body["language"] = options.language; - - delete options.language; - } - - theMovieDb.common.client( - { - method: "POST", - status: 201, - url: "list" + theMovieDb.common.generateQuery(options), - body: body - }, - success, - error - ); - }, - addItem: function (options, success, error) { - 'use strict'; - - var body; - - theMovieDb.common.validateRequired(arguments, 3, options, ["session_id", "id", "media_id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - body = { - "media_id": options.media_id - }; - - theMovieDb.common.client( - { - method: "POST", - status: 201, - url: "list/" + options.id + "/add_item" + theMovieDb.common.generateQuery(options), - body: body - }, - success, - error - ); - }, - removeItem: function (options, success, error) { - 'use strict'; - - var body; - - theMovieDb.common.validateRequired(arguments, 3, options, ["session_id", "id", "media_id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - body = { - "media_id": options.media_id - }; - - theMovieDb.common.client( - { - method: "POST", - status: 201, - url: "list/" + options.id + "/remove_item" + theMovieDb.common.generateQuery(options), - body: body - }, - success, - error - ); - }, - removeList: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["session_id", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - method: "DELETE", - status: 204, - url: "list/" + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - clearList: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["session_id", "id", "confirm"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - method: "POST", - status: 204, - body: {}, - url: "list/" + options.id + "/clear" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'list/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getStatusById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id', 'movie_id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'list/' + options.id + '/item_status' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + addList: function (options, success, error) { + 'use strict'; + + var body; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'name', 'description' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + body = { + name: options.name, + description: options.description + }; + + delete options.name; + delete options.description; + + if (options.hasOwnProperty('language')) { + body['language'] = options.language; + + delete options.language; + } + + theMovieDb.common.client( + { + method: 'POST', + status: 201, + url: 'list' + theMovieDb.common.generateQuery(options), + body: body + }, + success, + error + ); + }, + addItem: function (options, success, error) { + 'use strict'; + + var body; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id', 'media_id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + body = { + media_id: options.media_id + }; + + theMovieDb.common.client( + { + method: 'POST', + status: 201, + url: 'list/' + options.id + '/add_item' + theMovieDb.common.generateQuery(options), + body: body + }, + success, + error + ); + }, + removeItem: function (options, success, error) { + 'use strict'; + + var body; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id', 'media_id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + body = { + media_id: options.media_id + }; + + theMovieDb.common.client( + { + method: 'POST', + status: 201, + url: 'list/' + options.id + '/remove_item' + theMovieDb.common.generateQuery(options), + body: body + }, + success, + error + ); + }, + removeList: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + method: 'DELETE', + status: 204, + url: 'list/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + clearList: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id', 'confirm' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + method: 'POST', + status: 204, + body: {}, + url: 'list/' + options.id + '/clear' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.movies = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/" + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getAlternativeTitles: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/" + options.id + "/alternative_titles" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCredits: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/" + options.id + "/credits" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getImages: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/" + options.id + "/images" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getKeywords: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/" + options.id + "/keywords" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getReleases: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/" + options.id + "/releases" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTrailers: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/" + options.id + "/trailers" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTranslations: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/" + options.id + "/translations" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getSimilarMovies: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/" + options.id + "/similar_movies" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getReviews: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/" + options.id + "/reviews" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getLists: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/" + options.id + "/lists" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getChanges: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/" + options.id + "/changes" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getLatest: function (success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 2); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/latest" + theMovieDb.common.generateQuery() - }, - success, - error - ); - }, - getUpcoming: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, "", "", true); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/upcoming" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getNowPlaying: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, "", "", true); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/now_playing" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getPopular: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, "", "", true); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/popular" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTopRated: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, "", "", true); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/top_rated" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getStatus: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["session_id", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "movie/" + options.id + "/account_states" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - rate: function (options, rate, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 4, options, ["session_id", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - method: "POST", - status: 201, - url: "movie/" + options.id + "/rating" + theMovieDb.common.generateQuery(options), - body: { "value": rate } - }, - success, - error - ); - }, - rateGuest: function (options, rate, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 4, options, ["guest_session_id", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - method: "POST", - status: 201, - url: "movie/" + options.id + "/rating" + theMovieDb.common.generateQuery(options), - body: { "value": rate } - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getAlternativeTitles: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/alternative_titles' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCredits: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/credits' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getImages: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/images' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getKeywords: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/keywords' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getReleases: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/releases' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTrailers: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/trailers' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTranslations: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/translations' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getSimilarMovies: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/similar_movies' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getReviews: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/reviews' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getLists: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/lists' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getChanges: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/changes' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getLatest: function (success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 2); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/latest' + theMovieDb.common.generateQuery() + }, + success, + error + ); + }, + getUpcoming: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/upcoming' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getNowPlaying: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/now_playing' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getPopular: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/popular' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTopRated: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/top_rated' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getStatus: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/account_states' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + rate: function (options, rate, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 4, options, [ 'session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + method: 'POST', + status: 201, + url: 'movie/' + options.id + '/rating' + theMovieDb.common.generateQuery(options), + body: { value: rate } + }, + success, + error + ); + }, + rateGuest: function (options, rate, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 4, options, [ 'guest_session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + method: 'POST', + status: 201, + url: 'movie/' + options.id + '/rating' + theMovieDb.common.generateQuery(options), + body: { value: rate } + }, + success, + error + ); + } }; theMovieDb.networks = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "network/" + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'network/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.people = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "person/" + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getMovieCredits: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "person/" + options.id + "/movie_credits" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTvCredits: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "person/" + options.id + "/tv_credits" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCredits: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "person/" + options.id + "/combined_credits" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getExternalIds: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "person/" + options.id + "/external_ids" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getImages: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "person/" + options.id + "/images" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getChanges: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "person/" + options.id + "/changes" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getPopular: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, "", "", true); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "person/popular" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getLatest: function (success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 2); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "person/latest" + theMovieDb.common.generateQuery() - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getMovieCredits: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/' + options.id + '/movie_credits' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTvCredits: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/' + options.id + '/tv_credits' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCredits: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/' + options.id + '/combined_credits' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getExternalIds: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/' + options.id + '/external_ids' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getImages: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/' + options.id + '/images' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getChanges: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/' + options.id + '/changes' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getPopular: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/popular' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getLatest: function (success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 2); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/latest' + theMovieDb.common.generateQuery() + }, + success, + error + ); + } }; theMovieDb.reviews = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "review/" + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'review/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.search = { - getMovie: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["query"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "search/movie" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCollection: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["query"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "search/collection" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTv: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["query"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "search/tv" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getPerson: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["query"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "search/person" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getList: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["query"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "search/list" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCompany: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["query"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "search/company" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getKeyword: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["query"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "search/keyword" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getMovie: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'search/movie' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCollection: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'search/collection' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTv: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'search/tv' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getPerson: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'search/person' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getList: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'search/list' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCompany: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'search/company' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getKeyword: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'search/keyword' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.timezones = { - getList: function (success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 2); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "timezones/list" + theMovieDb.common.generateQuery() - }, - success, - error - ); - } + getList: function (success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 2); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'timezones/list' + theMovieDb.common.generateQuery() + }, + success, + error + ); + } }; theMovieDb.tv = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/" + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCredits: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/" + options.id + "/credits" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getExternalIds: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/" + options.id + "/external_ids" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getImages: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/" + options.id + "/images" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTranslations: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/" + options.id + "/translations" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getOnTheAir: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, "", "", true); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/on_the_air" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getAiringToday: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, "", "", true); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/airing_today" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTopRated: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, "", "", true); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/top_rated" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getPopular: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, "", "", true); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/popular" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCredits: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/credits' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getExternalIds: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/external_ids' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getImages: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/images' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTranslations: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/translations' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getOnTheAir: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/on_the_air' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getAiringToday: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/airing_today' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTopRated: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/top_rated' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getPopular: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/popular' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.tvSeasons = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["season_number", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/" + options.id + "/season/" + options.season_number + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCredits: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["season_number", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/" + options.id + "/season/" + options.season_number + "/credits" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getExternalIds: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["season_number", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/" + options.id + "/season/" + options.season_number + "/external_ids" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getImages: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["season_number", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/" + options.id + "/season/" + options.season_number + "/images" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCredits: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + '/credits' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getExternalIds: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + '/external_ids' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getImages: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + '/images' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.tvEpisodes = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["episode_number", "season_number", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/" + options.id + "/season/" + options.season_number + "/episode/" + options.episode_number + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCredits: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["episode_number", "season_number", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/" + options.id + "/season/" + options.season_number + "/episode/" + options.episode_number + "/credits" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getExternalIds: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["episode_number", "season_number", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/" + options.id + "/season/" + options.season_number + "/episode/" + options.episode_number + "/external_ids" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getImages: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, ["episode_number", "season_number", "id"]); - - theMovieDb.common.validateCallbacks([success, error]); - - theMovieDb.common.client( - { - url: "tv/" + options.id + "/season/" + options.season_number + "/episode/" + options.episode_number + "/images" + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'episode_number', 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + '/episode/' + options.episode_number + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCredits: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'episode_number', 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + '/episode/' + options.episode_number + '/credits' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getExternalIds: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'episode_number', 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + '/episode/' + options.episode_number + '/external_ids' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getImages: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'episode_number', 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + '/episode/' + options.episode_number + '/images' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; -module.exports = theMovieDb; \ No newline at end of file +module.exports = theMovieDb; diff --git a/app/lib/youtube.js b/app/lib/youtube.js index fae2b80..3f49682 100644 --- a/app/lib/youtube.js +++ b/app/lib/youtube.js @@ -1,6 +1,6 @@ /** * Movies - * + * * @copyright * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. * @@ -10,164 +10,153 @@ */ var lib = Alloy.Globals; - + var win = null, - videoPlayer = null; - + videoPlayer = null; + exports.isPlaying = false; - -exports.play = function(id) { - exports.isPlaying = true; - // getVideo(id); - - h264videosWithYoutubeURL(id, function success(e) { + +exports.play = function (id) { + exports.isPlaying = true; + // getVideo(id); + + h264videosWithYoutubeURL(id, function success(e) { playVideo(e); - - }, function error(e) { - Ti.API.error("Error: " + e); - }); - + + }, function error(e) { + Ti.API.error('Error: ' + e); + }); + }; function getURLArgs(_string) { - var args = {}; - var pairs = _string.split("&"); - for(var i = 0; i < pairs.length; i++) { - var pos = pairs[i].indexOf('='); - if (pos == -1) continue; - var argname = pairs[i].substring(0,pos); - var value = pairs[i].substring(pos+1); - args[argname] = unescape(value); - } - return args; + var args = {}; + var pairs = _string.split('&'); + for (var i = 0; i < pairs.length; i++) { + var pos = pairs[i].indexOf('='); + if (pos == -1) { continue; } + var argname = pairs[i].substring(0, pos); + var value = pairs[i].substring(pos + 1); + args[argname] = unescape(value); + } + return args; } -function h264videosWithYoutubeURL(_youtubeId, _callbackOk, _callbackError) -{ - var youtubeInfoUrl = 'http://www.youtube.com/get_video_info?video_id=' + _youtubeId; - var request = Titanium.Network.createHTTPClient({ timeout : 10000 /* in milliseconds */}); - request.open("GET", youtubeInfoUrl); - request.onerror = function(_event){ - if (_callbackError) - _callbackError({status: this.status, error:_event.error}); - }; - request.onload = function(_event){ - var qualities = []; - var response = this.responseText; - var args = getURLArgs(response); - if (!args.hasOwnProperty('url_encoded_fmt_stream_map')) - { - if (_callbackError) - _callbackError(); - } - else - { - var fmtstring = args['url_encoded_fmt_stream_map']; - var fmtarray = fmtstring.split(','); - for(var i=0,j=fmtarray.length; i= 0) - { - var url = decodeURIComponent(args2['url']); - var quality = decodeURIComponent(args2['quality']); - // qualities[quality] = url; - qualities.push(url); - } - } - if (_callbackOk) - _callbackOk(qualities[0]); - } - }; - request.send(); - - +function h264videosWithYoutubeURL(_youtubeId, _callbackOk, _callbackError) { + var youtubeInfoUrl = 'http://www.youtube.com/get_video_info?video_id=' + _youtubeId; + var request = Titanium.Network.createHTTPClient({ timeout: 10000 /* in milliseconds */}); + request.open('GET', youtubeInfoUrl); + request.onerror = function (_event) { + if (_callbackError) { _callbackError({ status: this.status, error: _event.error }); } + }; + request.onload = function (_event) { + var qualities = []; + var response = this.responseText; + var args = getURLArgs(response); + if (!args.hasOwnProperty('url_encoded_fmt_stream_map')) { + if (_callbackError) { _callbackError(); } + } else { + var fmtstring = args['url_encoded_fmt_stream_map']; + var fmtarray = fmtstring.split(','); + for (var i = 0, j = fmtarray.length; i < j; i++) { + var args2 = getURLArgs(fmtarray[i]); + var type = decodeURIComponent(args2['type']); + if (type.indexOf('mp4') >= 0) { + var url = decodeURIComponent(args2['url']); + var quality = decodeURIComponent(args2['quality']); + // qualities[quality] = url; + qualities.push(url); + } + } + if (_callbackOk) { _callbackOk(qualities[0]); } + } + }; + request.send(); + } - + function getVideo(id) { - var client = Ti.Network.createHTTPClient(); - client.onload = function () { - var json = decodeURIComponent(decodeURIComponent(decodeURIComponent(decodeURIComponent(this.responseText.substring(4, this.responseText.length))))); - var response = JSON.parse(json); - var video = response.content.video; - var isHighQuality = video['fmt_stream_map'] != null; - var streamUrl = isHighQuality ? video['fmt_stream_map'][0].url : video.stream_url; - if(!isHighQuality) { - Ti.API.info('using low quality video because fmt_stream_map does not exist in json response, User-Agent probably is not being sent correctly'); - } - playVideo(streamUrl); - }; - if(OS_IOS) { - client.setRequestHeader('Referer', 'http://www.youtube.com/watch?v=' + id); - client.setRequestHeader('User-Agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14 (KHTML, like Gecko) Version/6.0.1 Safari/536.26.14'); - } - client.open('GET', 'http://m.youtube.com/watch?ajax=1&layout=mobile&tsp=1&utcoffset=330&v=' + id); - if(OS_ANDROID) { - client.setRequestHeader('Referer', 'http://www.youtube.com/watch?v=' + id); - client.setRequestHeader('User-Agent', 'Mozilla/5.0 (Linux; U; Android 2.2.1; en-gb; GT-I9003 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); - } - client.send(); + var client = Ti.Network.createHTTPClient(); + client.onload = function () { + var json = decodeURIComponent(decodeURIComponent(decodeURIComponent(decodeURIComponent(this.responseText.substring(4, this.responseText.length))))); + var response = JSON.parse(json); + var video = response.content.video; + var isHighQuality = video['fmt_stream_map'] != null; + var streamUrl = isHighQuality ? video['fmt_stream_map'][0].url : video.stream_url; + if (!isHighQuality) { + Ti.API.info('using low quality video because fmt_stream_map does not exist in json response, User-Agent probably is not being sent correctly'); + } + playVideo(streamUrl); + }; + if (OS_IOS) { + client.setRequestHeader('Referer', 'http://www.youtube.com/watch?v=' + id); + client.setRequestHeader('User-Agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14 (KHTML, like Gecko) Version/6.0.1 Safari/536.26.14'); + } + client.open('GET', 'http://m.youtube.com/watch?ajax=1&layout=mobile&tsp=1&utcoffset=330&v=' + id); + if (OS_ANDROID) { + client.setRequestHeader('Referer', 'http://www.youtube.com/watch?v=' + id); + client.setRequestHeader('User-Agent', 'Mozilla/5.0 (Linux; U; Android 2.2.1; en-gb; GT-I9003 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); + } + client.send(); } - + function playVideo(url) { - if(OS_IOS) { - win = Ti.UI.createWindow({ - title: 'View Training Video', - backgroundColor: '#000' - }); - } - if(OS_WINDOWS) { - win = Ti.UI.createWindow({ - title: 'View Training Video', - backgroundColor: '#000' - }); - } - videoPlayer = Ti.Media.createVideoPlayer({ - backgroundColor: '#000', - url: url, - fullscreen: true, - autoplay: true, - scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FIT, - mediaControlMode: Ti.Media.VIDEO_CONTROL_DEFAULT - }); - videoPlayer.addEventListener('complete', function(e) { - Ti.API.info('video player complete'); - exports.close(); - }); - videoPlayer.addEventListener('fullscreen', function(e) { - if (!e.entering) { - Ti.API.info('video player fullscreen exit'); - exports.close(); - } - }); - if(OS_IOS) { - win.add(videoPlayer); - win.open(); - } - if(OS_WINDOWS) { - win.add(videoPlayer); - win.open(); - } + if (OS_IOS) { + win = Ti.UI.createWindow({ + title: 'View Training Video', + backgroundColor: '#000' + }); + } + if (OS_WINDOWS) { + win = Ti.UI.createWindow({ + title: 'View Training Video', + backgroundColor: '#000' + }); + } + videoPlayer = Ti.Media.createVideoPlayer({ + backgroundColor: '#000', + url: url, + fullscreen: true, + autoplay: true, + scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FIT, + mediaControlMode: Ti.Media.VIDEO_CONTROL_DEFAULT + }); + videoPlayer.addEventListener('complete', function (e) { + Ti.API.info('video player complete'); + exports.close(); + }); + videoPlayer.addEventListener('fullscreen', function (e) { + if (!e.entering) { + Ti.API.info('video player fullscreen exit'); + exports.close(); + } + }); + if (OS_IOS) { + win.add(videoPlayer); + win.open(); + } + if (OS_WINDOWS) { + win.add(videoPlayer); + win.open(); + } } - -exports.close = function() { - Ti.API.info('closing video player'); - - if(OS_IOS) { + +exports.close = function () { + Ti.API.info('closing video player'); + + if (OS_IOS) { if (videoPlayer) { videoPlayer.fullscreen = false; } - win && win.close(); - win = null; - } else if (OS_WINDOWS) { - win && win.close(); - win = null; - } else { - if (videoPlayer) { + win && win.close(); + win = null; + } else if (OS_WINDOWS) { + win && win.close(); + win = null; + } else if (videoPlayer) { videoPlayer.hide(); videoPlayer.release(); videoPlayer = null; } - } - exports.isPlaying = false; + exports.isPlaying = false; }; diff --git a/manifest b/manifest deleted file mode 100644 index 24cbd26..0000000 --- a/manifest +++ /dev/null @@ -1,8 +0,0 @@ -#appname:Movies -#publisher:Appcelerator -#url:http://www.appcelerator.com -#image:appicon.png -#appid:com.appcelerator.movies -#desc:Movies app -#type:mobile -#guid:11111111-1111-1111-1111-111111111111 diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..8b4bb79 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2516 @@ +{ + "name": "movies", + "version": "1.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "acorn": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", + "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==", + "dev": true + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "requires": { + "acorn": "^3.0.4" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ajv-keywords": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", + "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", + "dev": true + }, + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + } + } + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", + "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-from": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", + "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "^0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "coffeescript": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.10.0.tgz", + "integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4=", + "dev": true + }, + "color-convert": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", + "dev": true, + "requires": { + "color-name": "1.1.1" + } + }, + "color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", + "dev": true + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.5.1.tgz", + "integrity": "sha1-I8Yfbke+FDzALnrUuxxH9c1aKIM=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "dateformat": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", + "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1", + "meow": "^3.3.0" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "debuglog": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", + "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=", + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "dezalgo": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", + "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", + "dev": true, + "requires": { + "asap": "^2.0.0", + "wrappy": "1" + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "~0.1.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", + "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", + "dev": true, + "requires": { + "ajv": "^5.3.0", + "babel-code-frame": "^6.22.0", + "chalk": "^2.1.0", + "concat-stream": "^1.6.0", + "cross-spawn": "^5.1.0", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^3.7.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^3.5.4", + "esquery": "^1.0.0", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.0.1", + "ignore": "^3.3.3", + "imurmurhash": "^0.1.4", + "inquirer": "^3.0.6", + "is-resolvable": "^1.0.0", + "js-yaml": "^3.9.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.4", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^1.0.1", + "require-uncached": "^1.0.3", + "semver": "^5.3.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "~2.0.1", + "table": "4.0.2", + "text-table": "~0.2.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + } + } + }, + "eslint-config-axway": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/eslint-config-axway/-/eslint-config-axway-2.0.14.tgz", + "integrity": "sha512-sq9LX2o5AnroVmSwWgM1yXubv7EMMs+/p7YyVJ259sZ4xsFltficePqBGISBUymyLHfaL7Rrg20pO9mMopotXg==", + "dev": true, + "requires": { + "eslint-plugin-import": "^2.11.0", + "eslint-plugin-security": "^1.4.0", + "find-root": "^1.1.0", + "semver": "^5.5.0" + } + }, + "eslint-import-resolver-node": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", + "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "resolve": "^1.5.0" + }, + "dependencies": { + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + } + } + }, + "eslint-module-utils": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz", + "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", + "dev": true, + "requires": { + "debug": "^2.6.8", + "pkg-dir": "^1.0.0" + } + }, + "eslint-plugin-alloy": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-alloy/-/eslint-plugin-alloy-1.1.1.tgz", + "integrity": "sha512-WGLu+lSHcpjGJ+asIDGhdBoXclX6PHvcWKeG3VxHcgRtHgkEdjdhnBcmk6cy7eIkYVXFmksVun3RUurMWJtAfg==", + "dev": true, + "requires": { + "eslint-rule-composer": "^0.3.0", + "find-up": "^2.1.0", + "xmldoc": "^1.1.0" + } + }, + "eslint-plugin-import": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.13.0.tgz", + "integrity": "sha512-t6hGKQDMIt9N8R7vLepsYXgDfeuhp6ZJSgtrLEDxonpSubyxUZHjhm6LsAaZX8q6GYVxkbT3kTsV9G5mBCFR6A==", + "dev": true, + "requires": { + "contains-path": "^0.1.0", + "debug": "^2.6.8", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.1", + "eslint-module-utils": "^2.2.0", + "has": "^1.0.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.3", + "read-pkg-up": "^2.0.0", + "resolve": "^1.6.0" + }, + "dependencies": { + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } + }, + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "eslint-plugin-mocha": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-4.12.1.tgz", + "integrity": "sha512-hxWtYHvLA0p/PKymRfDYh9Mxt5dYkg2Goy1vZDarTEEYfELP9ksga7kKG1NUKSQy27C8Qjc7YrSWTLUhOEOksA==", + "dev": true, + "requires": { + "ramda": "^0.25.0" + } + }, + "eslint-plugin-security": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.4.0.tgz", + "integrity": "sha512-xlS7P2PLMXeqfhyf3NpqbvbnW04kN8M9NtmhpR3XGyOvt/vNKS7XPXT5EDbwKW9vCjWH4PpfQvgD/+JgN0VJKA==", + "dev": true, + "requires": { + "safe-regex": "^1.1.0" + } + }, + "eslint-rule-composer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", + "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", + "dev": true + }, + "eslint-scope": { + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.3.tgz", + "integrity": "sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "dev": true, + "requires": { + "acorn": "^5.5.0", + "acorn-jsx": "^3.0.0" + } + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "eventemitter2": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=", + "dev": true + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-grunt-plugin": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/extend-grunt-plugin/-/extend-grunt-plugin-0.1.0.tgz", + "integrity": "sha1-mT/Rc4Lib0OE3Cm6icMxK0bIusU=", + "dev": true + }, + "external-editor": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dev": true, + "requires": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" + } + }, + "find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "dev": true + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "findup-sync": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", + "integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=", + "dev": true, + "requires": { + "glob": "~5.0.0" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "flat-cache": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true, + "requires": { + "circular-json": "^0.3.1", + "del": "^2.0.2", + "graceful-fs": "^4.1.2", + "write": "^0.2.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "getobject": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz", + "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "globals": { + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", + "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", + "dev": true + }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "grunt": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.3.tgz", + "integrity": "sha512-/JzmZNPfKorlCrrmxWqQO4JVodO+DVd5XX4DkocL/1WlLlKVLE9+SdEIempOAxDhWPysLle6afvn/hg7Ck2k9g==", + "dev": true, + "requires": { + "coffeescript": "~1.10.0", + "dateformat": "~1.0.12", + "eventemitter2": "~0.4.13", + "exit": "~0.1.1", + "findup-sync": "~0.3.0", + "glob": "~7.0.0", + "grunt-cli": "~1.2.0", + "grunt-known-options": "~1.1.0", + "grunt-legacy-log": "~2.0.0", + "grunt-legacy-util": "~1.1.1", + "iconv-lite": "~0.4.13", + "js-yaml": "~3.5.2", + "minimatch": "~3.0.2", + "mkdirp": "~0.5.1", + "nopt": "~3.0.6", + "path-is-absolute": "~1.0.0", + "rimraf": "~2.6.2" + } + }, + "grunt-appc-js": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-appc-js/-/grunt-appc-js-2.1.0.tgz", + "integrity": "sha512-rBLLEdfUVOmpkk229D4Qi9cnpw3dwIqSipm0BjQJkiajCFfOEO2RBMSBYE1FGMkoJUS6wTlg5XeGruMChyoRCQ==", + "dev": true, + "requires": { + "eslint-config-axway": "^2.0.1", + "eslint-plugin-mocha": "^4.11.0", + "extend-grunt-plugin": "^0.1.0", + "grunt-continue": "^0.1.0", + "grunt-eslint": "^20.0.0", + "grunt-retire": "~1.0.6" + } + }, + "grunt-cli": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz", + "integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=", + "dev": true, + "requires": { + "findup-sync": "~0.3.0", + "grunt-known-options": "~1.1.0", + "nopt": "~3.0.6", + "resolve": "~1.1.0" + } + }, + "grunt-continue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/grunt-continue/-/grunt-continue-0.1.0.tgz", + "integrity": "sha1-u1OFXxdtPdK6jM808jMO5Gl22ts=", + "dev": true + }, + "grunt-eslint": { + "version": "20.2.0", + "resolved": "https://registry.npmjs.org/grunt-eslint/-/grunt-eslint-20.2.0.tgz", + "integrity": "sha512-XPrN3lyFwiTdQWpblZqvKvKtk74aZNs/6tUdKZqSCl/YNq+iaoE477w7I/082OwTSjyXi4ylE1P5fhHWuzxu1w==", + "dev": true, + "requires": { + "chalk": "^2.1.0", + "eslint": "^4.0.0" + } + }, + "grunt-known-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.0.tgz", + "integrity": "sha1-pCdO6zL6dl2lp6OxcSYXzjsUQUk=", + "dev": true + }, + "grunt-legacy-log": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz", + "integrity": "sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw==", + "dev": true, + "requires": { + "colors": "~1.1.2", + "grunt-legacy-log-utils": "~2.0.0", + "hooker": "~0.2.3", + "lodash": "~4.17.5" + } + }, + "grunt-legacy-log-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz", + "integrity": "sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA==", + "dev": true, + "requires": { + "chalk": "~2.4.1", + "lodash": "~4.17.10" + } + }, + "grunt-legacy-util": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz", + "integrity": "sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A==", + "dev": true, + "requires": { + "async": "~1.5.2", + "exit": "~0.1.1", + "getobject": "~0.1.0", + "hooker": "~0.2.3", + "lodash": "~4.17.10", + "underscore.string": "~3.3.4", + "which": "~1.3.0" + } + }, + "grunt-retire": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/grunt-retire/-/grunt-retire-1.0.7.tgz", + "integrity": "sha1-QuHdu/EtDvtnU2hWMMyJ5CQG9ug=", + "dev": true, + "requires": { + "async": "~1.5.x", + "request": "2.x.x", + "retire": "~1.2.x" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "dev": true, + "requires": { + "ajv": "^5.1.0", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "hooker": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=", + "dev": true + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "inquirer": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "dev": true, + "requires": { + "is-path-inside": "^1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.5.tgz", + "integrity": "sha1-A3fDgBfKvHMisNH7zSWkkWQfL74=", + "dev": true, + "requires": { + "argparse": "^1.0.2", + "esprima": "^2.6.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "mime-db": { + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", + "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.19", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", + "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", + "dev": true, + "requires": { + "mime-db": "~1.35.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "dev": true, + "requires": { + "find-up": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + } + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "progress": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "ramda": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.25.0.tgz", + "integrity": "sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ==", + "dev": true + }, + "read-installed": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", + "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", + "dev": true, + "requires": { + "debuglog": "^1.0.1", + "graceful-fs": "^4.1.2", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "slide": "~1.1.3", + "util-extend": "^1.0.1" + } + }, + "read-package-json": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.13.tgz", + "integrity": "sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg==", + "dev": true, + "requires": { + "glob": "^7.1.1", + "graceful-fs": "^4.1.2", + "json-parse-better-errors": "^1.0.1", + "normalize-package-data": "^2.0.0", + "slash": "^1.0.0" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdir-scoped-modules": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz", + "integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", + "dev": true, + "requires": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "regexpp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", + "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "request": { + "version": "2.87.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", + "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.6.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.1", + "forever-agent": "~0.6.1", + "form-data": "~2.3.1", + "har-validator": "~5.0.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.17", + "oauth-sign": "~0.8.2", + "performance-now": "^2.1.0", + "qs": "~6.5.1", + "safe-buffer": "^5.1.1", + "tough-cookie": "~2.3.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.1.0" + } + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" + } + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "retire": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/retire/-/retire-1.2.13.tgz", + "integrity": "sha1-3YThQYw/UmS2aun5hWottzdD7gs=", + "dev": true, + "requires": { + "commander": "2.5.x", + "read-installed": "^4.0.3", + "request": "~2.x.x", + "walkdir": "0.0.7" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", + "dev": true + }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "dev": true, + "requires": { + "rx-lite": "*" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0" + } + }, + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "dev": true + }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "dev": true + }, + "sprintf-js": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz", + "integrity": "sha1-Nr54Mgr+WAH2zqPueLblqrlA6gw=", + "dev": true + }, + "sshpk": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + } + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "table": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", + "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "dev": true, + "requires": { + "ajv": "^5.2.3", + "ajv-keywords": "^2.1.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", + "slice-ansi": "1.0.0", + "string-width": "^2.1.1" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "dev": true, + "requires": { + "punycode": "^1.4.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "underscore.string": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz", + "integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=", + "dev": true, + "requires": { + "sprintf-js": "^1.0.3", + "util-deprecate": "^1.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "util-extend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", + "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "walkdir": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.7.tgz", + "integrity": "sha1-BNoCcKh6d4VAFzzb8KLbSZqNnik=", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "xmldoc": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/xmldoc/-/xmldoc-1.1.1.tgz", + "integrity": "sha512-fx/Y2svWatWxAzfebSaHx0HkJ0vSAYUqhawjYAQmzE3gRHpUNkGl1NBAINCfwLz3mgaQdBhM1oL5pk0/TnWrDg==", + "dev": true, + "requires": { + "sax": "^1.2.1" + } + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..7080659 --- /dev/null +++ b/package.json @@ -0,0 +1,31 @@ +{ + "name": "movies", + "version": "1.1.0", + "description": "Movies Sample App", + "main": "app/index.js", + "scripts": { + "lint": "grunt lint", + "format": "grunt format:js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/appcelerator/movies.git" + }, + "keywords": [ + "appcelerator", + "titanium", + "sample" + ], + "author": "Appcelerator", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/appcelerator/movies/issues" + }, + "homepage": "https://github.com/appcelerator/movies#readme", + "devDependencies": { + "eslint-plugin-alloy": "^1.0.0", + "grunt": "^1.0.1", + "grunt-appc-js": "^2.1.0", + "grunt-cli": "^1.2.0" + } +} diff --git a/tiapp.xml b/tiapp.xml index a9ca020..b1b17f4 100644 --- a/tiapp.xml +++ b/tiapp.xml @@ -2,7 +2,7 @@ com.appcelerator.movies Movies - 1.0.2 + 1.1.0 Appcelerator http://www.appcelerator.com Movies Sample App @@ -10,7 +10,7 @@ appicon.png false true - + true false @@ -36,7 +36,7 @@ false true - 7.1.0.v20180222163802 + 7.2.0.GA ti.alloy From a3093fdba3cc7399a220f5370dd0eb5214e1847b Mon Sep 17 00:00:00 2001 From: hansemannn Date: Wed, 25 Jul 2018 12:47:21 +0200 Subject: [PATCH 2/3] Finish ESLint, update headers --- .eslintrc | 3 +- app/alloy.jmk | 2 +- app/alloy.js | 2 +- app/controllers/about.js | 2 +- app/controllers/home.js | 20 +- app/controllers/index.js | 2 +- app/controllers/intro.js | 2 +- app/controllers/movie.js | 2 +- app/controllers/movies_list.js | 2 +- app/controllers/settings.js | 2 +- app/lib/animation.js | 38 +- app/lib/data.js | 84 +- app/lib/data/genres.json | 3028 +++++++++++++++--------------- app/lib/data/lists.json | 618 +++--- app/lib/navigation.js | 161 +- app/lib/tests/specs/app_tests.js | 2 +- app/lib/themoviedb.js | 2964 +++++++++++++++-------------- app/lib/youtube.js | 263 +-- 18 files changed, 3589 insertions(+), 3608 deletions(-) diff --git a/.eslintrc b/.eslintrc index 72c822e..07e2dd8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,6 +1,7 @@ { "extends": [ "axway/env-alloy" ], "rules": { - "import/no-absolute-path": "off" + "import/no-absolute-path": "off", + "indent": ["error", 2] } } \ No newline at end of file diff --git a/app/alloy.jmk b/app/alloy.jmk index cb6a42c..b766e7f 100644 --- a/app/alloy.jmk +++ b/app/alloy.jmk @@ -2,7 +2,7 @@ * Movies * * @copyright - * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. + * Copyright (c) 2015-present by Appcelerator, Inc. All Rights Reserved. * * @license * Licensed under the terms of the Apache Public License diff --git a/app/alloy.js b/app/alloy.js index 6b2fe48..b3d45e7 100644 --- a/app/alloy.js +++ b/app/alloy.js @@ -2,7 +2,7 @@ * Movies * * @copyright - * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. + * Copyright (c) 2015-present by Appcelerator, Inc. All Rights Reserved. * * @license * Licensed under the terms of the Apache Public License diff --git a/app/controllers/about.js b/app/controllers/about.js index 29f1932..e20638b 100644 --- a/app/controllers/about.js +++ b/app/controllers/about.js @@ -2,7 +2,7 @@ * Movies * * @copyright - * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. + * Copyright (c) 2015-present by Appcelerator, Inc. All Rights Reserved. * * @license * Licensed under the terms of the Apache Public License diff --git a/app/controllers/home.js b/app/controllers/home.js index bb8d5a5..f514484 100644 --- a/app/controllers/home.js +++ b/app/controllers/home.js @@ -2,7 +2,7 @@ * Movies * * @copyright - * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. + * Copyright (c) 2015-present by Appcelerator, Inc. All Rights Reserved. * * @license * Licensed under the terms of the Apache Public License @@ -282,22 +282,20 @@ $.animateIn = function () { * open list */ function openList(list) { - Alloy.Globals.Navigator.push('movies_list', - { - type: 'list', - id: list.id - }); + Alloy.Globals.Navigator.push('movies_list', { + type: 'list', + id: list.id + }); } /** * open genre */ function openGenre(genre) { - Alloy.Globals.Navigator.push('movies_list', - { - type: 'genre', - id: genre.id - }); + Alloy.Globals.Navigator.push('movies_list', { + type: 'genre', + id: genre.id + }); } /** diff --git a/app/controllers/index.js b/app/controllers/index.js index edc4e29..fb162d7 100644 --- a/app/controllers/index.js +++ b/app/controllers/index.js @@ -2,7 +2,7 @@ * Movies * * @copyright - * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. + * Copyright (c) 2015-present by Appcelerator, Inc. All Rights Reserved. * * @license * Licensed under the terms of the Apache Public License diff --git a/app/controllers/intro.js b/app/controllers/intro.js index d6b921d..176882d 100644 --- a/app/controllers/intro.js +++ b/app/controllers/intro.js @@ -2,7 +2,7 @@ * Movies * * @copyright - * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. + * Copyright (c) 2015-present by Appcelerator, Inc. All Rights Reserved. * * @license * Licensed under the terms of the Apache Public License diff --git a/app/controllers/movie.js b/app/controllers/movie.js index 538832f..e7fcad8 100644 --- a/app/controllers/movie.js +++ b/app/controllers/movie.js @@ -2,7 +2,7 @@ * Movies * * @copyright - * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. + * Copyright (c) 2015-present by Appcelerator, Inc. All Rights Reserved. * * @license * Licensed under the terms of the Apache Public License diff --git a/app/controllers/movies_list.js b/app/controllers/movies_list.js index 4f5b11d..3595f86 100644 --- a/app/controllers/movies_list.js +++ b/app/controllers/movies_list.js @@ -2,7 +2,7 @@ * Movies * * @copyright - * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. + * Copyright (c) 2015-present by Appcelerator, Inc. All Rights Reserved. * * @license * Licensed under the terms of the Apache Public License diff --git a/app/controllers/settings.js b/app/controllers/settings.js index 439f355..ac3f12a 100644 --- a/app/controllers/settings.js +++ b/app/controllers/settings.js @@ -2,7 +2,7 @@ * Movies * * @copyright - * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. + * Copyright (c) 2015-present by Appcelerator, Inc. All Rights Reserved. * * @license * Licensed under the terms of the Apache Public License diff --git a/app/lib/animation.js b/app/lib/animation.js index 9a68046..d549165 100644 --- a/app/lib/animation.js +++ b/app/lib/animation.js @@ -2,31 +2,29 @@ * Movies * * @copyright - * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. + * Copyright (c) 2015-present by Appcelerator, Inc. All Rights Reserved. * * @license * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. */ - exports.flash = function (view, callback) { - - var in_animation = Ti.UI.createAnimation({ - opacity: 0.7, - curve: Ti.UI.ANIMATION_CURVE_EASE_IN, - duration: 100 - }); - in_animation.addEventListener('complete', function () { - var out_animation = Ti.UI.createAnimation({ - opacity: 0, - curve: Ti.UI.ANIMATION_CURVE_EASE_OUT, - duration: 300 - }); - out_animation.addEventListener('complete', function () { - callback(); - }); - view.animate(out_animation); - }); - view.animate(in_animation); + var in_animation = Ti.UI.createAnimation({ + opacity: 0.7, + curve: Ti.UI.ANIMATION_CURVE_EASE_IN, + duration: 100 + }); + in_animation.addEventListener('complete', function () { + var out_animation = Ti.UI.createAnimation({ + opacity: 0, + curve: Ti.UI.ANIMATION_CURVE_EASE_OUT, + duration: 300 + }); + out_animation.addEventListener('complete', function () { + callback(); + }); + view.animate(out_animation); + }); + view.animate(in_animation); }; diff --git a/app/lib/data.js b/app/lib/data.js index d41031c..aaf6793 100644 --- a/app/lib/data.js +++ b/app/lib/data.js @@ -2,73 +2,71 @@ * Movies * * @copyright - * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. + * Copyright (c) 2015-present by Appcelerator, Inc. All Rights Reserved. * * @license * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. */ - /** * Load JSON file * @param {String} name The name of the JSON file * @param {Function} callback The callback invoked once parse */ function loadJsonFile(name, callback) { - var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, '/data/' + name + '.json'); + var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, '/data/' + name + '.json'); - if (file.exists()) { - var dataSrc = file.read(); - var data = JSON.parse(dataSrc); - callback(null, data); - return; - } + if (file.exists()) { + var dataSrc = file.read(); + var data = JSON.parse(dataSrc); + callback(null, data); + return; + } - callback('Error loading JSON file \'' + name + '\''); + callback('Error loading JSON file \'' + name + '\''); } /** - * Data - */ + * Data + */ var Data = { - get_config: function (callback) { - loadJsonFile('config', callback); - }, + get_config: function (callback) { + loadJsonFile('config', callback); + }, - movies_get_lists: function (callback) { - loadJsonFile('lists', callback); - }, + movies_get_lists: function (callback) { + loadJsonFile('lists', callback); + }, - movies_get_list: function (callback) { - loadJsonFile('list', callback); - }, + movies_get_list: function (callback) { + loadJsonFile('list', callback); + }, - movies_get_genres: function (callback) { - loadJsonFile('genres', callback); - }, + movies_get_genres: function (callback) { + loadJsonFile('genres', callback); + }, - movies_get_genre: function (callback) { - loadJsonFile('genre', callback); - }, + movies_get_genre: function (callback) { + loadJsonFile('genre', callback); + }, - movies_search: function (query, callback) { - loadJsonFile('list', function (error, e) { - if (!error) { - var results = _.filter(e.movies, function (movie) { - return (new RegExp(query, 'i')).test(movie.title); - }); - callback(null, results); - } else { - callback(error); - } - }); - }, + movies_search: function (query, callback) { + loadJsonFile('list', function (error, e) { + if (!error) { + var results = _.filter(e.movies, function (movie) { + return (new RegExp(query, 'i')).test(movie.title); // eslint-disable-line security/detect-non-literal-regexp + }); + callback(null, results); + } else { + callback(error); + } + }); + }, - movies_get_movie: function (callback) { - loadJsonFile('movie', callback); - } + movies_get_movie: function (callback) { + loadJsonFile('movie', callback); + } }; module.exports = Data; - diff --git a/app/lib/data/genres.json b/app/lib/data/genres.json index 5e8dd9e..a95a2f6 100644 --- a/app/lib/data/genres.json +++ b/app/lib/data/genres.json @@ -1,1515 +1,1515 @@ [ - { - "title": "Action", - "backdrop_path": "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:32+0000", - "backdrop_paths": [ - "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", - "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", - "/pKawqrtCBMmxarft7o1LbEynys7.jpg", - "/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg", - "/mFb0ygcue4ITixDkdr7wm1Tdarx.jpg", - "/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg", - "/eCgIoGvfNXrbSiQGqQHccuHjQHm.jpg", - "/rKESeEePWWu4rATQDJOktllaDDv.jpg", - "/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg", - "/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg", - "/p5n7VTC6qmFIuBFjACWURYCAlKP.jpg", - "/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg", - "/4qfXT9BtxeFuamR4F49m2mpKQI1.jpg", - "/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg", - "/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg", - "/fCPqyqCppo0MruBqGXpz5pmUabU.jpg", - "/7BhTIyySTmmqNaoguSPjZAVMoQG.jpg", - "/jjAq3tCezdlQduusgtMhpY2XzW0.jpg", - "/cHy7nSitAVgvZ7qfCK4JO47t3oZ.jpg", - "/pNPdcgHT1FpCmauzFWepyfDvDo9.jpg" - ], - "poster_path": "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", - "id": "54e2cb2c8fc9090996d2de7d", - "mdbids": [ - 76757, - 177572, - 228150, - 260346, - 245891, - 49017, - 240832, - 156022, - 198663, - 207703, - 228967, - 127585, - 100402, - 98566, - 604, - 312526, - 190859, - 49051, - 91314, - 184315 - ], - "mdbid": 28, - "created_at": "2015-02-17T05:01:32+0000", - "poster_paths": [ - "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", - "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", - "/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg", - "/lTbbt8otsYLKRDvELMRn83wdNoW.jpg", - "/sq2MmFv9sanl9PFMfbdaBLveSJ8.jpg", - "/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg", - "/4Y9PMR6hO2YWu2BrNhix4lHRA58.jpg", - "/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg", - "/coss7RgL0NH6g4fC2s5atvf3dFO.jpg", - "/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg", - "/2uWb0aSm5cFmRCHP95OdA6hvTEs.jpg", - "/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg", - "/pH4oeiZAh9a40tly4D0l6aAB3ms.jpg", - "/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg", - "/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg", - "/5B182VoY6ZJh0a6kbp9k9UPvl2D.jpg", - "/ooy5M7QXEWVpOTAZIRGMskBQbQ9.jpg", - "/h1XjBJoWdOh8aegBoVYKgABQZSL.jpg", - "/ykIZB9dYBIKV13k5igGFncT5th6.jpg", - "/jEeMN83CRI7lIEffTlgzBcUZzuN.jpg" - ] - }, - { - "title": "Adventure", - "backdrop_path": "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:32+0000", - "backdrop_paths": [ - "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", - "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", - "/umR9aXTxOxQUuDH2DamoJ5fIPB.jpg", - "/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg", - "/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg", - "/pckdZ29bHj11hBsV3SbVVfmCB6C.jpg", - "/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg", - "/4qfXT9BtxeFuamR4F49m2mpKQI1.jpg", - "/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg", - "/83nHcz2KcnEpPXY50Ky2VldewJJ.jpg", - "/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg", - "/hyR7Fs6Tepgu3yCQGtgO4Ilz9tY.jpg", - "/irHmdlkdJphmk4HPfyAQfklKMbY.jpg", - "/jjAq3tCezdlQduusgtMhpY2XzW0.jpg", - "/cHy7nSitAVgvZ7qfCK4JO47t3oZ.jpg", - "/pNPdcgHT1FpCmauzFWepyfDvDo9.jpg", - "/3FweBee0xZoY77uO1bhUOlQorNH.jpg", - "/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg", - "/hbn46fQaRmlpBuUrEiFqv0GDL6Y.jpg", - "/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg" - ], - "poster_path": "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", - "id": "54e2cb2cb1e3a30994751f33", - "mdbids": [ - 76757, - 177572, - 122917, - 118340, - 207703, - 62, - 127585, - 100402, - 98566, - 131631, - 604, - 57158, - 109445, - 49051, - 91314, - 184315, - 76338, - 82702, - 24428, - 170687 - ], - "mdbid": 12, - "created_at": "2015-02-17T05:01:32+0000", - "poster_paths": [ - "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", - "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", - "/vgAHvS0bT3fpcpnJqT6uDTUsHTo.jpg", - "/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg", - "/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg", - "/rT9w3tzk25jA8vl7KyvzUP5gHJV.jpg", - "/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg", - "/pH4oeiZAh9a40tly4D0l6aAB3ms.jpg", - "/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg", - "/cWERd8rgbw7bCMZlwP207HUXxym.jpg", - "/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg", - "/gQCiuxGsfiXH1su6lp9n0nd0UeH.jpg", - "/jIjdFXKUNtdf1bwqMrhearpyjMj.jpg", - "/h1XjBJoWdOh8aegBoVYKgABQZSL.jpg", - "/ykIZB9dYBIKV13k5igGFncT5th6.jpg", - "/jEeMN83CRI7lIEffTlgzBcUZzuN.jpg", - "/aROh4ZwLfv9tmtOAsrnkYTbpujA.jpg", - "/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg", - "/cezWGskPY5x7GaglTTRN4Fugfb8.jpg", - "/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg" - ] - }, - { - "title": "Animation", - "backdrop_path": "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:33+0000", - "backdrop_paths": [ - "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", - "/irHmdlkdJphmk4HPfyAQfklKMbY.jpg", - "/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg", - "/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg", - "/GtodNrQnorVd3Gv6f6i4bdEwkP.jpg", - "/mkzpFIJmndBOfUteS7n3fI04lX3.jpg", - "/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg", - "/agaDrrefPwOBMxSe9SIkq5zS4tQ.jpg", - "/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg", - "/lVshZpxU5EB8zXJrnXxblaDps6m.jpg", - "/1DMrM1RDSClzeabdrTejEYtTFMU.jpg", - "/clvgKN7DWTXm4b81HAHNvcvkBqX.jpg", - "/rmgxcw8tGTmdhsWqdjGBS9uI1tO.jpg", - "/oDqbewoFuIEWA7UWurole6MzDGn.jpg", - "/yIAxebMW8bvGJhZO8Q3TSi4zMDQ.jpg", - "/pQPRp30zd0BSaefterJnLmh4Rs9.jpg", - "/nMulOcoR6HAahofkcuo4mtA0o9j.jpg", - null, - "/3MET6hEfk8n8i0KFRq9BHnJq7ju.jpg", - "/n2vIGWw4ezslXjlP0VNxkp9wqwU.jpg" - ], - "poster_path": "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", - "id": "54e2cb2da88c820980760614", - "mdbids": [ - 177572, - 109445, - 82702, - 170687, - 270946, - 322456, - 137106, - 293299, - 316322, - 228326, - 228165, - 11970, - 93456, - 425, - 297556, - 76492, - 10191, - 302960, - 218836, - 12 - ], - "mdbid": 16, - "created_at": "2015-02-17T05:01:33+0000", - "poster_paths": [ - "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", - "/jIjdFXKUNtdf1bwqMrhearpyjMj.jpg", - "/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg", - "/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg", - "/eCdQdoqG9kQQbzPnbVDXqwoTgLl.jpg", - "/qTVlKThCmXOFryiiTJHBMgHhdAv.jpg", - "/lMHbadNmznKs5vgBAkHxKGHulOa.jpg", - "/4XFN435sO7t9sMiWGMtWcV9qfmq.jpg", - "/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg", - "/fhq87M6NNXqYH4OUoIfsM6oDUA3.jpg", - "/9wChSuUoQDiBKUnGTcYMkzRha60.jpg", - "/eFlBFMAifj436QctX3akDkUnhlk.jpg", - "/kQrYyZQHkwkUg2KlUDyvymj9FAp.jpg", - "/zpaQwR0YViPd83bx1e559QyZ35i.jpg", - "/3n0zmm2dPF0TQt2ikJ2tUjKr2FT.jpg", - "/8DGGcTCl47s1tmzSLxUNLXDcJge.jpg", - "/zMAm3WYmvD40FaWFsOmpicQFabz.jpg", - "/Mx9dBrZaVJlFmdebfao08FO6Z.jpg", - "/b5Xn7UQf7s6ZPsDTVT0NeLqiiHY.jpg", - "/zjqInUwldOBa0q07fOyohYCWxWX.jpg" - ] - }, - { - "title": "Comedy", - "backdrop_path": "/7OluTl9LoaMDZ2MVdrFVuU2os09.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:32+0000", - "backdrop_paths": [ - "/7OluTl9LoaMDZ2MVdrFVuU2os09.jpg", - "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", - "/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg", - "/pMNSiNT55XrxWPmoI5ytJyinRa8.jpg", - "/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg", - "/p5n7VTC6qmFIuBFjACWURYCAlKP.jpg", - "/43GrPpAeBUOvOCZ8L1A3MLuDnkc.jpg", - "/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg", - "/3AZX2KB73kSza76h9O4bzdNeIac.jpg", - "/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg", - "/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg", - "/GtodNrQnorVd3Gv6f6i4bdEwkP.jpg", - "/73hI1zgRALUDrB46JDPBLFqHcqv.jpg", - "/USKXUGMT9PZHzq91F5Beuged7.jpg", - "/cANfw6Yh10QC4F3mKcLZ4VoUzhA.jpg", - "/3hOPv3w5mmPV3MA9fk0nPI5MyXV.jpg", - "/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg", - "/z5e275a7iDNCQNx0NelsX5LYmDU.jpg", - "/dYtAyg4vD88hIfrR1VKDnVGhnE6.jpg", - "/6YEWKSFIWFTLnInzXYiSaS7pVOP.jpg" - ], - "poster_path": "/zRkLCOx7o9tjPYb9s7u6mpw8VOs.jpg", - "id": "54e2cb2ca88c820980760611", - "mdbids": [ - 227159, - 177572, - 194662, - 100042, - 207703, - 228967, - 193893, - 98566, - 120467, - 82702, - 170687, - 270946, - 181533, - 225886, - 239563, - 244264, - 137106, - 218778, - 106646, - 82693 - ], - "mdbid": 35, - "created_at": "2015-02-17T05:01:32+0000", - "poster_paths": [ - "/zRkLCOx7o9tjPYb9s7u6mpw8VOs.jpg", - "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", - "/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg", - "/Ekw3ijq9L6RiKvv5m2tPOEklHF.jpg", - "/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg", - "/2uWb0aSm5cFmRCHP95OdA6hvTEs.jpg", - "/8GVU8AaYpxiIS462SZgAtjh02pm.jpg", - "/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg", - "/nX5XotM9yprCKarRH4fzOq1VM1J.jpg", - "/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg", - "/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg", - "/eCdQdoqG9kQQbzPnbVDXqwoTgLl.jpg", - "/tWwASv4CU1Au1IukacdSUewDCV3.jpg", - "/bYY46f0PSLJTXzitxGOCd00rj3Y.jpg", - "/w0hzr4eQBk1X4m63fb7sOSt9Bnn.jpg", - "/dNcoXoRC7JHiqbe7k5Ufo6syiPP.jpg", - "/lMHbadNmznKs5vgBAkHxKGHulOa.jpg", - "/yup7xOCpOSHeUyalUH6mpFuBDpG.jpg", - "/wAgdJRx4uZ0u4uzu34NOMvtjLAR.jpg", - "/ilrZAV2klTB0FLxLb01bOp5pzD9.jpg" - ] - }, - { - "title": "Crime", - "backdrop_path": "/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:33+0000", - "backdrop_paths": [ - "/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg", - "/ts4j3zYaPzdUVF3ijBeBdGVDWjX.jpg", - "/pbZtww8VsNDSwt9eMnG0faELwYV.jpg", - "/rKESeEePWWu4rATQDJOktllaDDv.jpg", - "/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg", - "/e56QsaJy1weAUukiK2ZmIGVUALF.jpg", - "/qjfE7SkPXpqFs8FX8rIaG6eO2aK.jpg", - "/nnMC0BM6XbjIIrT4miYmMtPGcQV.jpg", - "/zddiDFf3X97pCimAOGKh3m0PwJV.jpg", - "/6AocjTM7B0RII4qrXG40wI1rEF3.jpg", - "/biw5Nn85iBZZd8GWYO9XXH56VK2.jpg", - "/3bgtUfKQKNi3nJsAB5URpP2wdRt.jpg", - "/khzRw7ZDE3NIrYpe0RYyB864FPT.jpg", - "/dYtAyg4vD88hIfrR1VKDnVGhnE6.jpg", - "/d5vwBiuJI1a2hBcGjhsWhpmAkL7.jpg", - "/oSno71x3xS7ic311ktzzpVjxzEF.jpg", - "/6V4Ni0ap3yreqSRVfBrzFcryC6f.jpg", - "/hMuPjDgT3MyZkGpST4vky8t0m6h.jpg", - "/9NmTVqQ9f2ltecPZgXIj4Bk2c6s.jpg", - "/8Od5zV7Q7zNOX0y9tyNgpTmoiGA.jpg" - ], - "poster_path": "/lTbbt8otsYLKRDvELMRn83wdNoW.jpg", - "id": "54e2cb2d8fc9090996d2de7e", - "mdbids": [ - 260346, - 242582, - 265208, - 156022, - 207703, - 169917, - 82992, - 155, - 154400, - 245916, - 201088, - 49026, - 189, - 106646, - 8681, - 254904, - 206563, - 192102, - 187017, - 1422 - ], - "mdbid": 80, - "created_at": "2015-02-17T05:01:33+0000", - "poster_paths": [ - "/lTbbt8otsYLKRDvELMRn83wdNoW.jpg", - "/fukWJhLISH7f6cnYSdgb0JrSP2Q.jpg", - "/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg", - "/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg", - "/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg", - "/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg", - "/kBXgGUt07sLpw6rhpiYwEyOwUDa.jpg", - "/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg", - "/lj8AMCjWx0jU93XajzUEOUUNKZF.jpg", - "/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg", - "/tn07zjNNIJuOsecqTC2JEYA49uU.jpg", - "/dEYnvnUfXrqvqeRSqvIEtmzhoA8.jpg", - "/k80qKrJ0qQ6ocVo5N932stNSg6j.jpg", - "/wAgdJRx4uZ0u4uzu34NOMvtjLAR.jpg", - "/q2ufZ5zgbyvwSVR9J5wR6nEAEyy.jpg", - "/lcg1bkriMVvc8m0jz5zk0yvzVTA.jpg", - "/sE9OHijLpDXsMlaiLR2NEsi0VYP.jpg", - "/mj1aAY5WbVhb62nw3MvZinsbhke.jpg", - "/gNlV5FhDZ1PjxSv2aqTPS30GEon.jpg", - "/tGLO9zw5ZtCeyyEWgbYGgsFxC6i.jpg" - ] - }, - { - "title": "Documentary", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:33+0000", - "backdrop_paths": [ - null, - "/hYeLTWIWeP9KdKxjcYnhpvO12EY.jpg", - "/vraH686DWdoM3yD8G0lWuPSpGys.jpg", - null, - null, - "/4pimMgJLY3LnAG1hqVK1aMpZvBw.jpg", - "/uqq2Pdb9eWXQz0Fe8IMpDvbOutD.jpg", - "/y4n7ShCGahGalW2j8eP4uSlEo8y.jpg", - "/bBpiHSUo4L5rN6qJ8Drqx79i9QA.jpg", - "/vcB1yzRxVQxsZrWS4uVxBz1Ia8Q.jpg", - "/rkXYAvWjHATFWE4fSdL5ziIrLBe.jpg", - null, - "/q7A6qCqmy6daaqGRm3Ee3NUC3xN.jpg", - "/qiQTwNmLWZfm5HWAQkfAMBnISLN.jpg", - "/sYicgyXd0uYqf9gjuBdbfT0zj3r.jpg", - "/vkYLK9JtA5liuPrZhhgrqfVviMy.jpg", - null, - null, - "/7y4vgRqEMyJzU3Rk8UzaPs2EA3r.jpg", - "/tED08RIEfQBC2g8xGhpaYwIkQXM.jpg" - ], - "poster_path": "/jFe3aZZCW7uw1nUltNcKalOXI53.jpg", - "id": "54e2cb2da88c820980760615", - "mdbids": [ - 316020, - 181330, - 325338, - 323356, - 320662, - 225570, - 65851, - 74510, - 253294, - 14158, - 183392, - 324558, - 16290, - 191720, - 293310, - 84383, - 324686, - 325572, - 105978, - 39312 - ], - "mdbid": 99, - "created_at": "2015-02-17T05:01:33+0000", - "poster_paths": [ - "/jFe3aZZCW7uw1nUltNcKalOXI53.jpg", - "/jxbSeJkTzPKcikzCFQ33SKLGyvD.jpg", - "/9fs7cAuHLtkuwhYDRSVbMh3eeZz.jpg", - "/aDxGkwCH16lbWwJLehByhB3OdsE.jpg", - "/iakIbfoGC5qp47ZNDEAgZtd4ndl.jpg", - "/kWqcqy0iaG2WWHnykQ0ZcNjx5A5.jpg", - "/ppjN0BZaOJ6aHMXsECHJ0dpFb8Z.jpg", - "/kOkmvY2kjZfilgr4PQBz3plK5nE.jpg", - "/trDmWmPZOQJAcY4flL6yx0kdqjS.jpg", - "/jNSufmwIL6tsIOhTZ1FN47Mdf4T.jpg", - "/snmfymyvgeWDoV8xUClnKEiymmB.jpg", - "/ihEh03PnTrK2sfeiu04JlW5N25D.jpg", - "/ann60e6DLDG0cnjyvkFJAoN7rWx.jpg", - "/c8zcrYHsAg9R9oEbfdRhwslDwnp.jpg", - "/yNuLhb2y6I5cO7BfiJ7bdfllnIG.jpg", - "/uZMItnAF4KW7aS5XwTyL4Pe28Ji.jpg", - null, - "/3SpRVNuZcvvCvN58nkpHIYzS6kB.jpg", - "/r8jSbyvnBDcy8YrTsQ9Auzm4eNI.jpg", - "/v5E4hs8eMHWhUk2xlQqEYtkJbmp.jpg" - ] - }, - { - "title": "Drama", - "backdrop_path": "/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:32+0000", - "backdrop_paths": [ - "/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg", - "/nnY2XnO3zjpkdq7xxOZPyI1r6V0.jpg", - "/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg", - "/pKawqrtCBMmxarft7o1LbEynys7.jpg", - "/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg", - "/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg", - "/ts4j3zYaPzdUVF3ijBeBdGVDWjX.jpg", - "/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg", - "/pbZtww8VsNDSwt9eMnG0faELwYV.jpg", - "/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg", - "/qzIu5zbI190k6BHbYgaQA93IZ9K.jpg", - "/geAe08WmchATnZF461WffQBqJk1.jpg", - "/f0HeQdnuFkboXWGBgqtwYUKgLZw.jpg", - "/e56QsaJy1weAUukiK2ZmIGVUALF.jpg", - "/3AZX2KB73kSza76h9O4bzdNeIac.jpg", - "/rjUl3pd1LHVOVfG4IGcyA1cId5l.jpg", - "/nnMC0BM6XbjIIrT4miYmMtPGcQV.jpg", - "/zddiDFf3X97pCimAOGKh3m0PwJV.jpg", - "/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg", - "/6AocjTM7B0RII4qrXG40wI1rEF3.jpg" - ], - "poster_path": "/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg", - "id": "54e2cb2ca88c820980760612", - "mdbids": [ - 194662, - 216015, - 244786, - 228150, - 210577, - 49017, - 242582, - 205596, - 265208, - 157336, - 205587, - 266856, - 85350, - 169917, - 120467, - 119450, - 155, - 154400, - 72190, - 245916 - ], - "mdbid": 18, - "created_at": "2015-02-17T05:01:32+0000", - "poster_paths": [ - "/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg", - "/vHX9fxgipKgp9UXJxYNzyhnypQl.jpg", - "/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg", - "/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg", - "/gdiLTof3rbPDAmPaCf4g6op46bj.jpg", - "/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg", - "/fukWJhLISH7f6cnYSdgb0JrSP2Q.jpg", - "/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg", - "/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg", - "/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg", - "/hNnecAVTBdtNXoSdhDXIPKm0SVu.jpg", - "/4jspr8hLLuju59bCnMiefzRW4p0.jpg", - "/eKi4e5zXhQKs0De4xu5AAMvu376.jpg", - "/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg", - "/nX5XotM9yprCKarRH4fzOq1VM1J.jpg", - "/2EUAUIu5lHFlkj5FRryohlH6CRO.jpg", - "/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg", - "/lj8AMCjWx0jU93XajzUEOUUNKZF.jpg", - "/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg", - "/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg" - ] - }, - { - "title": "Family", - "backdrop_path": "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:32+0000", - "backdrop_paths": [ - "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", - "/irHmdlkdJphmk4HPfyAQfklKMbY.jpg", - "/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg", - "/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg", - "/GtodNrQnorVd3Gv6f6i4bdEwkP.jpg", - "/73hI1zgRALUDrB46JDPBLFqHcqv.jpg", - "/mkzpFIJmndBOfUteS7n3fI04lX3.jpg", - "/scVPsqO1MryjgbJuGg2JsWTE3WD.jpg", - "/9bd6IFBMwSOINrEW8VIBxaS4cd9.jpg", - "/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg", - "/z5e275a7iDNCQNx0NelsX5LYmDU.jpg", - "/agaDrrefPwOBMxSe9SIkq5zS4tQ.jpg", - "/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg", - "/lVshZpxU5EB8zXJrnXxblaDps6m.jpg", - "/clvgKN7DWTXm4b81HAHNvcvkBqX.jpg", - "/rmgxcw8tGTmdhsWqdjGBS9uI1tO.jpg", - "/x4N74cycZvKu5k3KDERJay4ajR3.jpg", - "/8tuHQglvFEHDASvagt3m5nAam9O.jpg", - "/oDqbewoFuIEWA7UWurole6MzDGn.jpg", - "/oPmZDHPkdmhuvxYGmwtKcQefeNr.jpg" - ], - "poster_path": "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", - "id": "54e2cb2ca88c820980760613", - "mdbids": [ - 177572, - 109445, - 82702, - 170687, - 270946, - 181533, - 322456, - 68737, - 102651, - 137106, - 218778, - 293299, - 316322, - 228326, - 11970, - 93456, - 105, - 1593, - 425, - 12445 - ], - "mdbid": 10751, - "created_at": "2015-02-17T05:01:32+0000", - "poster_paths": [ - "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", - "/jIjdFXKUNtdf1bwqMrhearpyjMj.jpg", - "/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg", - "/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg", - "/eCdQdoqG9kQQbzPnbVDXqwoTgLl.jpg", - "/tWwASv4CU1Au1IukacdSUewDCV3.jpg", - "/qTVlKThCmXOFryiiTJHBMgHhdAv.jpg", - "/saJi9Vs37zLmUENyIEdhgURk3a1.jpg", - "/4FYu1AAu14tuBU0lns0hbKiHUcH.jpg", - "/lMHbadNmznKs5vgBAkHxKGHulOa.jpg", - "/yup7xOCpOSHeUyalUH6mpFuBDpG.jpg", - "/4XFN435sO7t9sMiWGMtWcV9qfmq.jpg", - "/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg", - "/fhq87M6NNXqYH4OUoIfsM6oDUA3.jpg", - "/eFlBFMAifj436QctX3akDkUnhlk.jpg", - "/kQrYyZQHkwkUg2KlUDyvymj9FAp.jpg", - "/pTpxQB1N0waaSc3OSn0e9oc8kx9.jpg", - "/NUbCSwy2EQ9Z6psUjPqr3WdVI2.jpg", - "/zpaQwR0YViPd83bx1e559QyZ35i.jpg", - "/7xmtxRc9nQnCuWINuTT4SMP5NJc.jpg" - ] - }, - { - "title": "Fantasy", - "backdrop_path": "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:33+0000", - "backdrop_paths": [ - "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", - "/umR9aXTxOxQUuDH2DamoJ5fIPB.jpg", - "/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg", - "/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg", - "/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg", - "/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg", - "/hyR7Fs6Tepgu3yCQGtgO4Ilz9tY.jpg", - "/jjAq3tCezdlQduusgtMhpY2XzW0.jpg", - "/3FweBee0xZoY77uO1bhUOlQorNH.jpg", - "/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg", - "/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg", - "/73hI1zgRALUDrB46JDPBLFqHcqv.jpg", - null, - "/scVPsqO1MryjgbJuGg2JsWTE3WD.jpg", - "/9bd6IFBMwSOINrEW8VIBxaS4cd9.jpg", - "/LvmmDZxkTDqp0DX7mUo621ahdX.jpg", - "/tmFDgDmrdp5DYezwpL0ymQKIbnV.jpg", - "/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg", - "/dG4BmM32XJmKiwopLDQmvXEhuHB.jpg", - "/pIUvQ9Ed35wlWhY2oU6OmwEsmzG.jpg" - ], - "poster_path": "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", - "id": "54e2cb2db1e3a3099c7513ce", - "mdbids": [ - 76757, - 122917, - 49017, - 118340, - 127585, - 98566, - 57158, - 49051, - 76338, - 82702, - 170687, - 181533, - 246655, - 68737, - 102651, - 10195, - 102382, - 137106, - 121, - 120 - ], - "mdbid": 14, - "created_at": "2015-02-17T05:01:33+0000", - "poster_paths": [ - "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", - "/vgAHvS0bT3fpcpnJqT6uDTUsHTo.jpg", - "/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg", - "/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg", - "/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg", - "/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg", - "/gQCiuxGsfiXH1su6lp9n0nd0UeH.jpg", - "/h1XjBJoWdOh8aegBoVYKgABQZSL.jpg", - "/aROh4ZwLfv9tmtOAsrnkYTbpujA.jpg", - "/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg", - "/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg", - "/tWwASv4CU1Au1IukacdSUewDCV3.jpg", - "/95wDIXF97wk6h3ZGZgX0ztsiETk.jpg", - "/saJi9Vs37zLmUENyIEdhgURk3a1.jpg", - "/4FYu1AAu14tuBU0lns0hbKiHUcH.jpg", - "/bIuOWTtyFPjsFDevqvF3QrD1aun.jpg", - "/ha1FI2U5QF1L7Avb0mqxSgnXlbZ.jpg", - "/lMHbadNmznKs5vgBAkHxKGHulOa.jpg", - "/5o5fv1dHG7vWoH2hmqwihVPBoBm.jpg", - "/9HG6pINW1KoFTAKY3LdybkoOKAm.jpg" - ] - }, - { - "title": "Foreign", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:33+0000", - "backdrop_paths": [ - null, - "/z6Vnp7oV4wgrmGNuRw8WH1BpK8G.jpg", - "/tSuyqQmImPqheZOVLFaHNOG4Emd.jpg", - "/sMe6xHHrDVDF9ap8CZgNT0gWtBn.jpg", - "/uUoOPv3gohxLOJdhZ0D2OLctmBV.jpg", - "/oIdAuFg8gNRV2a3QCD6NBDpTFBR.jpg", - "/2JJSyQX2elrTY7sqHwCl1xrsCdy.jpg", - "/iaVBYxaXOZvVoxRopmUzGWr8RNV.jpg", - "/xHsqBcDy5VvV4MuI974HuIoRRQc.jpg", - "/yClF0KasgIupP7Rnkglq5h104LD.jpg", - "/5pyfKiChqJg3cZGn1EM9rIWXALl.jpg", - "/kMLevYmOdG49u1SdlQYCyX5pU5n.jpg", - "/Aa6FlC0W2sljzujYtwrSTry2oVS.jpg", - "/mOz8GDmE5em5o7ImqiMEIN35qqz.jpg", - "/tGtrYbrkBaSBI6wLgtLzvFZsbDh.jpg", - "/npwldtkS6hzeOuXGvBUNRL7N4Jo.jpg", - "/iwUNi6undqtiq0FMNduGjfPs2u.jpg", - "/fIdGH6HpsEOuxkRaRFc1KR5BH5D.jpg", - "/ykJm8JHcuzju5TnM1H4Z8rN56cA.jpg", - "/uOL6xMF1bm5TMb45YTnImByVLfU.jpg" - ], - "poster_path": "/lKqtEqj1wHal0deTXEOZ2co9eEv.jpg", - "id": "54e2cb2db1e3a3099c7513cf", - "mdbids": [ - 114876, - 186929, - 81527, - 127533, - 11573, - 1075, - 23383, - 3631, - 67308, - 29457, - 10835, - 62377, - 797, - 439, - 1808, - 44092, - 10582, - 11906, - 10912, - 11876 - ], - "mdbid": 10769, - "created_at": "2015-02-17T05:01:33+0000", - "poster_paths": [ - "/lKqtEqj1wHal0deTXEOZ2co9eEv.jpg", - "/esDodQMU7j7RRCCvSyhrAlJUtpv.jpg", - "/mBFWp7PAkyTqhqVRDOAEUPLsAh9.jpg", - "/rmBUaljPj6SJVArR68fHl41oJU4.jpg", - "/3VajbHc64y2364LbgtYdLFQRCoP.jpg", - "/7q96evV2xWjvkO4fMdqe8vixKb8.jpg", - "/uiVgc8bCQm6PvQtGG0G1o41Fg4i.jpg", - "/b5fVWYALsSG08JQLHM0puZrhM2u.jpg", - "/8BpbXzSfnQSm3lveCm4h0j08cB7.jpg", - "/dqjTpLIyt3hIGVrIbaymWWTTeHg.jpg", - "/nP4zPLx3crdVVlt4U8JfFmnPdgO.jpg", - "/6ZAopX7i8sOAKekRftwQVavjZvl.jpg", - "/cjAnlvCrp9ZY7atASUsxRrhve7o.jpg", - "/aU7WLwPVCOoonAPWOPBmZ8X0c3c.jpg", - "/qj18ZymP4Xpwgj44mHf8HxFh6Au.jpg", - "/8PZeqDpC3QR67y5d6rMKgzFfQIh.jpg", - "/mLGbcNaheCzI8kYKl07yzs84jA8.jpg", - "/ccMPzxtnr5WcHaiwIN4P7mXoJzo.jpg", - "/yp9rIYBtoJBT6nKo4IFzlQZCFi5.jpg", - "/qombCbObrG6sNEIrsGBllkshZOg.jpg" - ] - }, - { - "title": "History", - "backdrop_path": "/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:32+0000", - "backdrop_paths": [ - "/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg", - "/aMjbjiH0mTUmHVLmYFTTdG5fMZQ.jpg", - "/fsjg1cEgXpO9TkxtmiAcLU8rnHd.jpg", - "/xnRPoFI7wzOYviw3PmoG94X2Lnc.jpg", - "/hAQKDTVKk04LWn82OYWLBPpsaVa.jpg", - "/1A2qOz9zgfG51LCZivXKLPbO88u.jpg", - "/mXJnEzFHmchkMkuvaJ25eV4qWL5.jpg", - "/lYJedpGH3p4oWyVabsekwkULNvz.jpg", - "/lcRGF2RpurdvBiSQVocfzRrxV9u.jpg", - "/sHsPEij3nojL34xcnaLdnuKEfmH.jpg", - "/6Q4GeMo08AOJJos9BzgnutFiZTG.jpg", - "/4y5TDUZlqUmWWtjTAznWb6CFpzt.jpg", - "/3hGRV0xR11aUxCGAJ52F8MTxrno.jpg", - "/q83wt7MsAWHNN1jNFXQb0bnCghe.jpg", - "/exb7qw4BPOwBr0qlxIsEKc3TCR.jpg", - "/rIpSszng8P0DL0TimSzZbpfnvh1.jpg", - "/kV0wiMw24cgac7BqcppgkmUSGIw.jpg", - "/mYNXGr8HNS1TO7wrQVSywrlduk9.jpg", - "/fJQ5kjLx4UdK05MC323Vlzwr6S8.jpg", - "/z7tLZ3c17Ch6qGIhUuiXBGGwHv0.jpg" - ], - "poster_path": "/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg", - "id": "54e2cb2cb1e3a3099c7513cd", - "mdbids": [ - 205596, - 891, - 273895, - 76203, - 45269, - 97630, - 197, - 319633, - 14756, - 279, - 76649, - 857, - 152532, - 152760, - 115782, - 424, - 665, - 3580, - 140823, - 967 - ], - "mdbid": 36, - "created_at": "2015-02-17T05:01:32+0000", - "poster_paths": [ - "/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg", - "/jh4aA8tryNy1QDiQzkE1kzPqkwc.jpg", - "/xj1H3dpEHhouyJNB1lfpkKf9fXX.jpg", - "/kb3X943WMIJYVg4SOAyK0pmWL5D.jpg", - "/v8M5Sytbut7vBXyZ1HDy8lUVVcB.jpg", - "/y0hJt5WurqDplEzTnrrMCwE1YIZ.jpg", - "/2qAgGeYdLjelOEqjW9FYvPHpplC.jpg", - "/AmkLAKsETY0ZDTNGfXgybOmMGXF.jpg", - "/8knFfuqW289DJi2cpPl4RVTDkbo.jpg", - "/flnoqdC38mbaulAeptjynOFO7yi.jpg", - "/x1QMhNN6dNghhqltcZKBEMuWQ9g.jpg", - "/35CMz4t7PuUiQqt5h4u5nbrXZlF.jpg", - "/aoxYci1HnJdb4bno2jYSnzSGDkL.jpg", - "/m4puTcUAFtFJBLMVoRs0FLk3ET3.jpg", - "/ioI5pOOr5yWZAAZPEts5oSQwUrT.jpg", - "/yPisjyLweCl1tbgwgtzBCNCBle.jpg", - "/syPMBvvZsADTTRu3UKuxO1Wflq.jpg", - "/qtte2n6ygA1zVG5kLrjUGui28TJ.jpg", - "/mvs3reS18RP6IhjLwwLeVtkoeg0.jpg", - "/h5D65IPpYPmuBjIPWBTA557BQFS.jpg" - ] - }, - { - "title": "Horror", - "backdrop_path": "/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:33+0000", - "backdrop_paths": [ - "/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg", - "/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg", - "/pJXFPBOild76vDAiapX5BOTtj2B.jpg", - "/2ROsQqKfy7f1uqsF8bTC7Vg0ui2.jpg", - "/tgXaHtpmxj4SkMxBTi1Desl6Mc6.jpg", - "/5G5rOi7Qkg5F3u94vpy1lrwr06W.jpg", - "/kTvGzXv4lIoQAOU8hAvdZtnEqy0.jpg", - "/6kazrydTbHlqKzE5h2xUejDgIec.jpg", - "/8iNsXY3LPsuT0gnUiTBMoNuRZI7.jpg", - "/4eGiNZtn6hMJvXfXuhoGmlJnk6e.jpg", - "/snnEAySuzjY7qmCQ5mJpxin7G6d.jpg", - "/vXVTd1owgGyemXKgJUnMLS33NOV.jpg", - "/7gTvjByEOx959HtetwcczO2eOJi.jpg", - "/214TKe8WBBbFXVrBRV9RECeE4oW.jpg", - "/8pCFurneAWouGbBMEoBHqU1ejbb.jpg", - "/9cs9RuOS3A5YEh6r4opVrIGbiJy.jpg", - "/vMNl7mDS57vhbglfth5JV7bAwZp.jpg", - "/rzzabQ2HNUDil53Zfueu0iyasgB.jpg", - "/cQXlDYsxdSJg9quBIM8IgpphAon.jpg", - "/elCm3CYwflEV6EaZdyf9zgS699i.jpg" - ], - "poster_path": "/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg", - "id": "54e2cb2d8fc9090996d2de80", - "mdbids": [ - 49017, - 72190, - 242512, - 238636, - 679, - 254191, - 36647, - 609, - 52520, - 7340, - 298032, - 312791, - 133805, - 22970, - 250546, - 1250, - 348, - 100241, - 246741, - 10304 - ], - "mdbid": 27, - "created_at": "2015-02-17T05:01:33+0000", - "poster_paths": [ - "/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg", - "/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg", - "/i52JCZSHDvkHtjQwlPqMAsjULVH.jpg", - "/l1DRl40x2OWUoPP42v8fjKdS1Z3.jpg", - "/nORMXEkYEbzkU5WkMWMgRDJwjSZ.jpg", - "/5jZRisBShiBpsH2k5rDYGEl9fSh.jpg", - "/KIyDkxJDCpew51Vni8FkHaLkon.jpg", - "/v0ZEUCfwsvUSuqU1bt7L0LJGx2p.jpg", - "/76GXWKs2IDi0ZERKLT57wkToV0A.jpg", - "/A5qwZ3IGWglRZtiLOOwwLWYqVWk.jpg", - "/9Ivu97Dej7zD2G4xnaK8zkDWwJC.jpg", - "/w6lvw6zMnvVB1dAHGkUQ7tCLFpO.jpg", - "/3pFxLrjVFm0uMrMG4B39opOfpqF.jpg", - "/t8cW3FSCDYCaWRiNHSvI6SDuWeA.jpg", - "/yAgxM61Sn0dYML4C9v3MJFp5zPI.jpg", - "/jnllnSq8u4d1oQPU7PsoAHD6bLU.jpg", - "/uU9R1byS3USozpzWJ5oz7YAkXyk.jpg", - "/amJHZ4eOMpqyKo1GK33HFV55zue.jpg", - "/tqUjvYvigCapKws9BbOOZ10sSJA.jpg", - "/xoQpKbnmGPuZub5NAPQq18hDEWA.jpg" - ] - }, - { - "title": "Music", - "backdrop_path": "/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:33+0000", - "backdrop_paths": [ - "/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg", - "/24uuwm3w99OYkV6qlfVfbG1IzKR.jpg", - "/8bXlXJtPAaSNYeWzdH4CG8TAsbJ.jpg", - "/iNj9LMS5APEHKsFLJdd5geQ94HM.jpg", - "/697HWfGtDmK5Yi5QTEL19Q8dzPL.jpg", - "/tRB98Z0qNL7TCaoDHMj88m1quSH.jpg", - "/fGq48GZp2PLVgx9IwW5lBf4DBYJ.jpg", - "/sHsPEij3nojL34xcnaLdnuKEfmH.jpg", - "/1jJVDNz5gan9WYuspnKAHwks39e.jpg", - "/xB3whEpbdc4zktvCBqNUvTiouw3.jpg", - "/hqNff5zochp9hzo299wC4Uoy8M9.jpg", - "/q8OEC91NiJOpghWI9hXtC27nFX0.jpg", - "/nXII61245PlG2vOH8Yl15WIhJFP.jpg", - "/vcLqVuSMx7dVfuOVKd4IL4RcMsa.jpg", - "/ngDmpFRzNGr9XMtKchhBZjt4DLH.jpg", - "/8oCkj3t9yvT363svYMssXqGxTRf.jpg", - "/dmcyvwz6AWBuxkZ1pRMJznC3Eb0.jpg", - "/aP9QSw2dFSARo7a59XDfl84lZ3a.jpg", - "/weiACHVZa0lQ10cd3BhJm9d8YUF.jpg", - "/z1nlvpCpMBitAiTSRvda3TxMyFr.jpg" - ], - "poster_path": "/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg", - "id": "54e2cb2db1e3a3099c7513d0", - "mdbids": [ - 244786, - 243683, - 206296, - 9762, - 85446, - 46992, - 8328, - 279, - 198277, - 224141, - 196867, - 10020, - 10693, - 114150, - 88, - 824, - 239566, - 27, - 15121, - 209361 - ], - "mdbid": 10402, - "created_at": "2015-02-17T05:01:33+0000", - "poster_paths": [ - "/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg", - "/zjzD9DLYNThg3JnPJJOxZc0sxhO.jpg", - "/nPHemX0bcR5OyGPdPVUpIgwFqex.jpg", - "/gyLww7ZlcwuzqvIwM1osR9Ioqtm.jpg", - "/bduyqAyMtPDs4m16F7SuLQtbcud.jpg", - "/2a3ZmHS7IrOGG46hrbSS3qJJk6d.jpg", - "/5SwoeOUyfkS8s6aGB2bLYAL5jKR.jpg", - "/flnoqdC38mbaulAeptjynOFO7yi.jpg", - "/og7KVMqGTFaCNPmGVetxtR30Q0z.jpg", - "/6QmmHozsDv7ktW0cejsS3IJFUlZ.jpg", - "/hkvKhuUUgjJ4jrXKkvqoQ5JnQx5.jpg", - "/vGyhh8XB1AnDhBc4ssxrrz6ihdX.jpg", - "/n69umC19fsIKXlQBm0eD6waSwpI.jpg", - "/qtKYrSlnrgLS7wrYvEbcxrtAAqa.jpg", - "/dPxXbKxpUnrlnKeQ8EGdFTocNjG.jpg", - "/vgYM0ZDoeQKZEGxrGAO221J5rIG.jpg", - "/cEHLYmhklMNiXiB9lolU7SLERu7.jpg", - "/bvGyYmmnQG5NPP7m2nuLhaiC8LH.jpg", - "/459fPVvI4lkEV0piSfcq0irKHi8.jpg", - "/uuQ5wd9EqbOP0MVa7TeZ8RpDiaC.jpg" - ] - }, - { - "title": "Mystery", - "backdrop_path": "/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:33+0000", - "backdrop_paths": [ - "/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg", - "/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg", - "/pckdZ29bHj11hBsV3SbVVfmCB6C.jpg", - "/e56QsaJy1weAUukiK2ZmIGVUALF.jpg", - "/6AocjTM7B0RII4qrXG40wI1rEF3.jpg", - "/aMjbjiH0mTUmHVLmYFTTdG5fMZQ.jpg", - "/8jpE0Y8InANvFz2FVKmliY4yCQY.jpg", - "/ok6Ws65nDSLAIKkKgIjqyM5OGCc.jpg", - "/s2bT29y0ngXxxu2IA8AOzzXTRhd.jpg", - "/8TE77jL2e4zdERpv8hnBAHUmFRx.jpg", - "/9dQlkIOMjIdNksOjDnz56OvpLkM.jpg", - "/9ISArgiVBdNLASKmvflRDMOYYMj.jpg", - "/dYw7d9wJIZVQdwFpRlx7OyAQxCN.jpg", - "/ba4CpvnaxvAgff2jHiaqJrVpZJ5.jpg", - "/112d2vGKkdrv4ZrjyKCi1vhKZoX.jpg", - "/rRhoMIqgdX9wEtRUOLsqXKkH9I0.jpg", - "/oZY3DOlEZbEZvRxWynWkFTe4UgE.jpg", - "/k8nSKp54r0j1uy9QwM9RaD3goah.jpg", - "/4SySh90NtCRG9SlWuVX5BkaLLRh.jpg", - "/whV2SlkXyH2fWf7a92SGwFQVMTZ.jpg" - ], - "poster_path": "/gdiLTof3rbPDAmPaCf4g6op46bj.jpg", - "id": "54e2cb2d8fc9090996d2de7f", - "mdbids": [ - 210577, - 198663, - 62, - 169917, - 245916, - 891, - 260202, - 13183, - 27205, - 75612, - 204922, - 51876, - 426, - 807, - 11324, - 70981, - 157353, - 10528, - 1124, - 171274 - ], - "mdbid": 9648, - "created_at": "2015-02-17T05:01:33+0000", - "poster_paths": [ - "/gdiLTof3rbPDAmPaCf4g6op46bj.jpg", - "/coss7RgL0NH6g4fC2s5atvf3dFO.jpg", - "/rT9w3tzk25jA8vl7KyvzUP5gHJV.jpg", - "/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg", - "/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg", - "/jh4aA8tryNy1QDiQzkE1kzPqkwc.jpg", - "/69blTptbjzu4lhBv9wl3lvBKWnw.jpg", - "/jXggcKzlyxj7yMBUIsqwiaaEtD5.jpg", - "/qmDpIHrmpJINaRKAfWQfftjCdyi.jpg", - "/hmOzkHlkGvi8x24fYpFSnXvjklv.jpg", - "/3UG2Pb122c7Va8MBtr1OHRB1YPh.jpg", - "/hGHmdbovLuPi1Vdr6JLp7LhqZ3s.jpg", - "/obhM86qyv8RsE69XSMTtT9FdE0b.jpg", - "/zgB9CCTDlXRv50Z70ZI4elJtNEk.jpg", - "/aZqKsvpJDFy2UzUMsdskNFbfkOd.jpg", - "/7D6S5JydrGqhvjtjUoQjQT5FR3z.jpg", - "/4eESVBvr7KEvPGUZVL5LDWsANda.jpg", - "/22ngurXbLqab7Sko6aTSdwOCe5W.jpg", - "/5MXyQfz8xUP3dIFPTubhTsbFY6N.jpg", - "/2fCg6FORkgRLpFIKlUg4gULIn1u.jpg" - ] - }, - { - "title": "Romance", - "backdrop_path": "/geAe08WmchATnZF461WffQBqJk1.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:33+0000", - "backdrop_paths": [ - "/geAe08WmchATnZF461WffQBqJk1.jpg", - "/qBZswxe7zqHEhfZXVHdlwjwSh7H.jpg", - "/9bd6IFBMwSOINrEW8VIBxaS4cd9.jpg", - "/3hOPv3w5mmPV3MA9fk0nPI5MyXV.jpg", - "/6YEWKSFIWFTLnInzXYiSaS7pVOP.jpg", - "/agaDrrefPwOBMxSe9SIkq5zS4tQ.jpg", - "/4f4tWe6uhwtuKMygfIAytR2W0pj.jpg", - "/lVshZpxU5EB8zXJrnXxblaDps6m.jpg", - "/3CbUdwyKnEcLSLkQYWJfi8H6gPO.jpg", - "/clvgKN7DWTXm4b81HAHNvcvkBqX.jpg", - "/24uuwm3w99OYkV6qlfVfbG1IzKR.jpg", - "/8bXlXJtPAaSNYeWzdH4CG8TAsbJ.jpg", - "/iNj9LMS5APEHKsFLJdd5geQ94HM.jpg", - "/whV2SlkXyH2fWf7a92SGwFQVMTZ.jpg", - "/jlU4FvYxUXaxyYM0worlD7wHdQj.jpg", - "/sAsTfl7KTalEZc2M5za8MWJB6mY.jpg", - "/697HWfGtDmK5Yi5QTEL19Q8dzPL.jpg", - "/iMBlLEjC74OQbQ60bubdF27P35K.jpg", - "/fGq48GZp2PLVgx9IwW5lBf4DBYJ.jpg", - "/g9Ug1tS5JT255V8VrpZBDx2EbVB.jpg" - ], - "poster_path": "/4jspr8hLLuju59bCnMiefzRW4p0.jpg", - "id": "54e2cb2db1e3a30994751f35", - "mdbids": [ - 266856, - 317121, - 102651, - 244264, - 82693, - 293299, - 152601, - 228326, - 41233, - 11970, - 243683, - 206296, - 9762, - 171274, - 2105, - 82023, - 85446, - 1597, - 8328, - 10068 - ], - "mdbid": 10749, - "created_at": "2015-02-17T05:01:33+0000", - "poster_paths": [ - "/4jspr8hLLuju59bCnMiefzRW4p0.jpg", - "/bTC4LPtLdnx9bleEcJJ08KVuIkv.jpg", - "/4FYu1AAu14tuBU0lns0hbKiHUcH.jpg", - "/dNcoXoRC7JHiqbe7k5Ufo6syiPP.jpg", - "/ilrZAV2klTB0FLxLb01bOp5pzD9.jpg", - "/4XFN435sO7t9sMiWGMtWcV9qfmq.jpg", - "/fsoTLnUXEUTNuVCBxAJMY0HPPd.jpg", - "/fhq87M6NNXqYH4OUoIfsM6oDUA3.jpg", - "/q8Pm7UpAqDdxo1Xnt29EHHAl2u2.jpg", - "/eFlBFMAifj436QctX3akDkUnhlk.jpg", - "/zjzD9DLYNThg3JnPJJOxZc0sxhO.jpg", - "/nPHemX0bcR5OyGPdPVUpIgwFqex.jpg", - "/gyLww7ZlcwuzqvIwM1osR9Ioqtm.jpg", - "/2fCg6FORkgRLpFIKlUg4gULIn1u.jpg", - "/dxkSApFLkKkcEQgjCH2KPwTHvw4.jpg", - "/4i77Qjxl8ppqquq2yMTKANp7qFZ.jpg", - "/bduyqAyMtPDs4m16F7SuLQtbcud.jpg", - "/omw5eaaPFgIo3IGJBbAF5xIiMLp.jpg", - "/5SwoeOUyfkS8s6aGB2bLYAL5jKR.jpg", - "/ft0NylB71zkkoEnFalNBBDWTXtS.jpg" - ] - }, - { - "title": "Science Fiction", - "backdrop_path": "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:33+0000", - "backdrop_paths": [ - "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", - "/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg", - "/eCgIoGvfNXrbSiQGqQHccuHjQHm.jpg", - "/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg", - "/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg", - "/pckdZ29bHj11hBsV3SbVVfmCB6C.jpg", - "/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg", - "/4qfXT9BtxeFuamR4F49m2mpKQI1.jpg", - "/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg", - "/83nHcz2KcnEpPXY50Ky2VldewJJ.jpg", - "/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg", - "/fCPqyqCppo0MruBqGXpz5pmUabU.jpg", - "/cHy7nSitAVgvZ7qfCK4JO47t3oZ.jpg", - "/rjUl3pd1LHVOVfG4IGcyA1cId5l.jpg", - "/hbn46fQaRmlpBuUrEiFqv0GDL6Y.jpg", - "/c07g3JVBJ6dSO50PsrNG1N5VYmu.jpg", - "/pmZtj1FKvQqISS6iQbkiLg5TAsr.jpg", - "/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg", - "/s9DKwK5fXzaqFOzkZkidkOk4KR9.jpg", - "/ZQixhAZx6fH1VNafFXsqa1B8QI.jpg" - ], - "poster_path": "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", - "id": "54e2cb2da88c820980760617", - "mdbids": [ - 76757, - 118340, - 240832, - 157336, - 198663, - 62, - 127585, - 100402, - 98566, - 131631, - 604, - 312526, - 91314, - 119450, - 24428, - 101299, - 1771, - 72190, - 206487, - 1726 - ], - "mdbid": 878, - "created_at": "2015-02-17T05:01:33+0000", - "poster_paths": [ - "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", - "/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg", - "/4Y9PMR6hO2YWu2BrNhix4lHRA58.jpg", - "/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg", - "/coss7RgL0NH6g4fC2s5atvf3dFO.jpg", - "/rT9w3tzk25jA8vl7KyvzUP5gHJV.jpg", - "/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg", - "/pH4oeiZAh9a40tly4D0l6aAB3ms.jpg", - "/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg", - "/cWERd8rgbw7bCMZlwP207HUXxym.jpg", - "/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg", - "/5B182VoY6ZJh0a6kbp9k9UPvl2D.jpg", - "/ykIZB9dYBIKV13k5igGFncT5th6.jpg", - "/2EUAUIu5lHFlkj5FRryohlH6CRO.jpg", - "/cezWGskPY5x7GaglTTRN4Fugfb8.jpg", - "/tAhSyLxpaZJCr1oc2a3flvC2B7x.jpg", - "/sBZs1jSybBRBXDwcCR8IOyHLUMc.jpg", - "/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg", - "/i1trVjOx8rpVQ4zMVvtm5YXG9yA.jpg", - "/s2IG9qXfhJYxIttKyroYFBsHwzQ.jpg" - ] - }, - { - "title": "TV Movie", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:33+0000", - "backdrop_paths": [ - null, - "/lBIU50ihAcSJtxrayTv1CmyP7r0.jpg", - "/3Kq2dwrhHPOZTlSCO78D6xt0twi.jpg", - "/7ZAUeJEbkTsFchCbHPuTQiyzAUi.jpg", - "/jh1RyJeB9ramb7lRlo2PhBH0PGE.jpg", - "/cRfp77R9uCGqrMQL4cU8SeQwlrm.jpg", - "/rtPtwVTo4RqumivX2zspSk8GyCy.jpg", - "/dFqXuO2prVc0GEJt3fkhT9uw7F.jpg", - "/irZdN7HNiBfZt61m146ugmasNwY.jpg", - "/ie6u0zegHcVJEtHSpYn0KgEogrD.jpg", - "/c8WBbyFXaV5mSZ0wMh6x1BImPwU.jpg", - "/kHvPwL8b8CJuXl5YD7URIkBiHla.jpg", - "/99HVdqFO3SYlHIIn1e3NWWxfqLR.jpg", - "/8HsZ5j58BcU9Hf2FvCfBbjr8FY5.jpg", - "/5aPnM6kDZ6YLXwRD6z8tUCjMhvr.jpg", - "/fvszcGGBnh7KPLKOuKu1FPsr9vZ.jpg", - "/p7kHtJDMuowURRgR9wsMIeu941M.jpg", - "/zbc9LCaJcwSLKQntBxxA2YoixQa.jpg", - "/voMLIvBs7Pi8Zs2UtBztBEZg1ZS.jpg" - ], - "id": "54e2cb2d8fc90956e0d464e4", - "mdbids": [ - 323384, - 256835, - 285135, - 47626, - 226360, - 287954, - 13187, - 13675, - 18637, - 74849, - 289394, - 64679, - 31428, - 325642, - 4546, - 217292, - 197624, - 13400, - 72115 - ], - "mdbid": 10770, - "created_at": "2015-02-17T05:01:33+0000", - "poster_paths": [ - null, - "/aGDVBwpxlA95mn7yTxwM8r0oTR0.jpg", - "/dafW2jgYi345RLn4cFoyCol4mUk.jpg", - "/kQXniShyRw5b0aEppkaWhesRelD.jpg", - "/7BduKfMtcj0nssxoy4mvvVB294h.jpg", - "/buoq7zYO4J3ttkEAqEMWelPDC0G.jpg", - "/3Bn0tc1BsheZwUQtvl10wTgQ16J.jpg", - "/sX9LQImeUYNuLZ137Uk7iOBjf4o.jpg", - "/xVTmmJdb5IKNbdT7dKOVARxoRTY.jpg", - "/gW02wV7kJBvcwHR3g3zInTCcwqF.jpg", - "/e4G3tVosLUOS6NdG2XwgBsYOcwl.jpg", - "/ll9H7W4fwZuGyKam03VAjT2oHfv.jpg", - "/vTkbuc3uRXCfprVHjJ3PIthVsTz.jpg", - "/nmVdWSfqTUhAH3HiOS8gbZHIQtt.jpg", - "/8QbyrbsW0eln4lBc7DtZyAJvl3h.jpg", - "/pABrtVmKsq1vXbP6CpTZbjXiu1l.jpg", - "/y1ChvzGMMI5eys69A1wKuRXpSma.jpg", - "/otO3xI0R7O3NcSy2cOFRLlxbSYA.jpg", - "/h3KI8SoEhk5im7HnlZAlXaDLjtB.jpg" - ] - }, - { - "title": "Thriller", - "backdrop_path": "/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:33+0000", - "backdrop_paths": [ - "/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg", - "/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg", - "/mFb0ygcue4ITixDkdr7wm1Tdarx.jpg", - "/gktL2rfE7d1xrwPSSTohxLOjLSs.jpg", - "/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg", - "/pbZtww8VsNDSwt9eMnG0faELwYV.jpg", - "/rKESeEePWWu4rATQDJOktllaDDv.jpg", - "/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg", - "/83nHcz2KcnEpPXY50Ky2VldewJJ.jpg", - "/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg", - "/fCPqyqCppo0MruBqGXpz5pmUabU.jpg", - "/e56QsaJy1weAUukiK2ZmIGVUALF.jpg", - "/qjfE7SkPXpqFs8FX8rIaG6eO2aK.jpg", - "/rjUl3pd1LHVOVfG4IGcyA1cId5l.jpg", - "/nnMC0BM6XbjIIrT4miYmMtPGcQV.jpg", - "/c07g3JVBJ6dSO50PsrNG1N5VYmu.jpg", - "/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg", - "/s9DKwK5fXzaqFOzkZkidkOk4KR9.jpg", - "/6AocjTM7B0RII4qrXG40wI1rEF3.jpg", - "/biw5Nn85iBZZd8GWYO9XXH56VK2.jpg" - ], - "poster_path": "/lTbbt8otsYLKRDvELMRn83wdNoW.jpg", - "id": "54e2cb2db1e3a30994751f34", - "mdbids": [ - 260346, - 210577, - 245891, - 242582, - 205596, - 265208, - 156022, - 198663, - 131631, - 604, - 312526, - 169917, - 82992, - 119450, - 155, - 101299, - 72190, - 206487, - 245916, - 201088 - ], - "mdbid": 53, - "created_at": "2015-02-17T05:01:33+0000", - "poster_paths": [ - "/lTbbt8otsYLKRDvELMRn83wdNoW.jpg", - "/gdiLTof3rbPDAmPaCf4g6op46bj.jpg", - "/sq2MmFv9sanl9PFMfbdaBLveSJ8.jpg", - "/8oPY6ULFOTbAEskySNhgsUIN4fW.jpg", - "/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg", - "/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg", - "/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg", - "/coss7RgL0NH6g4fC2s5atvf3dFO.jpg", - "/cWERd8rgbw7bCMZlwP207HUXxym.jpg", - "/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg", - "/5B182VoY6ZJh0a6kbp9k9UPvl2D.jpg", - "/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg", - "/kBXgGUt07sLpw6rhpiYwEyOwUDa.jpg", - "/2EUAUIu5lHFlkj5FRryohlH6CRO.jpg", - "/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg", - "/tAhSyLxpaZJCr1oc2a3flvC2B7x.jpg", - "/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg", - "/i1trVjOx8rpVQ4zMVvtm5YXG9yA.jpg", - "/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg", - "/tn07zjNNIJuOsecqTC2JEYA49uU.jpg" - ] - }, - { - "title": "War", - "backdrop_path": "/pKawqrtCBMmxarft7o1LbEynys7.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:33+0000", - "backdrop_paths": [ - "/pKawqrtCBMmxarft7o1LbEynys7.jpg", - "/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg", - "/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg", - "/7BhTIyySTmmqNaoguSPjZAVMoQG.jpg", - "/dwRCptswUg5T27EM6hyXPlObRbE.jpg", - "/krkkgbtWHlMXVLbPGdIxzxKJERM.jpg", - "/mXJnEzFHmchkMkuvaJ25eV4qWL5.jpg", - "/4y5TDUZlqUmWWtjTAznWb6CFpzt.jpg", - "/8Sh5rRcOrBy4AIm3keZ50dOIn4D.jpg", - "/7nF6B9yCEq1ZCT82sGJVtNxOcl5.jpg", - "/9iZJAidcAdkoYtVx6ywjFbD3Aek.jpg", - "/cD7lPdjFyf5dQIlc6ToehqFrIZU.jpg", - "/q83wt7MsAWHNN1jNFXQb0bnCghe.jpg", - "/5tc7kIF9MXLwSDyW61sj4jTvBxX.jpg", - "/rIpSszng8P0DL0TimSzZbpfnvh1.jpg", - "/nhHsH7qUySVTY57mxf231xO7Fga.jpg", - "/cVkTGLthpromkyzyCFLvvLPZxFM.jpg", - "/9GyBSsMiGkPSk4OESIYZuedijBI.jpg", - "/haOTy0A9tMaoEEWdoaGavBnPQfY.jpg", - "/cDctk61tUeQz4LX7tTFPknI28ea.jpg" - ], - "poster_path": "/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg", - "id": "54e2cb2d8fc9090996d2de81", - "mdbids": [ - 228150, - 49017, - 205596, - 190859, - 53182, - 193756, - 197, - 857, - 935, - 16869, - 227306, - 409, - 152760, - 1368, - 424, - 289, - 600, - 744, - 72976, - 676 - ], - "mdbid": 10752, - "created_at": "2015-02-17T05:01:33+0000", - "poster_paths": [ - "/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg", - "/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg", - "/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg", - "/ooy5M7QXEWVpOTAZIRGMskBQbQ9.jpg", - "/bRE7nmNuZzciep7MDkNfuTrM9zW.jpg", - "/c7Sqof18FgkoNcA0r5BFUcPLER1.jpg", - "/2qAgGeYdLjelOEqjW9FYvPHpplC.jpg", - "/35CMz4t7PuUiQqt5h4u5nbrXZlF.jpg", - "/ls9r2SG2IHJyCfpT0vxZZiT7ynF.jpg", - "/vDwqPyhkzFPRDmwz9KbzN2ouEPe.jpg", - "/e0etqHTsH7kSKR5orkUM5TjHXmy.jpg", - "/niqc0v3Lclh99Mmmxm49qZTIo2e.jpg", - "/m4puTcUAFtFJBLMVoRs0FLk3ET3.jpg", - "/jkzJg3WYFf2SPFVfyeRQL75vFzu.jpg", - "/yPisjyLweCl1tbgwgtzBCNCBle.jpg", - "/sm1QVZu5RKe1vXVHZooo4SZyHMx.jpg", - "/29veIwD38rVL2qY74emXQw4y25H.jpg", - "/orGXnBKfT41LxZhitLkXhqUfJJW.jpg", - "/gkkiDu9srCCbCMxGKwNwKCxK7KF.jpg", - "/gzjMpcyV1RksWonaA87DZ8wQTH0.jpg" - ] - }, - { - "title": "Western", - "backdrop_path": "/qUcmEqnzIwlwZxSyTf3WliSfAjJ.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T05:01:33+0000", - "backdrop_paths": [ - "/qUcmEqnzIwlwZxSyTf3WliSfAjJ.jpg", - "/tkxiEwG9xJIbyzvJSGYUyTkz3Mj.jpg", - "/vNNWdSVML7sXSzf4N4BLgVVKNFu.jpg", - "/lagdbLlNPVVbFczUgRnGjdeKeQC.jpg", - "/xGC2fY5KFmtuXnsuQwYQKFOLZFy.jpg", - "/tzJmubvEPw2etDhzqpA6Wb3K2EZ.jpg", - "/sgcgfrlOOB6lVXbfl75YTszF4jI.jpg", - "/wDPmggrApz7nxy4BAQk3rCLi3R6.jpg", - "/mndYimxcima4Z5YxH8XngTEGi5L.jpg", - "/gkW2RMlwl4kqaMIDjaAE73rAPpZ.jpg", - "/6A3UPYZEnMUlUgC7XOMntvdT0ni.jpg", - "/iob9MPYquOckNbhhjFUazRDlgGG.jpg", - "/gmapSsDGkPNPRxaQXLdotYkYKzM.jpg", - "/1tH9AnFjBFemdowMfDrnnhY8Y1z.jpg", - "/ftKZn79wtRqPdBJ95s5DGqbfhSy.jpg", - "/oTbK2deLtUKlIEpR7iU4acqnrZI.jpg", - "/pV3LyrIFTodujodc9mceF92zZog.jpg", - "/bhWbbMA70zc67Ba0OVLOFz8sRre.jpg", - "/izqIXYopCnJbL5LDm3X30RF8gLI.jpg", - "/nKYH8DaWjKE3RhEyaa0Ue01kPCp.jpg" - ], - "poster_path": "/5WJnxuw41sddupf8cwOxYftuvJG.jpg", - "id": "54e2cb2da88c820980760616", - "mdbids": [ - 68718, - 188161, - 266285, - 335, - 429, - 11072, - 57201, - 44264, - 391, - 581, - 215379, - 3114, - 49849, - 2023, - 4476, - 152748, - 642, - 10747, - 6038, - 33 - ], - "mdbid": 37, - "created_at": "2015-02-17T05:01:33+0000", - "poster_paths": [ - "/5WJnxuw41sddupf8cwOxYftuvJG.jpg", - "/12fqfvUmBOPg2pA0RsEhc31P28O.jpg", - "/pzKXVk5NZH8Uw1tBS9YE1dLva6x.jpg", - "/rVAHRtAMhV8QVXQMQ8NxNbZXCDp.jpg", - "/8PD1dgf0kQHtRawoSxp1jFemI1q.jpg", - "/yccgwPNVaqtgS1d0U5jjM6Mnza8.jpg", - "/b4vil5ueYJNBNypHmo1tpuevh4z.jpg", - "/qc7vaF5fIeTllAykdP3wldlMyRh.jpg", - "/sFLgxvtK9vxbNq502peVJ847Owp.jpg", - "/hpmclspug1I8EwKSWhL7pWWltA.jpg", - "/ocQ3rPqTkzLrj2zsTuIGjtpp9cJ.jpg", - "/Ai1lpWFaBHH3szTSBz7eZT3iobi.jpg", - "/tXEHvxU315Yu7bEaMMRcpDpW6RI.jpg", - "/5BiWWo12FnSFTatD8dfMpoF7bVs.jpg", - "/uh0sJcx3SLtclJSuKAXl6Tt6AV0.jpg", - "/l55xYXNXWHikLN1fX19gJjD91kB.jpg", - "/bIQQm0M2frhkctqR5vPyU1qqcZm.jpg", - "/59ywz8rQmXn4bl60WOMJddPc7z.jpg", - "/2H2h2Qdt2TXLQslCHi8xEDDONpq.jpg", - "/9oPodyvCWyPMZJDjg29tBfFRwtG.jpg" - ] - } -] + { + title: 'Action', + backdrop_path: '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:32+0000', + backdrop_paths: [ + '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', + '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', + '/pKawqrtCBMmxarft7o1LbEynys7.jpg', + '/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg', + '/mFb0ygcue4ITixDkdr7wm1Tdarx.jpg', + '/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg', + '/eCgIoGvfNXrbSiQGqQHccuHjQHm.jpg', + '/rKESeEePWWu4rATQDJOktllaDDv.jpg', + '/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg', + '/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg', + '/p5n7VTC6qmFIuBFjACWURYCAlKP.jpg', + '/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg', + '/4qfXT9BtxeFuamR4F49m2mpKQI1.jpg', + '/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg', + '/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg', + '/fCPqyqCppo0MruBqGXpz5pmUabU.jpg', + '/7BhTIyySTmmqNaoguSPjZAVMoQG.jpg', + '/jjAq3tCezdlQduusgtMhpY2XzW0.jpg', + '/cHy7nSitAVgvZ7qfCK4JO47t3oZ.jpg', + '/pNPdcgHT1FpCmauzFWepyfDvDo9.jpg' + ], + poster_path: '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', + id: '54e2cb2c8fc9090996d2de7d', + mdbids: [ + 76757, + 177572, + 228150, + 260346, + 245891, + 49017, + 240832, + 156022, + 198663, + 207703, + 228967, + 127585, + 100402, + 98566, + 604, + 312526, + 190859, + 49051, + 91314, + 184315 + ], + mdbid: 28, + created_at: '2015-02-17T05:01:32+0000', + poster_paths: [ + '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', + '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', + '/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg', + '/lTbbt8otsYLKRDvELMRn83wdNoW.jpg', + '/sq2MmFv9sanl9PFMfbdaBLveSJ8.jpg', + '/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg', + '/4Y9PMR6hO2YWu2BrNhix4lHRA58.jpg', + '/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg', + '/coss7RgL0NH6g4fC2s5atvf3dFO.jpg', + '/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg', + '/2uWb0aSm5cFmRCHP95OdA6hvTEs.jpg', + '/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg', + '/pH4oeiZAh9a40tly4D0l6aAB3ms.jpg', + '/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg', + '/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg', + '/5B182VoY6ZJh0a6kbp9k9UPvl2D.jpg', + '/ooy5M7QXEWVpOTAZIRGMskBQbQ9.jpg', + '/h1XjBJoWdOh8aegBoVYKgABQZSL.jpg', + '/ykIZB9dYBIKV13k5igGFncT5th6.jpg', + '/jEeMN83CRI7lIEffTlgzBcUZzuN.jpg' + ] + }, + { + title: 'Adventure', + backdrop_path: '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:32+0000', + backdrop_paths: [ + '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', + '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', + '/umR9aXTxOxQUuDH2DamoJ5fIPB.jpg', + '/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg', + '/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg', + '/pckdZ29bHj11hBsV3SbVVfmCB6C.jpg', + '/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg', + '/4qfXT9BtxeFuamR4F49m2mpKQI1.jpg', + '/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg', + '/83nHcz2KcnEpPXY50Ky2VldewJJ.jpg', + '/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg', + '/hyR7Fs6Tepgu3yCQGtgO4Ilz9tY.jpg', + '/irHmdlkdJphmk4HPfyAQfklKMbY.jpg', + '/jjAq3tCezdlQduusgtMhpY2XzW0.jpg', + '/cHy7nSitAVgvZ7qfCK4JO47t3oZ.jpg', + '/pNPdcgHT1FpCmauzFWepyfDvDo9.jpg', + '/3FweBee0xZoY77uO1bhUOlQorNH.jpg', + '/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg', + '/hbn46fQaRmlpBuUrEiFqv0GDL6Y.jpg', + '/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg' + ], + poster_path: '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', + id: '54e2cb2cb1e3a30994751f33', + mdbids: [ + 76757, + 177572, + 122917, + 118340, + 207703, + 62, + 127585, + 100402, + 98566, + 131631, + 604, + 57158, + 109445, + 49051, + 91314, + 184315, + 76338, + 82702, + 24428, + 170687 + ], + mdbid: 12, + created_at: '2015-02-17T05:01:32+0000', + poster_paths: [ + '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', + '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', + '/vgAHvS0bT3fpcpnJqT6uDTUsHTo.jpg', + '/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg', + '/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg', + '/rT9w3tzk25jA8vl7KyvzUP5gHJV.jpg', + '/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg', + '/pH4oeiZAh9a40tly4D0l6aAB3ms.jpg', + '/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg', + '/cWERd8rgbw7bCMZlwP207HUXxym.jpg', + '/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg', + '/gQCiuxGsfiXH1su6lp9n0nd0UeH.jpg', + '/jIjdFXKUNtdf1bwqMrhearpyjMj.jpg', + '/h1XjBJoWdOh8aegBoVYKgABQZSL.jpg', + '/ykIZB9dYBIKV13k5igGFncT5th6.jpg', + '/jEeMN83CRI7lIEffTlgzBcUZzuN.jpg', + '/aROh4ZwLfv9tmtOAsrnkYTbpujA.jpg', + '/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg', + '/cezWGskPY5x7GaglTTRN4Fugfb8.jpg', + '/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg' + ] + }, + { + title: 'Animation', + backdrop_path: '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:33+0000', + backdrop_paths: [ + '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', + '/irHmdlkdJphmk4HPfyAQfklKMbY.jpg', + '/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg', + '/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg', + '/GtodNrQnorVd3Gv6f6i4bdEwkP.jpg', + '/mkzpFIJmndBOfUteS7n3fI04lX3.jpg', + '/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg', + '/agaDrrefPwOBMxSe9SIkq5zS4tQ.jpg', + '/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg', + '/lVshZpxU5EB8zXJrnXxblaDps6m.jpg', + '/1DMrM1RDSClzeabdrTejEYtTFMU.jpg', + '/clvgKN7DWTXm4b81HAHNvcvkBqX.jpg', + '/rmgxcw8tGTmdhsWqdjGBS9uI1tO.jpg', + '/oDqbewoFuIEWA7UWurole6MzDGn.jpg', + '/yIAxebMW8bvGJhZO8Q3TSi4zMDQ.jpg', + '/pQPRp30zd0BSaefterJnLmh4Rs9.jpg', + '/nMulOcoR6HAahofkcuo4mtA0o9j.jpg', + null, + '/3MET6hEfk8n8i0KFRq9BHnJq7ju.jpg', + '/n2vIGWw4ezslXjlP0VNxkp9wqwU.jpg' + ], + poster_path: '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', + id: '54e2cb2da88c820980760614', + mdbids: [ + 177572, + 109445, + 82702, + 170687, + 270946, + 322456, + 137106, + 293299, + 316322, + 228326, + 228165, + 11970, + 93456, + 425, + 297556, + 76492, + 10191, + 302960, + 218836, + 12 + ], + mdbid: 16, + created_at: '2015-02-17T05:01:33+0000', + poster_paths: [ + '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', + '/jIjdFXKUNtdf1bwqMrhearpyjMj.jpg', + '/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg', + '/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg', + '/eCdQdoqG9kQQbzPnbVDXqwoTgLl.jpg', + '/qTVlKThCmXOFryiiTJHBMgHhdAv.jpg', + '/lMHbadNmznKs5vgBAkHxKGHulOa.jpg', + '/4XFN435sO7t9sMiWGMtWcV9qfmq.jpg', + '/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg', + '/fhq87M6NNXqYH4OUoIfsM6oDUA3.jpg', + '/9wChSuUoQDiBKUnGTcYMkzRha60.jpg', + '/eFlBFMAifj436QctX3akDkUnhlk.jpg', + '/kQrYyZQHkwkUg2KlUDyvymj9FAp.jpg', + '/zpaQwR0YViPd83bx1e559QyZ35i.jpg', + '/3n0zmm2dPF0TQt2ikJ2tUjKr2FT.jpg', + '/8DGGcTCl47s1tmzSLxUNLXDcJge.jpg', + '/zMAm3WYmvD40FaWFsOmpicQFabz.jpg', + '/Mx9dBrZaVJlFmdebfao08FO6Z.jpg', + '/b5Xn7UQf7s6ZPsDTVT0NeLqiiHY.jpg', + '/zjqInUwldOBa0q07fOyohYCWxWX.jpg' + ] + }, + { + title: 'Comedy', + backdrop_path: '/7OluTl9LoaMDZ2MVdrFVuU2os09.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:32+0000', + backdrop_paths: [ + '/7OluTl9LoaMDZ2MVdrFVuU2os09.jpg', + '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', + '/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg', + '/pMNSiNT55XrxWPmoI5ytJyinRa8.jpg', + '/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg', + '/p5n7VTC6qmFIuBFjACWURYCAlKP.jpg', + '/43GrPpAeBUOvOCZ8L1A3MLuDnkc.jpg', + '/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg', + '/3AZX2KB73kSza76h9O4bzdNeIac.jpg', + '/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg', + '/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg', + '/GtodNrQnorVd3Gv6f6i4bdEwkP.jpg', + '/73hI1zgRALUDrB46JDPBLFqHcqv.jpg', + '/USKXUGMT9PZHzq91F5Beuged7.jpg', + '/cANfw6Yh10QC4F3mKcLZ4VoUzhA.jpg', + '/3hOPv3w5mmPV3MA9fk0nPI5MyXV.jpg', + '/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg', + '/z5e275a7iDNCQNx0NelsX5LYmDU.jpg', + '/dYtAyg4vD88hIfrR1VKDnVGhnE6.jpg', + '/6YEWKSFIWFTLnInzXYiSaS7pVOP.jpg' + ], + poster_path: '/zRkLCOx7o9tjPYb9s7u6mpw8VOs.jpg', + id: '54e2cb2ca88c820980760611', + mdbids: [ + 227159, + 177572, + 194662, + 100042, + 207703, + 228967, + 193893, + 98566, + 120467, + 82702, + 170687, + 270946, + 181533, + 225886, + 239563, + 244264, + 137106, + 218778, + 106646, + 82693 + ], + mdbid: 35, + created_at: '2015-02-17T05:01:32+0000', + poster_paths: [ + '/zRkLCOx7o9tjPYb9s7u6mpw8VOs.jpg', + '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', + '/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg', + '/Ekw3ijq9L6RiKvv5m2tPOEklHF.jpg', + '/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg', + '/2uWb0aSm5cFmRCHP95OdA6hvTEs.jpg', + '/8GVU8AaYpxiIS462SZgAtjh02pm.jpg', + '/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg', + '/nX5XotM9yprCKarRH4fzOq1VM1J.jpg', + '/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg', + '/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg', + '/eCdQdoqG9kQQbzPnbVDXqwoTgLl.jpg', + '/tWwASv4CU1Au1IukacdSUewDCV3.jpg', + '/bYY46f0PSLJTXzitxGOCd00rj3Y.jpg', + '/w0hzr4eQBk1X4m63fb7sOSt9Bnn.jpg', + '/dNcoXoRC7JHiqbe7k5Ufo6syiPP.jpg', + '/lMHbadNmznKs5vgBAkHxKGHulOa.jpg', + '/yup7xOCpOSHeUyalUH6mpFuBDpG.jpg', + '/wAgdJRx4uZ0u4uzu34NOMvtjLAR.jpg', + '/ilrZAV2klTB0FLxLb01bOp5pzD9.jpg' + ] + }, + { + title: 'Crime', + backdrop_path: '/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:33+0000', + backdrop_paths: [ + '/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg', + '/ts4j3zYaPzdUVF3ijBeBdGVDWjX.jpg', + '/pbZtww8VsNDSwt9eMnG0faELwYV.jpg', + '/rKESeEePWWu4rATQDJOktllaDDv.jpg', + '/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg', + '/e56QsaJy1weAUukiK2ZmIGVUALF.jpg', + '/qjfE7SkPXpqFs8FX8rIaG6eO2aK.jpg', + '/nnMC0BM6XbjIIrT4miYmMtPGcQV.jpg', + '/zddiDFf3X97pCimAOGKh3m0PwJV.jpg', + '/6AocjTM7B0RII4qrXG40wI1rEF3.jpg', + '/biw5Nn85iBZZd8GWYO9XXH56VK2.jpg', + '/3bgtUfKQKNi3nJsAB5URpP2wdRt.jpg', + '/khzRw7ZDE3NIrYpe0RYyB864FPT.jpg', + '/dYtAyg4vD88hIfrR1VKDnVGhnE6.jpg', + '/d5vwBiuJI1a2hBcGjhsWhpmAkL7.jpg', + '/oSno71x3xS7ic311ktzzpVjxzEF.jpg', + '/6V4Ni0ap3yreqSRVfBrzFcryC6f.jpg', + '/hMuPjDgT3MyZkGpST4vky8t0m6h.jpg', + '/9NmTVqQ9f2ltecPZgXIj4Bk2c6s.jpg', + '/8Od5zV7Q7zNOX0y9tyNgpTmoiGA.jpg' + ], + poster_path: '/lTbbt8otsYLKRDvELMRn83wdNoW.jpg', + id: '54e2cb2d8fc9090996d2de7e', + mdbids: [ + 260346, + 242582, + 265208, + 156022, + 207703, + 169917, + 82992, + 155, + 154400, + 245916, + 201088, + 49026, + 189, + 106646, + 8681, + 254904, + 206563, + 192102, + 187017, + 1422 + ], + mdbid: 80, + created_at: '2015-02-17T05:01:33+0000', + poster_paths: [ + '/lTbbt8otsYLKRDvELMRn83wdNoW.jpg', + '/fukWJhLISH7f6cnYSdgb0JrSP2Q.jpg', + '/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg', + '/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg', + '/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg', + '/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg', + '/kBXgGUt07sLpw6rhpiYwEyOwUDa.jpg', + '/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg', + '/lj8AMCjWx0jU93XajzUEOUUNKZF.jpg', + '/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg', + '/tn07zjNNIJuOsecqTC2JEYA49uU.jpg', + '/dEYnvnUfXrqvqeRSqvIEtmzhoA8.jpg', + '/k80qKrJ0qQ6ocVo5N932stNSg6j.jpg', + '/wAgdJRx4uZ0u4uzu34NOMvtjLAR.jpg', + '/q2ufZ5zgbyvwSVR9J5wR6nEAEyy.jpg', + '/lcg1bkriMVvc8m0jz5zk0yvzVTA.jpg', + '/sE9OHijLpDXsMlaiLR2NEsi0VYP.jpg', + '/mj1aAY5WbVhb62nw3MvZinsbhke.jpg', + '/gNlV5FhDZ1PjxSv2aqTPS30GEon.jpg', + '/tGLO9zw5ZtCeyyEWgbYGgsFxC6i.jpg' + ] + }, + { + title: 'Documentary', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:33+0000', + backdrop_paths: [ + null, + '/hYeLTWIWeP9KdKxjcYnhpvO12EY.jpg', + '/vraH686DWdoM3yD8G0lWuPSpGys.jpg', + null, + null, + '/4pimMgJLY3LnAG1hqVK1aMpZvBw.jpg', + '/uqq2Pdb9eWXQz0Fe8IMpDvbOutD.jpg', + '/y4n7ShCGahGalW2j8eP4uSlEo8y.jpg', + '/bBpiHSUo4L5rN6qJ8Drqx79i9QA.jpg', + '/vcB1yzRxVQxsZrWS4uVxBz1Ia8Q.jpg', + '/rkXYAvWjHATFWE4fSdL5ziIrLBe.jpg', + null, + '/q7A6qCqmy6daaqGRm3Ee3NUC3xN.jpg', + '/qiQTwNmLWZfm5HWAQkfAMBnISLN.jpg', + '/sYicgyXd0uYqf9gjuBdbfT0zj3r.jpg', + '/vkYLK9JtA5liuPrZhhgrqfVviMy.jpg', + null, + null, + '/7y4vgRqEMyJzU3Rk8UzaPs2EA3r.jpg', + '/tED08RIEfQBC2g8xGhpaYwIkQXM.jpg' + ], + poster_path: '/jFe3aZZCW7uw1nUltNcKalOXI53.jpg', + id: '54e2cb2da88c820980760615', + mdbids: [ + 316020, + 181330, + 325338, + 323356, + 320662, + 225570, + 65851, + 74510, + 253294, + 14158, + 183392, + 324558, + 16290, + 191720, + 293310, + 84383, + 324686, + 325572, + 105978, + 39312 + ], + mdbid: 99, + created_at: '2015-02-17T05:01:33+0000', + poster_paths: [ + '/jFe3aZZCW7uw1nUltNcKalOXI53.jpg', + '/jxbSeJkTzPKcikzCFQ33SKLGyvD.jpg', + '/9fs7cAuHLtkuwhYDRSVbMh3eeZz.jpg', + '/aDxGkwCH16lbWwJLehByhB3OdsE.jpg', + '/iakIbfoGC5qp47ZNDEAgZtd4ndl.jpg', + '/kWqcqy0iaG2WWHnykQ0ZcNjx5A5.jpg', + '/ppjN0BZaOJ6aHMXsECHJ0dpFb8Z.jpg', + '/kOkmvY2kjZfilgr4PQBz3plK5nE.jpg', + '/trDmWmPZOQJAcY4flL6yx0kdqjS.jpg', + '/jNSufmwIL6tsIOhTZ1FN47Mdf4T.jpg', + '/snmfymyvgeWDoV8xUClnKEiymmB.jpg', + '/ihEh03PnTrK2sfeiu04JlW5N25D.jpg', + '/ann60e6DLDG0cnjyvkFJAoN7rWx.jpg', + '/c8zcrYHsAg9R9oEbfdRhwslDwnp.jpg', + '/yNuLhb2y6I5cO7BfiJ7bdfllnIG.jpg', + '/uZMItnAF4KW7aS5XwTyL4Pe28Ji.jpg', + null, + '/3SpRVNuZcvvCvN58nkpHIYzS6kB.jpg', + '/r8jSbyvnBDcy8YrTsQ9Auzm4eNI.jpg', + '/v5E4hs8eMHWhUk2xlQqEYtkJbmp.jpg' + ] + }, + { + title: 'Drama', + backdrop_path: '/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:32+0000', + backdrop_paths: [ + '/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg', + '/nnY2XnO3zjpkdq7xxOZPyI1r6V0.jpg', + '/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg', + '/pKawqrtCBMmxarft7o1LbEynys7.jpg', + '/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg', + '/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg', + '/ts4j3zYaPzdUVF3ijBeBdGVDWjX.jpg', + '/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg', + '/pbZtww8VsNDSwt9eMnG0faELwYV.jpg', + '/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg', + '/qzIu5zbI190k6BHbYgaQA93IZ9K.jpg', + '/geAe08WmchATnZF461WffQBqJk1.jpg', + '/f0HeQdnuFkboXWGBgqtwYUKgLZw.jpg', + '/e56QsaJy1weAUukiK2ZmIGVUALF.jpg', + '/3AZX2KB73kSza76h9O4bzdNeIac.jpg', + '/rjUl3pd1LHVOVfG4IGcyA1cId5l.jpg', + '/nnMC0BM6XbjIIrT4miYmMtPGcQV.jpg', + '/zddiDFf3X97pCimAOGKh3m0PwJV.jpg', + '/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg', + '/6AocjTM7B0RII4qrXG40wI1rEF3.jpg' + ], + poster_path: '/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg', + id: '54e2cb2ca88c820980760612', + mdbids: [ + 194662, + 216015, + 244786, + 228150, + 210577, + 49017, + 242582, + 205596, + 265208, + 157336, + 205587, + 266856, + 85350, + 169917, + 120467, + 119450, + 155, + 154400, + 72190, + 245916 + ], + mdbid: 18, + created_at: '2015-02-17T05:01:32+0000', + poster_paths: [ + '/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg', + '/vHX9fxgipKgp9UXJxYNzyhnypQl.jpg', + '/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg', + '/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg', + '/gdiLTof3rbPDAmPaCf4g6op46bj.jpg', + '/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg', + '/fukWJhLISH7f6cnYSdgb0JrSP2Q.jpg', + '/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg', + '/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg', + '/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg', + '/hNnecAVTBdtNXoSdhDXIPKm0SVu.jpg', + '/4jspr8hLLuju59bCnMiefzRW4p0.jpg', + '/eKi4e5zXhQKs0De4xu5AAMvu376.jpg', + '/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg', + '/nX5XotM9yprCKarRH4fzOq1VM1J.jpg', + '/2EUAUIu5lHFlkj5FRryohlH6CRO.jpg', + '/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg', + '/lj8AMCjWx0jU93XajzUEOUUNKZF.jpg', + '/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg', + '/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg' + ] + }, + { + title: 'Family', + backdrop_path: '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:32+0000', + backdrop_paths: [ + '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', + '/irHmdlkdJphmk4HPfyAQfklKMbY.jpg', + '/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg', + '/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg', + '/GtodNrQnorVd3Gv6f6i4bdEwkP.jpg', + '/73hI1zgRALUDrB46JDPBLFqHcqv.jpg', + '/mkzpFIJmndBOfUteS7n3fI04lX3.jpg', + '/scVPsqO1MryjgbJuGg2JsWTE3WD.jpg', + '/9bd6IFBMwSOINrEW8VIBxaS4cd9.jpg', + '/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg', + '/z5e275a7iDNCQNx0NelsX5LYmDU.jpg', + '/agaDrrefPwOBMxSe9SIkq5zS4tQ.jpg', + '/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg', + '/lVshZpxU5EB8zXJrnXxblaDps6m.jpg', + '/clvgKN7DWTXm4b81HAHNvcvkBqX.jpg', + '/rmgxcw8tGTmdhsWqdjGBS9uI1tO.jpg', + '/x4N74cycZvKu5k3KDERJay4ajR3.jpg', + '/8tuHQglvFEHDASvagt3m5nAam9O.jpg', + '/oDqbewoFuIEWA7UWurole6MzDGn.jpg', + '/oPmZDHPkdmhuvxYGmwtKcQefeNr.jpg' + ], + poster_path: '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', + id: '54e2cb2ca88c820980760613', + mdbids: [ + 177572, + 109445, + 82702, + 170687, + 270946, + 181533, + 322456, + 68737, + 102651, + 137106, + 218778, + 293299, + 316322, + 228326, + 11970, + 93456, + 105, + 1593, + 425, + 12445 + ], + mdbid: 10751, + created_at: '2015-02-17T05:01:32+0000', + poster_paths: [ + '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', + '/jIjdFXKUNtdf1bwqMrhearpyjMj.jpg', + '/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg', + '/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg', + '/eCdQdoqG9kQQbzPnbVDXqwoTgLl.jpg', + '/tWwASv4CU1Au1IukacdSUewDCV3.jpg', + '/qTVlKThCmXOFryiiTJHBMgHhdAv.jpg', + '/saJi9Vs37zLmUENyIEdhgURk3a1.jpg', + '/4FYu1AAu14tuBU0lns0hbKiHUcH.jpg', + '/lMHbadNmznKs5vgBAkHxKGHulOa.jpg', + '/yup7xOCpOSHeUyalUH6mpFuBDpG.jpg', + '/4XFN435sO7t9sMiWGMtWcV9qfmq.jpg', + '/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg', + '/fhq87M6NNXqYH4OUoIfsM6oDUA3.jpg', + '/eFlBFMAifj436QctX3akDkUnhlk.jpg', + '/kQrYyZQHkwkUg2KlUDyvymj9FAp.jpg', + '/pTpxQB1N0waaSc3OSn0e9oc8kx9.jpg', + '/NUbCSwy2EQ9Z6psUjPqr3WdVI2.jpg', + '/zpaQwR0YViPd83bx1e559QyZ35i.jpg', + '/7xmtxRc9nQnCuWINuTT4SMP5NJc.jpg' + ] + }, + { + title: 'Fantasy', + backdrop_path: '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:33+0000', + backdrop_paths: [ + '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', + '/umR9aXTxOxQUuDH2DamoJ5fIPB.jpg', + '/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg', + '/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg', + '/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg', + '/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg', + '/hyR7Fs6Tepgu3yCQGtgO4Ilz9tY.jpg', + '/jjAq3tCezdlQduusgtMhpY2XzW0.jpg', + '/3FweBee0xZoY77uO1bhUOlQorNH.jpg', + '/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg', + '/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg', + '/73hI1zgRALUDrB46JDPBLFqHcqv.jpg', + null, + '/scVPsqO1MryjgbJuGg2JsWTE3WD.jpg', + '/9bd6IFBMwSOINrEW8VIBxaS4cd9.jpg', + '/LvmmDZxkTDqp0DX7mUo621ahdX.jpg', + '/tmFDgDmrdp5DYezwpL0ymQKIbnV.jpg', + '/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg', + '/dG4BmM32XJmKiwopLDQmvXEhuHB.jpg', + '/pIUvQ9Ed35wlWhY2oU6OmwEsmzG.jpg' + ], + poster_path: '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', + id: '54e2cb2db1e3a3099c7513ce', + mdbids: [ + 76757, + 122917, + 49017, + 118340, + 127585, + 98566, + 57158, + 49051, + 76338, + 82702, + 170687, + 181533, + 246655, + 68737, + 102651, + 10195, + 102382, + 137106, + 121, + 120 + ], + mdbid: 14, + created_at: '2015-02-17T05:01:33+0000', + poster_paths: [ + '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', + '/vgAHvS0bT3fpcpnJqT6uDTUsHTo.jpg', + '/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg', + '/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg', + '/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg', + '/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg', + '/gQCiuxGsfiXH1su6lp9n0nd0UeH.jpg', + '/h1XjBJoWdOh8aegBoVYKgABQZSL.jpg', + '/aROh4ZwLfv9tmtOAsrnkYTbpujA.jpg', + '/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg', + '/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg', + '/tWwASv4CU1Au1IukacdSUewDCV3.jpg', + '/95wDIXF97wk6h3ZGZgX0ztsiETk.jpg', + '/saJi9Vs37zLmUENyIEdhgURk3a1.jpg', + '/4FYu1AAu14tuBU0lns0hbKiHUcH.jpg', + '/bIuOWTtyFPjsFDevqvF3QrD1aun.jpg', + '/ha1FI2U5QF1L7Avb0mqxSgnXlbZ.jpg', + '/lMHbadNmznKs5vgBAkHxKGHulOa.jpg', + '/5o5fv1dHG7vWoH2hmqwihVPBoBm.jpg', + '/9HG6pINW1KoFTAKY3LdybkoOKAm.jpg' + ] + }, + { + title: 'Foreign', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:33+0000', + backdrop_paths: [ + null, + '/z6Vnp7oV4wgrmGNuRw8WH1BpK8G.jpg', + '/tSuyqQmImPqheZOVLFaHNOG4Emd.jpg', + '/sMe6xHHrDVDF9ap8CZgNT0gWtBn.jpg', + '/uUoOPv3gohxLOJdhZ0D2OLctmBV.jpg', + '/oIdAuFg8gNRV2a3QCD6NBDpTFBR.jpg', + '/2JJSyQX2elrTY7sqHwCl1xrsCdy.jpg', + '/iaVBYxaXOZvVoxRopmUzGWr8RNV.jpg', + '/xHsqBcDy5VvV4MuI974HuIoRRQc.jpg', + '/yClF0KasgIupP7Rnkglq5h104LD.jpg', + '/5pyfKiChqJg3cZGn1EM9rIWXALl.jpg', + '/kMLevYmOdG49u1SdlQYCyX5pU5n.jpg', + '/Aa6FlC0W2sljzujYtwrSTry2oVS.jpg', + '/mOz8GDmE5em5o7ImqiMEIN35qqz.jpg', + '/tGtrYbrkBaSBI6wLgtLzvFZsbDh.jpg', + '/npwldtkS6hzeOuXGvBUNRL7N4Jo.jpg', + '/iwUNi6undqtiq0FMNduGjfPs2u.jpg', + '/fIdGH6HpsEOuxkRaRFc1KR5BH5D.jpg', + '/ykJm8JHcuzju5TnM1H4Z8rN56cA.jpg', + '/uOL6xMF1bm5TMb45YTnImByVLfU.jpg' + ], + poster_path: '/lKqtEqj1wHal0deTXEOZ2co9eEv.jpg', + id: '54e2cb2db1e3a3099c7513cf', + mdbids: [ + 114876, + 186929, + 81527, + 127533, + 11573, + 1075, + 23383, + 3631, + 67308, + 29457, + 10835, + 62377, + 797, + 439, + 1808, + 44092, + 10582, + 11906, + 10912, + 11876 + ], + mdbid: 10769, + created_at: '2015-02-17T05:01:33+0000', + poster_paths: [ + '/lKqtEqj1wHal0deTXEOZ2co9eEv.jpg', + '/esDodQMU7j7RRCCvSyhrAlJUtpv.jpg', + '/mBFWp7PAkyTqhqVRDOAEUPLsAh9.jpg', + '/rmBUaljPj6SJVArR68fHl41oJU4.jpg', + '/3VajbHc64y2364LbgtYdLFQRCoP.jpg', + '/7q96evV2xWjvkO4fMdqe8vixKb8.jpg', + '/uiVgc8bCQm6PvQtGG0G1o41Fg4i.jpg', + '/b5fVWYALsSG08JQLHM0puZrhM2u.jpg', + '/8BpbXzSfnQSm3lveCm4h0j08cB7.jpg', + '/dqjTpLIyt3hIGVrIbaymWWTTeHg.jpg', + '/nP4zPLx3crdVVlt4U8JfFmnPdgO.jpg', + '/6ZAopX7i8sOAKekRftwQVavjZvl.jpg', + '/cjAnlvCrp9ZY7atASUsxRrhve7o.jpg', + '/aU7WLwPVCOoonAPWOPBmZ8X0c3c.jpg', + '/qj18ZymP4Xpwgj44mHf8HxFh6Au.jpg', + '/8PZeqDpC3QR67y5d6rMKgzFfQIh.jpg', + '/mLGbcNaheCzI8kYKl07yzs84jA8.jpg', + '/ccMPzxtnr5WcHaiwIN4P7mXoJzo.jpg', + '/yp9rIYBtoJBT6nKo4IFzlQZCFi5.jpg', + '/qombCbObrG6sNEIrsGBllkshZOg.jpg' + ] + }, + { + title: 'History', + backdrop_path: '/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:32+0000', + backdrop_paths: [ + '/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg', + '/aMjbjiH0mTUmHVLmYFTTdG5fMZQ.jpg', + '/fsjg1cEgXpO9TkxtmiAcLU8rnHd.jpg', + '/xnRPoFI7wzOYviw3PmoG94X2Lnc.jpg', + '/hAQKDTVKk04LWn82OYWLBPpsaVa.jpg', + '/1A2qOz9zgfG51LCZivXKLPbO88u.jpg', + '/mXJnEzFHmchkMkuvaJ25eV4qWL5.jpg', + '/lYJedpGH3p4oWyVabsekwkULNvz.jpg', + '/lcRGF2RpurdvBiSQVocfzRrxV9u.jpg', + '/sHsPEij3nojL34xcnaLdnuKEfmH.jpg', + '/6Q4GeMo08AOJJos9BzgnutFiZTG.jpg', + '/4y5TDUZlqUmWWtjTAznWb6CFpzt.jpg', + '/3hGRV0xR11aUxCGAJ52F8MTxrno.jpg', + '/q83wt7MsAWHNN1jNFXQb0bnCghe.jpg', + '/exb7qw4BPOwBr0qlxIsEKc3TCR.jpg', + '/rIpSszng8P0DL0TimSzZbpfnvh1.jpg', + '/kV0wiMw24cgac7BqcppgkmUSGIw.jpg', + '/mYNXGr8HNS1TO7wrQVSywrlduk9.jpg', + '/fJQ5kjLx4UdK05MC323Vlzwr6S8.jpg', + '/z7tLZ3c17Ch6qGIhUuiXBGGwHv0.jpg' + ], + poster_path: '/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg', + id: '54e2cb2cb1e3a3099c7513cd', + mdbids: [ + 205596, + 891, + 273895, + 76203, + 45269, + 97630, + 197, + 319633, + 14756, + 279, + 76649, + 857, + 152532, + 152760, + 115782, + 424, + 665, + 3580, + 140823, + 967 + ], + mdbid: 36, + created_at: '2015-02-17T05:01:32+0000', + poster_paths: [ + '/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg', + '/jh4aA8tryNy1QDiQzkE1kzPqkwc.jpg', + '/xj1H3dpEHhouyJNB1lfpkKf9fXX.jpg', + '/kb3X943WMIJYVg4SOAyK0pmWL5D.jpg', + '/v8M5Sytbut7vBXyZ1HDy8lUVVcB.jpg', + '/y0hJt5WurqDplEzTnrrMCwE1YIZ.jpg', + '/2qAgGeYdLjelOEqjW9FYvPHpplC.jpg', + '/AmkLAKsETY0ZDTNGfXgybOmMGXF.jpg', + '/8knFfuqW289DJi2cpPl4RVTDkbo.jpg', + '/flnoqdC38mbaulAeptjynOFO7yi.jpg', + '/x1QMhNN6dNghhqltcZKBEMuWQ9g.jpg', + '/35CMz4t7PuUiQqt5h4u5nbrXZlF.jpg', + '/aoxYci1HnJdb4bno2jYSnzSGDkL.jpg', + '/m4puTcUAFtFJBLMVoRs0FLk3ET3.jpg', + '/ioI5pOOr5yWZAAZPEts5oSQwUrT.jpg', + '/yPisjyLweCl1tbgwgtzBCNCBle.jpg', + '/syPMBvvZsADTTRu3UKuxO1Wflq.jpg', + '/qtte2n6ygA1zVG5kLrjUGui28TJ.jpg', + '/mvs3reS18RP6IhjLwwLeVtkoeg0.jpg', + '/h5D65IPpYPmuBjIPWBTA557BQFS.jpg' + ] + }, + { + title: 'Horror', + backdrop_path: '/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:33+0000', + backdrop_paths: [ + '/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg', + '/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg', + '/pJXFPBOild76vDAiapX5BOTtj2B.jpg', + '/2ROsQqKfy7f1uqsF8bTC7Vg0ui2.jpg', + '/tgXaHtpmxj4SkMxBTi1Desl6Mc6.jpg', + '/5G5rOi7Qkg5F3u94vpy1lrwr06W.jpg', + '/kTvGzXv4lIoQAOU8hAvdZtnEqy0.jpg', + '/6kazrydTbHlqKzE5h2xUejDgIec.jpg', + '/8iNsXY3LPsuT0gnUiTBMoNuRZI7.jpg', + '/4eGiNZtn6hMJvXfXuhoGmlJnk6e.jpg', + '/snnEAySuzjY7qmCQ5mJpxin7G6d.jpg', + '/vXVTd1owgGyemXKgJUnMLS33NOV.jpg', + '/7gTvjByEOx959HtetwcczO2eOJi.jpg', + '/214TKe8WBBbFXVrBRV9RECeE4oW.jpg', + '/8pCFurneAWouGbBMEoBHqU1ejbb.jpg', + '/9cs9RuOS3A5YEh6r4opVrIGbiJy.jpg', + '/vMNl7mDS57vhbglfth5JV7bAwZp.jpg', + '/rzzabQ2HNUDil53Zfueu0iyasgB.jpg', + '/cQXlDYsxdSJg9quBIM8IgpphAon.jpg', + '/elCm3CYwflEV6EaZdyf9zgS699i.jpg' + ], + poster_path: '/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg', + id: '54e2cb2d8fc9090996d2de80', + mdbids: [ + 49017, + 72190, + 242512, + 238636, + 679, + 254191, + 36647, + 609, + 52520, + 7340, + 298032, + 312791, + 133805, + 22970, + 250546, + 1250, + 348, + 100241, + 246741, + 10304 + ], + mdbid: 27, + created_at: '2015-02-17T05:01:33+0000', + poster_paths: [ + '/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg', + '/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg', + '/i52JCZSHDvkHtjQwlPqMAsjULVH.jpg', + '/l1DRl40x2OWUoPP42v8fjKdS1Z3.jpg', + '/nORMXEkYEbzkU5WkMWMgRDJwjSZ.jpg', + '/5jZRisBShiBpsH2k5rDYGEl9fSh.jpg', + '/KIyDkxJDCpew51Vni8FkHaLkon.jpg', + '/v0ZEUCfwsvUSuqU1bt7L0LJGx2p.jpg', + '/76GXWKs2IDi0ZERKLT57wkToV0A.jpg', + '/A5qwZ3IGWglRZtiLOOwwLWYqVWk.jpg', + '/9Ivu97Dej7zD2G4xnaK8zkDWwJC.jpg', + '/w6lvw6zMnvVB1dAHGkUQ7tCLFpO.jpg', + '/3pFxLrjVFm0uMrMG4B39opOfpqF.jpg', + '/t8cW3FSCDYCaWRiNHSvI6SDuWeA.jpg', + '/yAgxM61Sn0dYML4C9v3MJFp5zPI.jpg', + '/jnllnSq8u4d1oQPU7PsoAHD6bLU.jpg', + '/uU9R1byS3USozpzWJ5oz7YAkXyk.jpg', + '/amJHZ4eOMpqyKo1GK33HFV55zue.jpg', + '/tqUjvYvigCapKws9BbOOZ10sSJA.jpg', + '/xoQpKbnmGPuZub5NAPQq18hDEWA.jpg' + ] + }, + { + title: 'Music', + backdrop_path: '/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:33+0000', + backdrop_paths: [ + '/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg', + '/24uuwm3w99OYkV6qlfVfbG1IzKR.jpg', + '/8bXlXJtPAaSNYeWzdH4CG8TAsbJ.jpg', + '/iNj9LMS5APEHKsFLJdd5geQ94HM.jpg', + '/697HWfGtDmK5Yi5QTEL19Q8dzPL.jpg', + '/tRB98Z0qNL7TCaoDHMj88m1quSH.jpg', + '/fGq48GZp2PLVgx9IwW5lBf4DBYJ.jpg', + '/sHsPEij3nojL34xcnaLdnuKEfmH.jpg', + '/1jJVDNz5gan9WYuspnKAHwks39e.jpg', + '/xB3whEpbdc4zktvCBqNUvTiouw3.jpg', + '/hqNff5zochp9hzo299wC4Uoy8M9.jpg', + '/q8OEC91NiJOpghWI9hXtC27nFX0.jpg', + '/nXII61245PlG2vOH8Yl15WIhJFP.jpg', + '/vcLqVuSMx7dVfuOVKd4IL4RcMsa.jpg', + '/ngDmpFRzNGr9XMtKchhBZjt4DLH.jpg', + '/8oCkj3t9yvT363svYMssXqGxTRf.jpg', + '/dmcyvwz6AWBuxkZ1pRMJznC3Eb0.jpg', + '/aP9QSw2dFSARo7a59XDfl84lZ3a.jpg', + '/weiACHVZa0lQ10cd3BhJm9d8YUF.jpg', + '/z1nlvpCpMBitAiTSRvda3TxMyFr.jpg' + ], + poster_path: '/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg', + id: '54e2cb2db1e3a3099c7513d0', + mdbids: [ + 244786, + 243683, + 206296, + 9762, + 85446, + 46992, + 8328, + 279, + 198277, + 224141, + 196867, + 10020, + 10693, + 114150, + 88, + 824, + 239566, + 27, + 15121, + 209361 + ], + mdbid: 10402, + created_at: '2015-02-17T05:01:33+0000', + poster_paths: [ + '/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg', + '/zjzD9DLYNThg3JnPJJOxZc0sxhO.jpg', + '/nPHemX0bcR5OyGPdPVUpIgwFqex.jpg', + '/gyLww7ZlcwuzqvIwM1osR9Ioqtm.jpg', + '/bduyqAyMtPDs4m16F7SuLQtbcud.jpg', + '/2a3ZmHS7IrOGG46hrbSS3qJJk6d.jpg', + '/5SwoeOUyfkS8s6aGB2bLYAL5jKR.jpg', + '/flnoqdC38mbaulAeptjynOFO7yi.jpg', + '/og7KVMqGTFaCNPmGVetxtR30Q0z.jpg', + '/6QmmHozsDv7ktW0cejsS3IJFUlZ.jpg', + '/hkvKhuUUgjJ4jrXKkvqoQ5JnQx5.jpg', + '/vGyhh8XB1AnDhBc4ssxrrz6ihdX.jpg', + '/n69umC19fsIKXlQBm0eD6waSwpI.jpg', + '/qtKYrSlnrgLS7wrYvEbcxrtAAqa.jpg', + '/dPxXbKxpUnrlnKeQ8EGdFTocNjG.jpg', + '/vgYM0ZDoeQKZEGxrGAO221J5rIG.jpg', + '/cEHLYmhklMNiXiB9lolU7SLERu7.jpg', + '/bvGyYmmnQG5NPP7m2nuLhaiC8LH.jpg', + '/459fPVvI4lkEV0piSfcq0irKHi8.jpg', + '/uuQ5wd9EqbOP0MVa7TeZ8RpDiaC.jpg' + ] + }, + { + title: 'Mystery', + backdrop_path: '/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:33+0000', + backdrop_paths: [ + '/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg', + '/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg', + '/pckdZ29bHj11hBsV3SbVVfmCB6C.jpg', + '/e56QsaJy1weAUukiK2ZmIGVUALF.jpg', + '/6AocjTM7B0RII4qrXG40wI1rEF3.jpg', + '/aMjbjiH0mTUmHVLmYFTTdG5fMZQ.jpg', + '/8jpE0Y8InANvFz2FVKmliY4yCQY.jpg', + '/ok6Ws65nDSLAIKkKgIjqyM5OGCc.jpg', + '/s2bT29y0ngXxxu2IA8AOzzXTRhd.jpg', + '/8TE77jL2e4zdERpv8hnBAHUmFRx.jpg', + '/9dQlkIOMjIdNksOjDnz56OvpLkM.jpg', + '/9ISArgiVBdNLASKmvflRDMOYYMj.jpg', + '/dYw7d9wJIZVQdwFpRlx7OyAQxCN.jpg', + '/ba4CpvnaxvAgff2jHiaqJrVpZJ5.jpg', + '/112d2vGKkdrv4ZrjyKCi1vhKZoX.jpg', + '/rRhoMIqgdX9wEtRUOLsqXKkH9I0.jpg', + '/oZY3DOlEZbEZvRxWynWkFTe4UgE.jpg', + '/k8nSKp54r0j1uy9QwM9RaD3goah.jpg', + '/4SySh90NtCRG9SlWuVX5BkaLLRh.jpg', + '/whV2SlkXyH2fWf7a92SGwFQVMTZ.jpg' + ], + poster_path: '/gdiLTof3rbPDAmPaCf4g6op46bj.jpg', + id: '54e2cb2d8fc9090996d2de7f', + mdbids: [ + 210577, + 198663, + 62, + 169917, + 245916, + 891, + 260202, + 13183, + 27205, + 75612, + 204922, + 51876, + 426, + 807, + 11324, + 70981, + 157353, + 10528, + 1124, + 171274 + ], + mdbid: 9648, + created_at: '2015-02-17T05:01:33+0000', + poster_paths: [ + '/gdiLTof3rbPDAmPaCf4g6op46bj.jpg', + '/coss7RgL0NH6g4fC2s5atvf3dFO.jpg', + '/rT9w3tzk25jA8vl7KyvzUP5gHJV.jpg', + '/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg', + '/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg', + '/jh4aA8tryNy1QDiQzkE1kzPqkwc.jpg', + '/69blTptbjzu4lhBv9wl3lvBKWnw.jpg', + '/jXggcKzlyxj7yMBUIsqwiaaEtD5.jpg', + '/qmDpIHrmpJINaRKAfWQfftjCdyi.jpg', + '/hmOzkHlkGvi8x24fYpFSnXvjklv.jpg', + '/3UG2Pb122c7Va8MBtr1OHRB1YPh.jpg', + '/hGHmdbovLuPi1Vdr6JLp7LhqZ3s.jpg', + '/obhM86qyv8RsE69XSMTtT9FdE0b.jpg', + '/zgB9CCTDlXRv50Z70ZI4elJtNEk.jpg', + '/aZqKsvpJDFy2UzUMsdskNFbfkOd.jpg', + '/7D6S5JydrGqhvjtjUoQjQT5FR3z.jpg', + '/4eESVBvr7KEvPGUZVL5LDWsANda.jpg', + '/22ngurXbLqab7Sko6aTSdwOCe5W.jpg', + '/5MXyQfz8xUP3dIFPTubhTsbFY6N.jpg', + '/2fCg6FORkgRLpFIKlUg4gULIn1u.jpg' + ] + }, + { + title: 'Romance', + backdrop_path: '/geAe08WmchATnZF461WffQBqJk1.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:33+0000', + backdrop_paths: [ + '/geAe08WmchATnZF461WffQBqJk1.jpg', + '/qBZswxe7zqHEhfZXVHdlwjwSh7H.jpg', + '/9bd6IFBMwSOINrEW8VIBxaS4cd9.jpg', + '/3hOPv3w5mmPV3MA9fk0nPI5MyXV.jpg', + '/6YEWKSFIWFTLnInzXYiSaS7pVOP.jpg', + '/agaDrrefPwOBMxSe9SIkq5zS4tQ.jpg', + '/4f4tWe6uhwtuKMygfIAytR2W0pj.jpg', + '/lVshZpxU5EB8zXJrnXxblaDps6m.jpg', + '/3CbUdwyKnEcLSLkQYWJfi8H6gPO.jpg', + '/clvgKN7DWTXm4b81HAHNvcvkBqX.jpg', + '/24uuwm3w99OYkV6qlfVfbG1IzKR.jpg', + '/8bXlXJtPAaSNYeWzdH4CG8TAsbJ.jpg', + '/iNj9LMS5APEHKsFLJdd5geQ94HM.jpg', + '/whV2SlkXyH2fWf7a92SGwFQVMTZ.jpg', + '/jlU4FvYxUXaxyYM0worlD7wHdQj.jpg', + '/sAsTfl7KTalEZc2M5za8MWJB6mY.jpg', + '/697HWfGtDmK5Yi5QTEL19Q8dzPL.jpg', + '/iMBlLEjC74OQbQ60bubdF27P35K.jpg', + '/fGq48GZp2PLVgx9IwW5lBf4DBYJ.jpg', + '/g9Ug1tS5JT255V8VrpZBDx2EbVB.jpg' + ], + poster_path: '/4jspr8hLLuju59bCnMiefzRW4p0.jpg', + id: '54e2cb2db1e3a30994751f35', + mdbids: [ + 266856, + 317121, + 102651, + 244264, + 82693, + 293299, + 152601, + 228326, + 41233, + 11970, + 243683, + 206296, + 9762, + 171274, + 2105, + 82023, + 85446, + 1597, + 8328, + 10068 + ], + mdbid: 10749, + created_at: '2015-02-17T05:01:33+0000', + poster_paths: [ + '/4jspr8hLLuju59bCnMiefzRW4p0.jpg', + '/bTC4LPtLdnx9bleEcJJ08KVuIkv.jpg', + '/4FYu1AAu14tuBU0lns0hbKiHUcH.jpg', + '/dNcoXoRC7JHiqbe7k5Ufo6syiPP.jpg', + '/ilrZAV2klTB0FLxLb01bOp5pzD9.jpg', + '/4XFN435sO7t9sMiWGMtWcV9qfmq.jpg', + '/fsoTLnUXEUTNuVCBxAJMY0HPPd.jpg', + '/fhq87M6NNXqYH4OUoIfsM6oDUA3.jpg', + '/q8Pm7UpAqDdxo1Xnt29EHHAl2u2.jpg', + '/eFlBFMAifj436QctX3akDkUnhlk.jpg', + '/zjzD9DLYNThg3JnPJJOxZc0sxhO.jpg', + '/nPHemX0bcR5OyGPdPVUpIgwFqex.jpg', + '/gyLww7ZlcwuzqvIwM1osR9Ioqtm.jpg', + '/2fCg6FORkgRLpFIKlUg4gULIn1u.jpg', + '/dxkSApFLkKkcEQgjCH2KPwTHvw4.jpg', + '/4i77Qjxl8ppqquq2yMTKANp7qFZ.jpg', + '/bduyqAyMtPDs4m16F7SuLQtbcud.jpg', + '/omw5eaaPFgIo3IGJBbAF5xIiMLp.jpg', + '/5SwoeOUyfkS8s6aGB2bLYAL5jKR.jpg', + '/ft0NylB71zkkoEnFalNBBDWTXtS.jpg' + ] + }, + { + title: 'Science Fiction', + backdrop_path: '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:33+0000', + backdrop_paths: [ + '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', + '/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg', + '/eCgIoGvfNXrbSiQGqQHccuHjQHm.jpg', + '/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg', + '/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg', + '/pckdZ29bHj11hBsV3SbVVfmCB6C.jpg', + '/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg', + '/4qfXT9BtxeFuamR4F49m2mpKQI1.jpg', + '/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg', + '/83nHcz2KcnEpPXY50Ky2VldewJJ.jpg', + '/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg', + '/fCPqyqCppo0MruBqGXpz5pmUabU.jpg', + '/cHy7nSitAVgvZ7qfCK4JO47t3oZ.jpg', + '/rjUl3pd1LHVOVfG4IGcyA1cId5l.jpg', + '/hbn46fQaRmlpBuUrEiFqv0GDL6Y.jpg', + '/c07g3JVBJ6dSO50PsrNG1N5VYmu.jpg', + '/pmZtj1FKvQqISS6iQbkiLg5TAsr.jpg', + '/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg', + '/s9DKwK5fXzaqFOzkZkidkOk4KR9.jpg', + '/ZQixhAZx6fH1VNafFXsqa1B8QI.jpg' + ], + poster_path: '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', + id: '54e2cb2da88c820980760617', + mdbids: [ + 76757, + 118340, + 240832, + 157336, + 198663, + 62, + 127585, + 100402, + 98566, + 131631, + 604, + 312526, + 91314, + 119450, + 24428, + 101299, + 1771, + 72190, + 206487, + 1726 + ], + mdbid: 878, + created_at: '2015-02-17T05:01:33+0000', + poster_paths: [ + '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', + '/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg', + '/4Y9PMR6hO2YWu2BrNhix4lHRA58.jpg', + '/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg', + '/coss7RgL0NH6g4fC2s5atvf3dFO.jpg', + '/rT9w3tzk25jA8vl7KyvzUP5gHJV.jpg', + '/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg', + '/pH4oeiZAh9a40tly4D0l6aAB3ms.jpg', + '/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg', + '/cWERd8rgbw7bCMZlwP207HUXxym.jpg', + '/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg', + '/5B182VoY6ZJh0a6kbp9k9UPvl2D.jpg', + '/ykIZB9dYBIKV13k5igGFncT5th6.jpg', + '/2EUAUIu5lHFlkj5FRryohlH6CRO.jpg', + '/cezWGskPY5x7GaglTTRN4Fugfb8.jpg', + '/tAhSyLxpaZJCr1oc2a3flvC2B7x.jpg', + '/sBZs1jSybBRBXDwcCR8IOyHLUMc.jpg', + '/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg', + '/i1trVjOx8rpVQ4zMVvtm5YXG9yA.jpg', + '/s2IG9qXfhJYxIttKyroYFBsHwzQ.jpg' + ] + }, + { + title: 'TV Movie', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:33+0000', + backdrop_paths: [ + null, + '/lBIU50ihAcSJtxrayTv1CmyP7r0.jpg', + '/3Kq2dwrhHPOZTlSCO78D6xt0twi.jpg', + '/7ZAUeJEbkTsFchCbHPuTQiyzAUi.jpg', + '/jh1RyJeB9ramb7lRlo2PhBH0PGE.jpg', + '/cRfp77R9uCGqrMQL4cU8SeQwlrm.jpg', + '/rtPtwVTo4RqumivX2zspSk8GyCy.jpg', + '/dFqXuO2prVc0GEJt3fkhT9uw7F.jpg', + '/irZdN7HNiBfZt61m146ugmasNwY.jpg', + '/ie6u0zegHcVJEtHSpYn0KgEogrD.jpg', + '/c8WBbyFXaV5mSZ0wMh6x1BImPwU.jpg', + '/kHvPwL8b8CJuXl5YD7URIkBiHla.jpg', + '/99HVdqFO3SYlHIIn1e3NWWxfqLR.jpg', + '/8HsZ5j58BcU9Hf2FvCfBbjr8FY5.jpg', + '/5aPnM6kDZ6YLXwRD6z8tUCjMhvr.jpg', + '/fvszcGGBnh7KPLKOuKu1FPsr9vZ.jpg', + '/p7kHtJDMuowURRgR9wsMIeu941M.jpg', + '/zbc9LCaJcwSLKQntBxxA2YoixQa.jpg', + '/voMLIvBs7Pi8Zs2UtBztBEZg1ZS.jpg' + ], + id: '54e2cb2d8fc90956e0d464e4', + mdbids: [ + 323384, + 256835, + 285135, + 47626, + 226360, + 287954, + 13187, + 13675, + 18637, + 74849, + 289394, + 64679, + 31428, + 325642, + 4546, + 217292, + 197624, + 13400, + 72115 + ], + mdbid: 10770, + created_at: '2015-02-17T05:01:33+0000', + poster_paths: [ + null, + '/aGDVBwpxlA95mn7yTxwM8r0oTR0.jpg', + '/dafW2jgYi345RLn4cFoyCol4mUk.jpg', + '/kQXniShyRw5b0aEppkaWhesRelD.jpg', + '/7BduKfMtcj0nssxoy4mvvVB294h.jpg', + '/buoq7zYO4J3ttkEAqEMWelPDC0G.jpg', + '/3Bn0tc1BsheZwUQtvl10wTgQ16J.jpg', + '/sX9LQImeUYNuLZ137Uk7iOBjf4o.jpg', + '/xVTmmJdb5IKNbdT7dKOVARxoRTY.jpg', + '/gW02wV7kJBvcwHR3g3zInTCcwqF.jpg', + '/e4G3tVosLUOS6NdG2XwgBsYOcwl.jpg', + '/ll9H7W4fwZuGyKam03VAjT2oHfv.jpg', + '/vTkbuc3uRXCfprVHjJ3PIthVsTz.jpg', + '/nmVdWSfqTUhAH3HiOS8gbZHIQtt.jpg', + '/8QbyrbsW0eln4lBc7DtZyAJvl3h.jpg', + '/pABrtVmKsq1vXbP6CpTZbjXiu1l.jpg', + '/y1ChvzGMMI5eys69A1wKuRXpSma.jpg', + '/otO3xI0R7O3NcSy2cOFRLlxbSYA.jpg', + '/h3KI8SoEhk5im7HnlZAlXaDLjtB.jpg' + ] + }, + { + title: 'Thriller', + backdrop_path: '/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:33+0000', + backdrop_paths: [ + '/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg', + '/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg', + '/mFb0ygcue4ITixDkdr7wm1Tdarx.jpg', + '/gktL2rfE7d1xrwPSSTohxLOjLSs.jpg', + '/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg', + '/pbZtww8VsNDSwt9eMnG0faELwYV.jpg', + '/rKESeEePWWu4rATQDJOktllaDDv.jpg', + '/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg', + '/83nHcz2KcnEpPXY50Ky2VldewJJ.jpg', + '/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg', + '/fCPqyqCppo0MruBqGXpz5pmUabU.jpg', + '/e56QsaJy1weAUukiK2ZmIGVUALF.jpg', + '/qjfE7SkPXpqFs8FX8rIaG6eO2aK.jpg', + '/rjUl3pd1LHVOVfG4IGcyA1cId5l.jpg', + '/nnMC0BM6XbjIIrT4miYmMtPGcQV.jpg', + '/c07g3JVBJ6dSO50PsrNG1N5VYmu.jpg', + '/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg', + '/s9DKwK5fXzaqFOzkZkidkOk4KR9.jpg', + '/6AocjTM7B0RII4qrXG40wI1rEF3.jpg', + '/biw5Nn85iBZZd8GWYO9XXH56VK2.jpg' + ], + poster_path: '/lTbbt8otsYLKRDvELMRn83wdNoW.jpg', + id: '54e2cb2db1e3a30994751f34', + mdbids: [ + 260346, + 210577, + 245891, + 242582, + 205596, + 265208, + 156022, + 198663, + 131631, + 604, + 312526, + 169917, + 82992, + 119450, + 155, + 101299, + 72190, + 206487, + 245916, + 201088 + ], + mdbid: 53, + created_at: '2015-02-17T05:01:33+0000', + poster_paths: [ + '/lTbbt8otsYLKRDvELMRn83wdNoW.jpg', + '/gdiLTof3rbPDAmPaCf4g6op46bj.jpg', + '/sq2MmFv9sanl9PFMfbdaBLveSJ8.jpg', + '/8oPY6ULFOTbAEskySNhgsUIN4fW.jpg', + '/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg', + '/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg', + '/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg', + '/coss7RgL0NH6g4fC2s5atvf3dFO.jpg', + '/cWERd8rgbw7bCMZlwP207HUXxym.jpg', + '/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg', + '/5B182VoY6ZJh0a6kbp9k9UPvl2D.jpg', + '/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg', + '/kBXgGUt07sLpw6rhpiYwEyOwUDa.jpg', + '/2EUAUIu5lHFlkj5FRryohlH6CRO.jpg', + '/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg', + '/tAhSyLxpaZJCr1oc2a3flvC2B7x.jpg', + '/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg', + '/i1trVjOx8rpVQ4zMVvtm5YXG9yA.jpg', + '/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg', + '/tn07zjNNIJuOsecqTC2JEYA49uU.jpg' + ] + }, + { + title: 'War', + backdrop_path: '/pKawqrtCBMmxarft7o1LbEynys7.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:33+0000', + backdrop_paths: [ + '/pKawqrtCBMmxarft7o1LbEynys7.jpg', + '/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg', + '/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg', + '/7BhTIyySTmmqNaoguSPjZAVMoQG.jpg', + '/dwRCptswUg5T27EM6hyXPlObRbE.jpg', + '/krkkgbtWHlMXVLbPGdIxzxKJERM.jpg', + '/mXJnEzFHmchkMkuvaJ25eV4qWL5.jpg', + '/4y5TDUZlqUmWWtjTAznWb6CFpzt.jpg', + '/8Sh5rRcOrBy4AIm3keZ50dOIn4D.jpg', + '/7nF6B9yCEq1ZCT82sGJVtNxOcl5.jpg', + '/9iZJAidcAdkoYtVx6ywjFbD3Aek.jpg', + '/cD7lPdjFyf5dQIlc6ToehqFrIZU.jpg', + '/q83wt7MsAWHNN1jNFXQb0bnCghe.jpg', + '/5tc7kIF9MXLwSDyW61sj4jTvBxX.jpg', + '/rIpSszng8P0DL0TimSzZbpfnvh1.jpg', + '/nhHsH7qUySVTY57mxf231xO7Fga.jpg', + '/cVkTGLthpromkyzyCFLvvLPZxFM.jpg', + '/9GyBSsMiGkPSk4OESIYZuedijBI.jpg', + '/haOTy0A9tMaoEEWdoaGavBnPQfY.jpg', + '/cDctk61tUeQz4LX7tTFPknI28ea.jpg' + ], + poster_path: '/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg', + id: '54e2cb2d8fc9090996d2de81', + mdbids: [ + 228150, + 49017, + 205596, + 190859, + 53182, + 193756, + 197, + 857, + 935, + 16869, + 227306, + 409, + 152760, + 1368, + 424, + 289, + 600, + 744, + 72976, + 676 + ], + mdbid: 10752, + created_at: '2015-02-17T05:01:33+0000', + poster_paths: [ + '/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg', + '/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg', + '/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg', + '/ooy5M7QXEWVpOTAZIRGMskBQbQ9.jpg', + '/bRE7nmNuZzciep7MDkNfuTrM9zW.jpg', + '/c7Sqof18FgkoNcA0r5BFUcPLER1.jpg', + '/2qAgGeYdLjelOEqjW9FYvPHpplC.jpg', + '/35CMz4t7PuUiQqt5h4u5nbrXZlF.jpg', + '/ls9r2SG2IHJyCfpT0vxZZiT7ynF.jpg', + '/vDwqPyhkzFPRDmwz9KbzN2ouEPe.jpg', + '/e0etqHTsH7kSKR5orkUM5TjHXmy.jpg', + '/niqc0v3Lclh99Mmmxm49qZTIo2e.jpg', + '/m4puTcUAFtFJBLMVoRs0FLk3ET3.jpg', + '/jkzJg3WYFf2SPFVfyeRQL75vFzu.jpg', + '/yPisjyLweCl1tbgwgtzBCNCBle.jpg', + '/sm1QVZu5RKe1vXVHZooo4SZyHMx.jpg', + '/29veIwD38rVL2qY74emXQw4y25H.jpg', + '/orGXnBKfT41LxZhitLkXhqUfJJW.jpg', + '/gkkiDu9srCCbCMxGKwNwKCxK7KF.jpg', + '/gzjMpcyV1RksWonaA87DZ8wQTH0.jpg' + ] + }, + { + title: 'Western', + backdrop_path: '/qUcmEqnzIwlwZxSyTf3WliSfAjJ.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T05:01:33+0000', + backdrop_paths: [ + '/qUcmEqnzIwlwZxSyTf3WliSfAjJ.jpg', + '/tkxiEwG9xJIbyzvJSGYUyTkz3Mj.jpg', + '/vNNWdSVML7sXSzf4N4BLgVVKNFu.jpg', + '/lagdbLlNPVVbFczUgRnGjdeKeQC.jpg', + '/xGC2fY5KFmtuXnsuQwYQKFOLZFy.jpg', + '/tzJmubvEPw2etDhzqpA6Wb3K2EZ.jpg', + '/sgcgfrlOOB6lVXbfl75YTszF4jI.jpg', + '/wDPmggrApz7nxy4BAQk3rCLi3R6.jpg', + '/mndYimxcima4Z5YxH8XngTEGi5L.jpg', + '/gkW2RMlwl4kqaMIDjaAE73rAPpZ.jpg', + '/6A3UPYZEnMUlUgC7XOMntvdT0ni.jpg', + '/iob9MPYquOckNbhhjFUazRDlgGG.jpg', + '/gmapSsDGkPNPRxaQXLdotYkYKzM.jpg', + '/1tH9AnFjBFemdowMfDrnnhY8Y1z.jpg', + '/ftKZn79wtRqPdBJ95s5DGqbfhSy.jpg', + '/oTbK2deLtUKlIEpR7iU4acqnrZI.jpg', + '/pV3LyrIFTodujodc9mceF92zZog.jpg', + '/bhWbbMA70zc67Ba0OVLOFz8sRre.jpg', + '/izqIXYopCnJbL5LDm3X30RF8gLI.jpg', + '/nKYH8DaWjKE3RhEyaa0Ue01kPCp.jpg' + ], + poster_path: '/5WJnxuw41sddupf8cwOxYftuvJG.jpg', + id: '54e2cb2da88c820980760616', + mdbids: [ + 68718, + 188161, + 266285, + 335, + 429, + 11072, + 57201, + 44264, + 391, + 581, + 215379, + 3114, + 49849, + 2023, + 4476, + 152748, + 642, + 10747, + 6038, + 33 + ], + mdbid: 37, + created_at: '2015-02-17T05:01:33+0000', + poster_paths: [ + '/5WJnxuw41sddupf8cwOxYftuvJG.jpg', + '/12fqfvUmBOPg2pA0RsEhc31P28O.jpg', + '/pzKXVk5NZH8Uw1tBS9YE1dLva6x.jpg', + '/rVAHRtAMhV8QVXQMQ8NxNbZXCDp.jpg', + '/8PD1dgf0kQHtRawoSxp1jFemI1q.jpg', + '/yccgwPNVaqtgS1d0U5jjM6Mnza8.jpg', + '/b4vil5ueYJNBNypHmo1tpuevh4z.jpg', + '/qc7vaF5fIeTllAykdP3wldlMyRh.jpg', + '/sFLgxvtK9vxbNq502peVJ847Owp.jpg', + '/hpmclspug1I8EwKSWhL7pWWltA.jpg', + '/ocQ3rPqTkzLrj2zsTuIGjtpp9cJ.jpg', + '/Ai1lpWFaBHH3szTSBz7eZT3iobi.jpg', + '/tXEHvxU315Yu7bEaMMRcpDpW6RI.jpg', + '/5BiWWo12FnSFTatD8dfMpoF7bVs.jpg', + '/uh0sJcx3SLtclJSuKAXl6Tt6AV0.jpg', + '/l55xYXNXWHikLN1fX19gJjD91kB.jpg', + '/bIQQm0M2frhkctqR5vPyU1qqcZm.jpg', + '/59ywz8rQmXn4bl60WOMJddPc7z.jpg', + '/2H2h2Qdt2TXLQslCHi8xEDDONpq.jpg', + '/9oPodyvCWyPMZJDjg29tBfFRwtG.jpg' + ] + } +]; diff --git a/app/lib/data/lists.json b/app/lib/data/lists.json index ddf785e..1bb1fbc 100644 --- a/app/lib/data/lists.json +++ b/app/lib/data/lists.json @@ -1,310 +1,310 @@ [ - { - "list_id": "now_playing", - "title": "Now Playing", - "backdrop_path": "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T04:59:25+0000", - "backdrop_paths": [ - "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", - "/nnY2XnO3zjpkdq7xxOZPyI1r6V0.jpg", - "/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg", - "/pbZtww8VsNDSwt9eMnG0faELwYV.jpg", - "/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg", - "/7QCoaQQ8UE1kKNr13amz190Q6Fy.jpg", - "/qBZswxe7zqHEhfZXVHdlwjwSh7H.jpg", - "/biw5Nn85iBZZd8GWYO9XXH56VK2.jpg", - "/mkzpFIJmndBOfUteS7n3fI04lX3.jpg", - "/scVPsqO1MryjgbJuGg2JsWTE3WD.jpg", - "/Aq0EuKR46NNXw6c8WJV9bYljzCD.jpg", - "/1DMrM1RDSClzeabdrTejEYtTFMU.jpg", - "/j0cBcUtenrbhX0acGZLxYWDbScx.jpg", - "/tGyXLY1jzK29z9blMzy0yc3qTG8.jpg", - "/8bXlXJtPAaSNYeWzdH4CG8TAsbJ.jpg", - null, - "/3ReehmXMwnhwqdvjzECb72Xw27W.jpg", - "/lYJedpGH3p4oWyVabsekwkULNvz.jpg", - "/yIAxebMW8bvGJhZO8Q3TSi4zMDQ.jpg", - null - ], - "poster_path": "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", - "id": "54da1dd4a88c8209802f25a8", - "mdbids": [ - 76757, - 216015, - 260346, - 265208, - 207703, - 315024, - 317121, - 201088, - 322456, - 68737, - 241251, - 228165, - 324787, - 307663, - 206296, - 324601, - 210860, - 319633, - 297556, - 302960 - ], - "created_at": "2015-02-10T15:03:48+0000", - "order": 0, - "poster_paths": [ - "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", - "/vHX9fxgipKgp9UXJxYNzyhnypQl.jpg", - "/lTbbt8otsYLKRDvELMRn83wdNoW.jpg", - "/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg", - "/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg", - "/vYAvnSWC0LkH58cOeExajuuSrUC.jpg", - "/bTC4LPtLdnx9bleEcJJ08KVuIkv.jpg", - "/tn07zjNNIJuOsecqTC2JEYA49uU.jpg", - "/qTVlKThCmXOFryiiTJHBMgHhdAv.jpg", - "/saJi9Vs37zLmUENyIEdhgURk3a1.jpg", - "/9scuwyaJBqxMmapuyts4s2zt9sP.jpg", - "/9wChSuUoQDiBKUnGTcYMkzRha60.jpg", - "/2FXTYOn4S4uInujHS4qMU8gwV97.jpg", - "/nGULYz1iLVAeS9dQkZZ2oNTt4s3.jpg", - "/nPHemX0bcR5OyGPdPVUpIgwFqex.jpg", - null, - "/chgpheyKaJzOVN6u3n2tJupO4aC.jpg", - "/AmkLAKsETY0ZDTNGfXgybOmMGXF.jpg", - "/3n0zmm2dPF0TQt2ikJ2tUjKr2FT.jpg", - "/Mx9dBrZaVJlFmdebfao08FO6Z.jpg" - ] - }, - { - "list_id": "upcoming", - "title": "Upcoming", - "backdrop_path": "/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T04:59:24+0000", - "backdrop_paths": [ - "/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg", - "/jmZ8cnELpLGhEEgoRp5QR5VoGyp.jpg", - "/snnEAySuzjY7qmCQ5mJpxin7G6d.jpg", - "/c8kSlfYBUap9csjYkKd22aOypcu.jpg", - "/5KnJ8T0ynd0EDEd1gYCDmGvPVjE.jpg", - null, - "/2AmaN4jrpl2xz48mYqQeSBzhwhX.jpg", - null, - null, - null, - null, - "/wIFCpX549uyfGbiMqeHsz0Yvymz.jpg", - null, - "/ekrLcwLhqypvzz6GuJ6x7KlGvR3.jpg", - "/89LLa0mSHoJn2QAqsMRDBggEE2f.jpg", - "/bTtMPoc7iatQfja8z13GNNNrNSF.jpg", - "/rbKVsANECkgZ1s52rVYFMLghs7j.jpg", - "/sH4J1XiOx4PJ2cZ6toEDOcFeGOl.jpg", - null, - "/5sgK02F3bKKVIsOtUswzmUw4hA1.jpg" - ], - "poster_path": "/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg", - "id": "54da1dd38fc90909968ca17b", - "mdbids": [ - 316322, - 289720, - 298032, - 244316, - 198184, - 321377, - 272693, - 323020, - 299710, - 272634, - 309302, - 322443, - 320132, - 297239, - 300168, - 243938, - 228203, - 297270, - 299822, - 319513 - ], - "created_at": "2015-02-10T15:03:47+0000", - "order": 1, - "poster_paths": [ - "/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg", - "/dUIubxF5osHOJxS3mJNWCqTqWn5.jpg", - "/9Ivu97Dej7zD2G4xnaK8zkDWwJC.jpg", - "/uYtl5SBJzmk9HMcOgwtsjWNXs0o.jpg", - "/nIQOgiHnAF9fnvqnOO0etd0YIb9.jpg", - "/7Vm0FymDPlstRt6WusaJbmZVzRS.jpg", - "/yZlIxGm61jIGq8b3YmMiWaKGvIz.jpg", - "/sJKCBIlRAuAx0436t231LRLoqWa.jpg", - "/iqIaXLOQeOELAvtuchkEghIN5ay.jpg", - null, - "/szxELMq84TgMtuI6NqYFgjAh3O0.jpg", - "/5zfxgiWdWDM9WRu8DiDBdgAohiK.jpg", - null, - "/2jG4mqV3Z1HY1uKz21PGLUfeuZM.jpg", - "/3gl11EsZS5vboQvvMYeCIzitaJz.jpg", - "/tSUuubFMZZVmGNGSP8S9bkH3BLP.jpg", - "/86bY7OdITV3PewH3utGhFdgejq1.jpg", - "/lKNYRlJ9jJAPU7yNYU0qTSQ4AYa.jpg", - "/bch1TOaN7T1WSHTnVaGp2PwcWFm.jpg", - "/3HNi27VKFzE1HJkjemDWqequHZF.jpg" - ] - }, - { - "list_id": "popular", - "title": "Popular", - "backdrop_path": "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T04:59:24+0000", - "backdrop_paths": [ - "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", - "/7OluTl9LoaMDZ2MVdrFVuU2os09.jpg", - "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", - "/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg", - "/nnY2XnO3zjpkdq7xxOZPyI1r6V0.jpg", - "/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg", - "/pKawqrtCBMmxarft7o1LbEynys7.jpg", - "/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg", - "/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg", - "/umR9aXTxOxQUuDH2DamoJ5fIPB.jpg", - "/mFb0ygcue4ITixDkdr7wm1Tdarx.jpg", - "/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg", - "/pMNSiNT55XrxWPmoI5ytJyinRa8.jpg", - "/gktL2rfE7d1xrwPSSTohxLOjLSs.jpg", - "/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg", - "/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg", - "/pbZtww8VsNDSwt9eMnG0faELwYV.jpg", - "/eCgIoGvfNXrbSiQGqQHccuHjQHm.jpg", - "/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg", - "/rKESeEePWWu4rATQDJOktllaDDv.jpg" - ], - "poster_path": "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", - "id": "54da1dd28fc90956e08e8acf", - "mdbids": [ - 76757, - 227159, - 177572, - 194662, - 216015, - 244786, - 228150, - 260346, - 210577, - 122917, - 245891, - 49017, - 100042, - 242582, - 118340, - 205596, - 265208, - 240832, - 157336, - 156022 - ], - "created_at": "2015-02-10T15:03:46+0000", - "order": 2, - "poster_paths": [ - "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", - "/zRkLCOx7o9tjPYb9s7u6mpw8VOs.jpg", - "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", - "/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg", - "/vHX9fxgipKgp9UXJxYNzyhnypQl.jpg", - "/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg", - "/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg", - "/lTbbt8otsYLKRDvELMRn83wdNoW.jpg", - "/gdiLTof3rbPDAmPaCf4g6op46bj.jpg", - "/vgAHvS0bT3fpcpnJqT6uDTUsHTo.jpg", - "/sq2MmFv9sanl9PFMfbdaBLveSJ8.jpg", - "/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg", - "/Ekw3ijq9L6RiKvv5m2tPOEklHF.jpg", - "/8oPY6ULFOTbAEskySNhgsUIN4fW.jpg", - "/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg", - "/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg", - "/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg", - "/4Y9PMR6hO2YWu2BrNhix4lHRA58.jpg", - "/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg", - "/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg" - ] - }, - { - "list_id": "top_rated", - "title": "Top Rated", - "backdrop_path": "/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg", - "user_id": "53da46c1485fc30823004750", - "updated_at": "2015-02-17T04:59:24+0000", - "backdrop_paths": [ - "/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg", - "/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg", - "/cqn1ynw78Wan37jzs1Ckm7va97G.jpg", - "/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg", - "/sFQ10h9DnjOYIF4HjtLQuZ8pnb4.jpg", - "/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg", - "/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg", - "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", - "/hZWp4W5aQvGm1WiiGFYIuBUOQ3K.jpg", - "/61vLiK96sbXeHpQiMxI4CuqBA3z.jpg", - "/xBKGJQsAIeweesB79KC89FpBrVr.jpg", - "/iob9MPYquOckNbhhjFUazRDlgGG.jpg", - "/p4lpdTn3nW8nZBzyAU5kbb7PPBr.jpg", - "/ddlMODFJUjvhzrymuW7O7KPuhVL.jpg", - "/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg", - "/lH2Ga8OzjU1XlxJ73shOlPx6cRw.jpg", - "/b7BxW3C4cjVKOlKzFBoMUgyNt6A.jpg", - "/6xKCYgH16UuwEGAyroLU6p8HLIn.jpg", - "/wFkv7l6iz0fgXtmS24lTNyz8tV8.jpg", - "/xxAgWR8WVBoXDUIopqHNYFxyla6.jpg" - ], - "poster_path": "/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg", - "id": "54da1dd2b1e3a3099c2f4f0f", - "mdbids": [ - 157336, - 244786, - 140420, - 205596, - 13042, - 207703, - 118340, - 177572, - 222935, - 346, - 278, - 3114, - 83564, - 169813, - 210577, - 389, - 46738, - 238, - 599, - 24480 - ], - "created_at": "2015-02-10T15:03:46+0000", - "order": 3, - "poster_paths": [ - "/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg", - "/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg", - "/xBo8dd2zUbMvcypwScDN3mpN7IZ.jpg", - "/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg", - "/A2rxR8g3y6kcjIoR2fcwtq9eppc.jpg", - "/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg", - "/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg", - "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", - "/sc6XLX6J714LDkVV3Ys3clgypQS.jpg", - "/5hqbJSmtAimbaP3XcYshCixuUtk.jpg", - "/9O7gLzmreU0nGkIB6K3BsJbzvNv.jpg", - "/Ai1lpWFaBHH3szTSBz7eZT3iobi.jpg", - "/py4pMp6QlKUjjzCk8icZ2GrYw3Z.jpg", - "/wYkiNNMM1O5c2yEcj8Lf9UbaB1a.jpg", - "/gdiLTof3rbPDAmPaCf4g6op46bj.jpg", - "/wvlFtIwh0GIqHRAz9F5cCch2IJD.jpg", - "/sEUG3qjxwHjxkzuO7plrRHhOZUH.jpg", - "/d4KNaTrltq6bpkFS01pYtyXa09m.jpg", - "/oFwzvRgfxJc0FUr2mwYTi10dk3G.jpg", - "/5M5bg79OV96Vb4O0fDjX5clxASG.jpg" - ] - } -] + { + list_id: 'now_playing', + title: 'Now Playing', + backdrop_path: '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T04:59:25+0000', + backdrop_paths: [ + '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', + '/nnY2XnO3zjpkdq7xxOZPyI1r6V0.jpg', + '/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg', + '/pbZtww8VsNDSwt9eMnG0faELwYV.jpg', + '/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg', + '/7QCoaQQ8UE1kKNr13amz190Q6Fy.jpg', + '/qBZswxe7zqHEhfZXVHdlwjwSh7H.jpg', + '/biw5Nn85iBZZd8GWYO9XXH56VK2.jpg', + '/mkzpFIJmndBOfUteS7n3fI04lX3.jpg', + '/scVPsqO1MryjgbJuGg2JsWTE3WD.jpg', + '/Aq0EuKR46NNXw6c8WJV9bYljzCD.jpg', + '/1DMrM1RDSClzeabdrTejEYtTFMU.jpg', + '/j0cBcUtenrbhX0acGZLxYWDbScx.jpg', + '/tGyXLY1jzK29z9blMzy0yc3qTG8.jpg', + '/8bXlXJtPAaSNYeWzdH4CG8TAsbJ.jpg', + null, + '/3ReehmXMwnhwqdvjzECb72Xw27W.jpg', + '/lYJedpGH3p4oWyVabsekwkULNvz.jpg', + '/yIAxebMW8bvGJhZO8Q3TSi4zMDQ.jpg', + null + ], + poster_path: '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', + id: '54da1dd4a88c8209802f25a8', + mdbids: [ + 76757, + 216015, + 260346, + 265208, + 207703, + 315024, + 317121, + 201088, + 322456, + 68737, + 241251, + 228165, + 324787, + 307663, + 206296, + 324601, + 210860, + 319633, + 297556, + 302960 + ], + created_at: '2015-02-10T15:03:48+0000', + order: 0, + poster_paths: [ + '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', + '/vHX9fxgipKgp9UXJxYNzyhnypQl.jpg', + '/lTbbt8otsYLKRDvELMRn83wdNoW.jpg', + '/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg', + '/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg', + '/vYAvnSWC0LkH58cOeExajuuSrUC.jpg', + '/bTC4LPtLdnx9bleEcJJ08KVuIkv.jpg', + '/tn07zjNNIJuOsecqTC2JEYA49uU.jpg', + '/qTVlKThCmXOFryiiTJHBMgHhdAv.jpg', + '/saJi9Vs37zLmUENyIEdhgURk3a1.jpg', + '/9scuwyaJBqxMmapuyts4s2zt9sP.jpg', + '/9wChSuUoQDiBKUnGTcYMkzRha60.jpg', + '/2FXTYOn4S4uInujHS4qMU8gwV97.jpg', + '/nGULYz1iLVAeS9dQkZZ2oNTt4s3.jpg', + '/nPHemX0bcR5OyGPdPVUpIgwFqex.jpg', + null, + '/chgpheyKaJzOVN6u3n2tJupO4aC.jpg', + '/AmkLAKsETY0ZDTNGfXgybOmMGXF.jpg', + '/3n0zmm2dPF0TQt2ikJ2tUjKr2FT.jpg', + '/Mx9dBrZaVJlFmdebfao08FO6Z.jpg' + ] + }, + { + list_id: 'upcoming', + title: 'Upcoming', + backdrop_path: '/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T04:59:24+0000', + backdrop_paths: [ + '/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg', + '/jmZ8cnELpLGhEEgoRp5QR5VoGyp.jpg', + '/snnEAySuzjY7qmCQ5mJpxin7G6d.jpg', + '/c8kSlfYBUap9csjYkKd22aOypcu.jpg', + '/5KnJ8T0ynd0EDEd1gYCDmGvPVjE.jpg', + null, + '/2AmaN4jrpl2xz48mYqQeSBzhwhX.jpg', + null, + null, + null, + null, + '/wIFCpX549uyfGbiMqeHsz0Yvymz.jpg', + null, + '/ekrLcwLhqypvzz6GuJ6x7KlGvR3.jpg', + '/89LLa0mSHoJn2QAqsMRDBggEE2f.jpg', + '/bTtMPoc7iatQfja8z13GNNNrNSF.jpg', + '/rbKVsANECkgZ1s52rVYFMLghs7j.jpg', + '/sH4J1XiOx4PJ2cZ6toEDOcFeGOl.jpg', + null, + '/5sgK02F3bKKVIsOtUswzmUw4hA1.jpg' + ], + poster_path: '/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg', + id: '54da1dd38fc90909968ca17b', + mdbids: [ + 316322, + 289720, + 298032, + 244316, + 198184, + 321377, + 272693, + 323020, + 299710, + 272634, + 309302, + 322443, + 320132, + 297239, + 300168, + 243938, + 228203, + 297270, + 299822, + 319513 + ], + created_at: '2015-02-10T15:03:47+0000', + order: 1, + poster_paths: [ + '/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg', + '/dUIubxF5osHOJxS3mJNWCqTqWn5.jpg', + '/9Ivu97Dej7zD2G4xnaK8zkDWwJC.jpg', + '/uYtl5SBJzmk9HMcOgwtsjWNXs0o.jpg', + '/nIQOgiHnAF9fnvqnOO0etd0YIb9.jpg', + '/7Vm0FymDPlstRt6WusaJbmZVzRS.jpg', + '/yZlIxGm61jIGq8b3YmMiWaKGvIz.jpg', + '/sJKCBIlRAuAx0436t231LRLoqWa.jpg', + '/iqIaXLOQeOELAvtuchkEghIN5ay.jpg', + null, + '/szxELMq84TgMtuI6NqYFgjAh3O0.jpg', + '/5zfxgiWdWDM9WRu8DiDBdgAohiK.jpg', + null, + '/2jG4mqV3Z1HY1uKz21PGLUfeuZM.jpg', + '/3gl11EsZS5vboQvvMYeCIzitaJz.jpg', + '/tSUuubFMZZVmGNGSP8S9bkH3BLP.jpg', + '/86bY7OdITV3PewH3utGhFdgejq1.jpg', + '/lKNYRlJ9jJAPU7yNYU0qTSQ4AYa.jpg', + '/bch1TOaN7T1WSHTnVaGp2PwcWFm.jpg', + '/3HNi27VKFzE1HJkjemDWqequHZF.jpg' + ] + }, + { + list_id: 'popular', + title: 'Popular', + backdrop_path: '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T04:59:24+0000', + backdrop_paths: [ + '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', + '/7OluTl9LoaMDZ2MVdrFVuU2os09.jpg', + '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', + '/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg', + '/nnY2XnO3zjpkdq7xxOZPyI1r6V0.jpg', + '/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg', + '/pKawqrtCBMmxarft7o1LbEynys7.jpg', + '/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg', + '/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg', + '/umR9aXTxOxQUuDH2DamoJ5fIPB.jpg', + '/mFb0ygcue4ITixDkdr7wm1Tdarx.jpg', + '/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg', + '/pMNSiNT55XrxWPmoI5ytJyinRa8.jpg', + '/gktL2rfE7d1xrwPSSTohxLOjLSs.jpg', + '/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg', + '/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg', + '/pbZtww8VsNDSwt9eMnG0faELwYV.jpg', + '/eCgIoGvfNXrbSiQGqQHccuHjQHm.jpg', + '/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg', + '/rKESeEePWWu4rATQDJOktllaDDv.jpg' + ], + poster_path: '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', + id: '54da1dd28fc90956e08e8acf', + mdbids: [ + 76757, + 227159, + 177572, + 194662, + 216015, + 244786, + 228150, + 260346, + 210577, + 122917, + 245891, + 49017, + 100042, + 242582, + 118340, + 205596, + 265208, + 240832, + 157336, + 156022 + ], + created_at: '2015-02-10T15:03:46+0000', + order: 2, + poster_paths: [ + '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', + '/zRkLCOx7o9tjPYb9s7u6mpw8VOs.jpg', + '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', + '/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg', + '/vHX9fxgipKgp9UXJxYNzyhnypQl.jpg', + '/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg', + '/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg', + '/lTbbt8otsYLKRDvELMRn83wdNoW.jpg', + '/gdiLTof3rbPDAmPaCf4g6op46bj.jpg', + '/vgAHvS0bT3fpcpnJqT6uDTUsHTo.jpg', + '/sq2MmFv9sanl9PFMfbdaBLveSJ8.jpg', + '/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg', + '/Ekw3ijq9L6RiKvv5m2tPOEklHF.jpg', + '/8oPY6ULFOTbAEskySNhgsUIN4fW.jpg', + '/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg', + '/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg', + '/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg', + '/4Y9PMR6hO2YWu2BrNhix4lHRA58.jpg', + '/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg', + '/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg' + ] + }, + { + list_id: 'top_rated', + title: 'Top Rated', + backdrop_path: '/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg', + user_id: '53da46c1485fc30823004750', + updated_at: '2015-02-17T04:59:24+0000', + backdrop_paths: [ + '/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg', + '/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg', + '/cqn1ynw78Wan37jzs1Ckm7va97G.jpg', + '/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg', + '/sFQ10h9DnjOYIF4HjtLQuZ8pnb4.jpg', + '/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg', + '/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg', + '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', + '/hZWp4W5aQvGm1WiiGFYIuBUOQ3K.jpg', + '/61vLiK96sbXeHpQiMxI4CuqBA3z.jpg', + '/xBKGJQsAIeweesB79KC89FpBrVr.jpg', + '/iob9MPYquOckNbhhjFUazRDlgGG.jpg', + '/p4lpdTn3nW8nZBzyAU5kbb7PPBr.jpg', + '/ddlMODFJUjvhzrymuW7O7KPuhVL.jpg', + '/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg', + '/lH2Ga8OzjU1XlxJ73shOlPx6cRw.jpg', + '/b7BxW3C4cjVKOlKzFBoMUgyNt6A.jpg', + '/6xKCYgH16UuwEGAyroLU6p8HLIn.jpg', + '/wFkv7l6iz0fgXtmS24lTNyz8tV8.jpg', + '/xxAgWR8WVBoXDUIopqHNYFxyla6.jpg' + ], + poster_path: '/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg', + id: '54da1dd2b1e3a3099c2f4f0f', + mdbids: [ + 157336, + 244786, + 140420, + 205596, + 13042, + 207703, + 118340, + 177572, + 222935, + 346, + 278, + 3114, + 83564, + 169813, + 210577, + 389, + 46738, + 238, + 599, + 24480 + ], + created_at: '2015-02-10T15:03:46+0000', + order: 3, + poster_paths: [ + '/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg', + '/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg', + '/xBo8dd2zUbMvcypwScDN3mpN7IZ.jpg', + '/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg', + '/A2rxR8g3y6kcjIoR2fcwtq9eppc.jpg', + '/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg', + '/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg', + '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', + '/sc6XLX6J714LDkVV3Ys3clgypQS.jpg', + '/5hqbJSmtAimbaP3XcYshCixuUtk.jpg', + '/9O7gLzmreU0nGkIB6K3BsJbzvNv.jpg', + '/Ai1lpWFaBHH3szTSBz7eZT3iobi.jpg', + '/py4pMp6QlKUjjzCk8icZ2GrYw3Z.jpg', + '/wYkiNNMM1O5c2yEcj8Lf9UbaB1a.jpg', + '/gdiLTof3rbPDAmPaCf4g6op46bj.jpg', + '/wvlFtIwh0GIqHRAz9F5cCch2IJD.jpg', + '/sEUG3qjxwHjxkzuO7plrRHhOZUH.jpg', + '/d4KNaTrltq6bpkFS01pYtyXa09m.jpg', + '/oFwzvRgfxJc0FUr2mwYTi10dk3G.jpg', + '/5M5bg79OV96Vb4O0fDjX5clxASG.jpg' + ] + } +]; diff --git a/app/lib/navigation.js b/app/lib/navigation.js index 9517646..a0dfe40 100644 --- a/app/lib/navigation.js +++ b/app/lib/navigation.js @@ -2,7 +2,7 @@ * Movies * * @copyright - * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. + * Copyright (c) 2015-present by Appcelerator, Inc. All Rights Reserved. * * @license * Licensed under the terms of the Apache Public License @@ -22,101 +22,92 @@ /** * The Navigation object - * @param {Object} _args + * @param {Object} _args The arguments passed to the navigation window * @param {Object} _args.parent The parent which this navigation stack will belong * @constructor */ function Navigation(_args) { - var that = this; - - _args = _args || {}; - - /** - * The parent navigation window (iOS only) - * @type {Object} - */ - this.parent = _args.parent; - - this.controllers = [], - this.currentController = null; - this.currentControllerArguments = {}; - - /** - * Open a screen controller - * @param {String} _controller - * @param {Object} _controllerArguments The arguments for the controller (optional) - * @return {Controllers} Returns the new controller - */ - this.push = function (_controller, _controllerArguments) { - if (typeof _controller === 'string') { - var controller = Alloy.createController('/' + _controller, _controllerArguments); - } else { - var controller = _controller; - } - that.currentController = controller; - that.currentControllerArguments = _controllerArguments; - that.controllers.push(controller); - - if (OS_IOS) { - that.parent.openWindow(controller.window); - } else { - controller.window.open(); - } - - return controller; - }, - - this.pop = function () { - - var controller = that.controllers.pop(); - var window = controller.window; - - if (OS_IOS) { - that.parent.closeWindow(window); - } else { - window.close(); - } - - controller.destroy(); - }, - - this.openModal = function (_controller, _controllerArguments) { - var controller = Alloy.createController('/' + _controller, _controllerArguments); - that.currentController = controller; - that.currentControllerArguments = _controllerArguments; + this.parent = (_args || {}).parent; + this.controllers = []; + this.currentController = null; + this.currentControllerArguments = {}; +} - if (OS_IOS) { - controller.window.open({ - modal: true, - animated: false - }); - } else { - controller.window.addEventListener('open', function (e) { - that.setActionBarStyle(controller.window); - }); - controller.window.open(); - } +/** + * Open a screen controller + * @param {String} _controller The controller to push + * @param {Object} _controllerArguments The arguments for the controller (optional) + * @return {Array} Returns the new controller + */ +Navigation.prototype.push = function (_controller, _controllerArguments) { + let controller; + + if (typeof _controller === 'string') { + controller = Alloy.createController('/' + _controller, _controllerArguments); + } else { + controller = _controller; + } + this.currentController = controller; + this.currentControllerArguments = _controllerArguments; + this.controllers.push(controller); + + if (OS_IOS) { + this.parent.openWindow(controller.window); + } else { + controller.window.open(); + } + + return controller; +}; - return controller; - }, +Navigation.prototype.pop = function () { + var controller = this.controllers.pop(); + var window = controller.window; - this.closeModal = function (_controller) { + if (OS_IOS) { + this.parent.closeWindow(window); + } else { + window.close(); + } - if (OS_IOS) { - _controller.window.close(); - _controller.window = null; - } else { - _controller.window.close(); - _controller.window = null; - } + controller.destroy(); +}; - _controller.destroy(); - _controller = null; - }; +Navigation.prototype.openModal = function (_controller, _controllerArguments) { + var controller = Alloy.createController('/' + _controller, _controllerArguments); + this.currentController = controller; + this.currentControllerArguments = _controllerArguments; + + if (OS_IOS) { + controller.window.open({ + modal: true, + animated: false + }); + } else { + const that = this; + controller.window.addEventListener('open', function () { + that.setActionBarStyle(controller.window); + }); + controller.window.open(); + } + + return controller; +}; -} +Navigation.prototype.closeModal = function (_controller) { + if (OS_IOS) { + _controller.window.close(); + _controller.window = null; + } else { + _controller.window.close(); + _controller.window = null; + } + + _controller.destroy(); + _controller = null; +}; // Calling this module function returns a new navigation instance module.exports = function (_args) { - return new Navigation(_args); + return new Navigation(_args); }; diff --git a/app/lib/tests/specs/app_tests.js b/app/lib/tests/specs/app_tests.js index 5bc6c76..0521e08 100644 --- a/app/lib/tests/specs/app_tests.js +++ b/app/lib/tests/specs/app_tests.js @@ -4,7 +4,7 @@ * Movies * * @copyright - * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. + * Copyright (c) 2015-present by Appcelerator, Inc. All Rights Reserved. * * @license * Licensed under the terms of the Apache Public License diff --git a/app/lib/themoviedb.js b/app/lib/themoviedb.js index d1536f6..fc8e293 100644 --- a/app/lib/themoviedb.js +++ b/app/lib/themoviedb.js @@ -1,1612 +1,1606 @@ var theMovieDb = {}; theMovieDb.common = { - api_key: 'b31a733f2ca3cca5cf04cfdf1650a6d0', - base_uri: 'http://api.themoviedb.org/3/', - images_uri: 'http://image.tmdb.org/t/p/', - timeout: 5000, - generateQuery: function (options) { - 'use strict'; - var myOptions, query, option; - - myOptions = options || {}; - query = '?api_key=' + theMovieDb.common.api_key; - - if (Object.keys(myOptions).length > 0) { - for (option in myOptions) { - if (myOptions.hasOwnProperty(option) && option !== 'id' && option !== 'body') { - query = query + '&' + option + '=' + myOptions[option]; - } - } - } - return query; - }, - validateCallbacks: function (callbacks) { - 'use strict'; - if (typeof callbacks[0] !== 'function' || typeof callbacks[1] !== 'function') { - throw 'Success and error parameters must be functions!'; - } - }, - validateRequired: function (args, argsReq, opt, optReq, allOpt) { - 'use strict'; - var i, allOptional; - - allOptional = allOpt || false; - - if (args.length !== argsReq) { - throw 'The method requires ' + argsReq + ' arguments and you are sending ' + args.length + '!'; - } - - if (allOptional) { - return; - } - - if (argsReq > 2) { - for (i = 0; i < optReq.length; i += 1) { - if (!opt.hasOwnProperty(optReq[i])) { - throw optReq[i] + ' is a required parameter and is not present in the options!'; - } - } - } - }, - getImage: function (options) { - 'use strict'; - return theMovieDb.common.images_uri + options.size + '/' + options.file; - }, - client: function (options, success, error) { - 'use strict'; - var method, status, xhr; - - method = options.method || 'GET'; - status = options.status || 200; - // xhr = new XMLHttpRequest(); - xhr = Ti.Network.createHTTPClient(); - - xhr.ontimeout = function () { - error('{"status_code":408,"status_message":"Request timed out"}'); - }; - - xhr.open(method, theMovieDb.common.base_uri + options.url, true); - - if (options.method === 'POST') { - xhr.setRequestHeader('Content-Type', 'application/json'); - xhr.setRequestHeader('Accept', 'application/json'); - } - - xhr.timeout = theMovieDb.common.timeout; - - xhr.onload = function (e) { - if (xhr.readyState === 4) { - if (xhr.status === status) { - success(xhr.responseText); - } else { - error(xhr.responseText); - } - } else { - error(xhr.responseText); - } - }; - - xhr.onerror = function (e) { - error(xhr.responseText); - }; - if (options.method === 'POST') { - xhr.send(JSON.stringify(options.body)); - } else { - xhr.send(null); - } - } + api_key: 'b31a733f2ca3cca5cf04cfdf1650a6d0', + base_uri: 'http://api.themoviedb.org/3/', + images_uri: 'http://image.tmdb.org/t/p/', + timeout: 5000, + generateQuery: function (options) { + 'use strict'; + var myOptions, query, option; + + myOptions = options || {}; + query = '?api_key=' + theMovieDb.common.api_key; + + if (Object.keys(myOptions).length > 0) { + for (option in myOptions) { + if (myOptions.hasOwnProperty(option) && option !== 'id' && option !== 'body') { + query = query + '&' + option + '=' + myOptions[option]; + } + } + } + return query; + }, + validateCallbacks: function (callbacks) { + 'use strict'; + if (typeof callbacks[0] !== 'function' || typeof callbacks[1] !== 'function') { + Ti.API.error('Success and error parameters must be functions!'); + } + }, + validateRequired: function (args, argsReq, opt, optReq, allOpt) { + 'use strict'; + var i, allOptional; + + allOptional = allOpt || false; + + if (args.length !== argsReq) { + Ti.API.error('The method requires ' + argsReq + ' arguments and you are sending ' + args.length + '!'); + } + + if (allOptional) { + return; + } + + if (argsReq > 2) { + for (i = 0; i < optReq.length; i += 1) { + if (!opt.hasOwnProperty(optReq[i])) { + Ti.API.error(optReq[i] + ' is a required parameter and is not present in the options!'); + } + } + } + }, + getImage: function (options) { + 'use strict'; + return theMovieDb.common.images_uri + options.size + '/' + options.file; + }, + client: function (options, success, error) { + 'use strict'; + var method, status, xhr; + + method = options.method || 'GET'; + status = options.status || 200; + // xhr = new XMLHttpRequest(); + xhr = Ti.Network.createHTTPClient(); + + xhr.ontimeout = function () { + error('{"status_code":408,"status_message":"Request timed out"}'); + }; + + xhr.open(method, theMovieDb.common.base_uri + options.url, true); + + if (options.method === 'POST') { + xhr.setRequestHeader('Content-Type', 'application/json'); + xhr.setRequestHeader('Accept', 'application/json'); + } + + xhr.timeout = theMovieDb.common.timeout; + + xhr.onload = function () { + if (xhr.readyState === 4) { + if (xhr.status === status) { + success(xhr.responseText); + } else { + error(xhr.responseText); + } + } else { + error(xhr.responseText); + } + }; + + xhr.onerror = function () { + error(xhr.responseText); + }; + if (options.method === 'POST') { + xhr.send(JSON.stringify(options.body)); + } else { + xhr.send(null); + } + } }; theMovieDb.configurations = { - getConfiguration: function (success, error) { - 'use strict'; + getConfiguration: function (success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 2); + theMovieDb.common.validateRequired(arguments, 2); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'configuration' + theMovieDb.common.generateQuery() - }, - success, - error - ); - } + theMovieDb.common.client( + { + url: 'configuration' + theMovieDb.common.generateQuery() + }, + success, + error + ); + } }; theMovieDb.account = { - getInformation: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'account' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getLists: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'account/' + options.id + '/lists' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getFavoritesMovies: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'account/' + options.id + '/favorite_movies' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - addFavorite: function (options, success, error) { - 'use strict'; - var body; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id', 'movie_id', 'favorite' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - body = { - movie_id: options.movie_id, - favorite: options.favorite - }; - - theMovieDb.common.client( - { - url: 'account/' + options.id + '/favorite' + theMovieDb.common.generateQuery(options), - status: 201, - method: 'POST', - body: body - }, - success, - error - ); - }, - getRatedMovies: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'account/' + options.id + '/rated_movies' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getWatchlist: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'account/' + options.id + '/movie_watchlist' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - addMovieToWatchlist: function (options, success, error) { - 'use strict'; - - var body; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id', 'movie_id', 'movie_watchlist' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - body = { - movie_id: options.movie_id, - movie_watchlist: options.movie_watchlist - }; - - theMovieDb.common.client( - { - url: 'account/' + options.id + '/movie_watchlist' + theMovieDb.common.generateQuery(options), - method: 'POST', - status: 201, - body: body - }, - success, - error - ); - } + getInformation: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'account' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getLists: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'account/' + options.id + '/lists' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getFavoritesMovies: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'account/' + options.id + '/favorite_movies' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + addFavorite: function (options, success, error) { + 'use strict'; + var body; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id', 'movie_id', 'favorite' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + body = { + movie_id: options.movie_id, + favorite: options.favorite + }; + + theMovieDb.common.client( + { + url: 'account/' + options.id + '/favorite' + theMovieDb.common.generateQuery(options), + status: 201, + method: 'POST', + body: body + }, + success, + error + ); + }, + getRatedMovies: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'account/' + options.id + '/rated_movies' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getWatchlist: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'account/' + options.id + '/movie_watchlist' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + addMovieToWatchlist: function (options, success, error) { + 'use strict'; + + var body; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id', 'movie_id', 'movie_watchlist' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + body = { + movie_id: options.movie_id, + movie_watchlist: options.movie_watchlist + }; + + theMovieDb.common.client( + { + url: 'account/' + options.id + '/movie_watchlist' + theMovieDb.common.generateQuery(options), + method: 'POST', + status: 201, + body: body + }, + success, + error + ); + } }; theMovieDb.authentication = { - generateToken: function (success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 2); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'authentication/token/new' + theMovieDb.common.generateQuery() - }, - success, - error - ); - }, - askPermissions: function (options) { - 'use strict'; - - window.open('https://www.themoviedb.org/authenticate/' + options.token + '?redirect_to=' + options.redirect_to); - - }, - validateUser: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'request_token', 'username', 'password' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'authentication/token/validate_with_login' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - generateSession: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'request_token' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'authentication/session/new' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - generateGuestSession: function (success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 2); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'authentication/guest_session/new' + theMovieDb.common.generateQuery() - }, - success, - error - ); - } + generateToken: function (success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 2); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'authentication/token/new' + theMovieDb.common.generateQuery() + }, + success, + error + ); + }, + validateUser: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'request_token', 'username', 'password' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'authentication/token/validate_with_login' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + generateSession: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'request_token' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'authentication/session/new' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + generateGuestSession: function (success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 2); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'authentication/guest_session/new' + theMovieDb.common.generateQuery() + }, + success, + error + ); + } }; theMovieDb.certifications = { - getList: function (success, error) { - 'use strict'; + getList: function (success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 2); + theMovieDb.common.validateRequired(arguments, 2); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'certification/movie/list' + theMovieDb.common.generateQuery() - }, - success, - error - ); - } + theMovieDb.common.client( + { + url: 'certification/movie/list' + theMovieDb.common.generateQuery() + }, + success, + error + ); + } }; theMovieDb.changes = { - getMovieChanges: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, '', '', true); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/changes' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getPersonChanges: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, '', '', true); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'person/changes' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getMovieChanges: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/changes' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getPersonChanges: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/changes' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.collections = { - getCollection: function (options, success, error) { - 'use strict'; + getCollection: function (options, success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'collection/' + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCollectionImages: function (options, success, error) { - 'use strict'; + theMovieDb.common.client( + { + url: 'collection/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCollectionImages: function (options, success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'collection/' + options.id + '/images' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + theMovieDb.common.client( + { + url: 'collection/' + options.id + '/images' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.companies = { - getCompany: function (options, success, error) { - 'use strict'; + getCompany: function (options, success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'company/' + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCompanyMovies: function (options, success, error) { - 'use strict'; + theMovieDb.common.client( + { + url: 'company/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCompanyMovies: function (options, success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'company/' + options.id + '/movies' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + theMovieDb.common.client( + { + url: 'company/' + options.id + '/movies' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.credits = { - getCredit: function (options, success, error) { - 'use strict'; + getCredit: function (options, success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'credit/' + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + theMovieDb.common.client( + { + url: 'credit/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.discover = { - getMovies: function (options, success, error) { - 'use strict'; + getMovies: function (options, success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 3, '', '', true); + theMovieDb.common.validateRequired(arguments, 3, '', '', true); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'discover/movie' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTvShows: function (options, success, error) { - 'use strict'; + theMovieDb.common.client( + { + url: 'discover/movie' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTvShows: function (options, success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 3, '', '', true); + theMovieDb.common.validateRequired(arguments, 3, '', '', true); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'discover/tv' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + theMovieDb.common.client( + { + url: 'discover/tv' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.find = { - getById: function (options, success, error) { - 'use strict'; + getById: function (options, success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id', 'external_source' ]); + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id', 'external_source' ]); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'find/' + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + theMovieDb.common.client( + { + url: 'find/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.genres = { - getList: function (options, success, error) { - 'use strict'; + getList: function (options, success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 3, '', '', true); + theMovieDb.common.validateRequired(arguments, 3, '', '', true); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'genre/list' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getMovies: function (options, success, error) { - 'use strict'; + theMovieDb.common.client( + { + url: 'genre/list' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getMovies: function (options, success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'genre/' + options.id + '/movies' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + theMovieDb.common.client( + { + url: 'genre/' + options.id + '/movies' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.jobs = { - getList: function (success, error) { - 'use strict'; + getList: function (success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 2); + theMovieDb.common.validateRequired(arguments, 2); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'job/list' + theMovieDb.common.generateQuery() - }, - success, - error - ); - } + theMovieDb.common.client( + { + url: 'job/list' + theMovieDb.common.generateQuery() + }, + success, + error + ); + } }; theMovieDb.keywords = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'keyword/' + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getMovies: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'keyword/' + options.id + '/movies' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'keyword/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getMovies: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'keyword/' + options.id + '/movies' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.lists = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'list/' + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getStatusById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id', 'movie_id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'list/' + options.id + '/item_status' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - addList: function (options, success, error) { - 'use strict'; - - var body; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'name', 'description' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - body = { - name: options.name, - description: options.description - }; - - delete options.name; - delete options.description; - - if (options.hasOwnProperty('language')) { - body['language'] = options.language; - - delete options.language; - } - - theMovieDb.common.client( - { - method: 'POST', - status: 201, - url: 'list' + theMovieDb.common.generateQuery(options), - body: body - }, - success, - error - ); - }, - addItem: function (options, success, error) { - 'use strict'; - - var body; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id', 'media_id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - body = { - media_id: options.media_id - }; - - theMovieDb.common.client( - { - method: 'POST', - status: 201, - url: 'list/' + options.id + '/add_item' + theMovieDb.common.generateQuery(options), - body: body - }, - success, - error - ); - }, - removeItem: function (options, success, error) { - 'use strict'; - - var body; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id', 'media_id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - body = { - media_id: options.media_id - }; - - theMovieDb.common.client( - { - method: 'POST', - status: 201, - url: 'list/' + options.id + '/remove_item' + theMovieDb.common.generateQuery(options), - body: body - }, - success, - error - ); - }, - removeList: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - method: 'DELETE', - status: 204, - url: 'list/' + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - clearList: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id', 'confirm' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - method: 'POST', - status: 204, - body: {}, - url: 'list/' + options.id + '/clear' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'list/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getStatusById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id', 'movie_id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'list/' + options.id + '/item_status' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + addList: function (options, success, error) { + 'use strict'; + + var body; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'name', 'description' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + body = { + name: options.name, + description: options.description + }; + + delete options.name; + delete options.description; + + if (options.hasOwnProperty('language')) { + body['language'] = options.language; + + delete options.language; + } + + theMovieDb.common.client( + { + method: 'POST', + status: 201, + url: 'list' + theMovieDb.common.generateQuery(options), + body: body + }, + success, + error + ); + }, + addItem: function (options, success, error) { + 'use strict'; + + var body; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id', 'media_id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + body = { + media_id: options.media_id + }; + + theMovieDb.common.client( + { + method: 'POST', + status: 201, + url: 'list/' + options.id + '/add_item' + theMovieDb.common.generateQuery(options), + body: body + }, + success, + error + ); + }, + removeItem: function (options, success, error) { + 'use strict'; + + var body; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id', 'media_id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + body = { + media_id: options.media_id + }; + + theMovieDb.common.client( + { + method: 'POST', + status: 201, + url: 'list/' + options.id + '/remove_item' + theMovieDb.common.generateQuery(options), + body: body + }, + success, + error + ); + }, + removeList: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + method: 'DELETE', + status: 204, + url: 'list/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + clearList: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id', 'confirm' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + method: 'POST', + status: 204, + body: {}, + url: 'list/' + options.id + '/clear' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.movies = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/' + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getAlternativeTitles: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/' + options.id + '/alternative_titles' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCredits: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/' + options.id + '/credits' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getImages: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/' + options.id + '/images' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getKeywords: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/' + options.id + '/keywords' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getReleases: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/' + options.id + '/releases' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTrailers: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/' + options.id + '/trailers' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTranslations: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/' + options.id + '/translations' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getSimilarMovies: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/' + options.id + '/similar_movies' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getReviews: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/' + options.id + '/reviews' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getLists: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/' + options.id + '/lists' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getChanges: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/' + options.id + '/changes' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getLatest: function (success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 2); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/latest' + theMovieDb.common.generateQuery() - }, - success, - error - ); - }, - getUpcoming: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, '', '', true); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/upcoming' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getNowPlaying: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, '', '', true); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/now_playing' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getPopular: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, '', '', true); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/popular' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTopRated: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, '', '', true); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/top_rated' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getStatus: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'movie/' + options.id + '/account_states' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - rate: function (options, rate, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 4, options, [ 'session_id', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - method: 'POST', - status: 201, - url: 'movie/' + options.id + '/rating' + theMovieDb.common.generateQuery(options), - body: { value: rate } - }, - success, - error - ); - }, - rateGuest: function (options, rate, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 4, options, [ 'guest_session_id', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - method: 'POST', - status: 201, - url: 'movie/' + options.id + '/rating' + theMovieDb.common.generateQuery(options), - body: { value: rate } - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getAlternativeTitles: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/alternative_titles' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCredits: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/credits' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getImages: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/images' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getKeywords: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/keywords' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getReleases: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/releases' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTrailers: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/trailers' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTranslations: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/translations' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getSimilarMovies: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/similar_movies' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getReviews: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/reviews' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getLists: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/lists' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getChanges: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/changes' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getLatest: function (success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 2); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/latest' + theMovieDb.common.generateQuery() + }, + success, + error + ); + }, + getUpcoming: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/upcoming' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getNowPlaying: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/now_playing' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getPopular: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/popular' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTopRated: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/top_rated' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getStatus: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'movie/' + options.id + '/account_states' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + rate: function (options, rate, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 4, options, [ 'session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + method: 'POST', + status: 201, + url: 'movie/' + options.id + '/rating' + theMovieDb.common.generateQuery(options), + body: { value: rate } + }, + success, + error + ); + }, + rateGuest: function (options, rate, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 4, options, [ 'guest_session_id', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + method: 'POST', + status: 201, + url: 'movie/' + options.id + '/rating' + theMovieDb.common.generateQuery(options), + body: { value: rate } + }, + success, + error + ); + } }; theMovieDb.networks = { - getById: function (options, success, error) { - 'use strict'; + getById: function (options, success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'network/' + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + theMovieDb.common.client( + { + url: 'network/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.people = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'person/' + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getMovieCredits: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'person/' + options.id + '/movie_credits' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTvCredits: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'person/' + options.id + '/tv_credits' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCredits: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'person/' + options.id + '/combined_credits' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getExternalIds: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'person/' + options.id + '/external_ids' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getImages: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'person/' + options.id + '/images' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getChanges: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'person/' + options.id + '/changes' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getPopular: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, '', '', true); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'person/popular' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getLatest: function (success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 2); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'person/latest' + theMovieDb.common.generateQuery() - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getMovieCredits: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/' + options.id + '/movie_credits' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTvCredits: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/' + options.id + '/tv_credits' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCredits: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/' + options.id + '/combined_credits' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getExternalIds: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/' + options.id + '/external_ids' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getImages: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/' + options.id + '/images' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getChanges: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/' + options.id + '/changes' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getPopular: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/popular' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getLatest: function (success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 2); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'person/latest' + theMovieDb.common.generateQuery() + }, + success, + error + ); + } }; theMovieDb.reviews = { - getById: function (options, success, error) { - 'use strict'; + getById: function (options, success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'review/' + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + theMovieDb.common.client( + { + url: 'review/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.search = { - getMovie: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'search/movie' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCollection: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'search/collection' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTv: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'search/tv' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getPerson: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'search/person' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getList: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'search/list' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCompany: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'search/company' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getKeyword: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'search/keyword' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getMovie: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'search/movie' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCollection: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'search/collection' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTv: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'search/tv' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getPerson: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'search/person' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getList: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'search/list' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCompany: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'search/company' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getKeyword: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'query' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'search/keyword' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.timezones = { - getList: function (success, error) { - 'use strict'; + getList: function (success, error) { + 'use strict'; - theMovieDb.common.validateRequired(arguments, 2); + theMovieDb.common.validateRequired(arguments, 2); - theMovieDb.common.validateCallbacks([ success, error ]); + theMovieDb.common.validateCallbacks([ success, error ]); - theMovieDb.common.client( - { - url: 'timezones/list' + theMovieDb.common.generateQuery() - }, - success, - error - ); - } + theMovieDb.common.client( + { + url: 'timezones/list' + theMovieDb.common.generateQuery() + }, + success, + error + ); + } }; theMovieDb.tv = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/' + options.id + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCredits: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/' + options.id + '/credits' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getExternalIds: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/' + options.id + '/external_ids' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getImages: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/' + options.id + '/images' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTranslations: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/' + options.id + '/translations' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getOnTheAir: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, '', '', true); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/on_the_air' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getAiringToday: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, '', '', true); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/airing_today' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getTopRated: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, '', '', true); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/top_rated' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getPopular: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, '', '', true); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/popular' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCredits: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/credits' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getExternalIds: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/external_ids' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getImages: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/images' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTranslations: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/translations' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getOnTheAir: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/on_the_air' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getAiringToday: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/airing_today' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getTopRated: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/top_rated' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getPopular: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, '', '', true); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/popular' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.tvSeasons = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'season_number', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/' + options.id + '/season/' + options.season_number + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCredits: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'season_number', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/' + options.id + '/season/' + options.season_number + '/credits' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getExternalIds: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'season_number', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/' + options.id + '/season/' + options.season_number + '/external_ids' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getImages: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'season_number', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/' + options.id + '/season/' + options.season_number + '/images' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCredits: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + '/credits' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getExternalIds: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + '/external_ids' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getImages: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + '/images' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; theMovieDb.tvEpisodes = { - getById: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'episode_number', 'season_number', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/' + options.id + '/season/' + options.season_number + '/episode/' + options.episode_number + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getCredits: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'episode_number', 'season_number', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/' + options.id + '/season/' + options.season_number + '/episode/' + options.episode_number + '/credits' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getExternalIds: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'episode_number', 'season_number', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/' + options.id + '/season/' + options.season_number + '/episode/' + options.episode_number + '/external_ids' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - }, - getImages: function (options, success, error) { - 'use strict'; - - theMovieDb.common.validateRequired(arguments, 3, options, [ 'episode_number', 'season_number', 'id' ]); - - theMovieDb.common.validateCallbacks([ success, error ]); - - theMovieDb.common.client( - { - url: 'tv/' + options.id + '/season/' + options.season_number + '/episode/' + options.episode_number + '/images' + theMovieDb.common.generateQuery(options) - }, - success, - error - ); - } + getById: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'episode_number', 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + '/episode/' + options.episode_number + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getCredits: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'episode_number', 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + '/episode/' + options.episode_number + '/credits' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getExternalIds: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'episode_number', 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + '/episode/' + options.episode_number + '/external_ids' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + }, + getImages: function (options, success, error) { + 'use strict'; + + theMovieDb.common.validateRequired(arguments, 3, options, [ 'episode_number', 'season_number', 'id' ]); + + theMovieDb.common.validateCallbacks([ success, error ]); + + theMovieDb.common.client( + { + url: 'tv/' + options.id + '/season/' + options.season_number + '/episode/' + options.episode_number + '/images' + theMovieDb.common.generateQuery(options) + }, + success, + error + ); + } }; module.exports = theMovieDb; diff --git a/app/lib/youtube.js b/app/lib/youtube.js index 3f49682..0893547 100644 --- a/app/lib/youtube.js +++ b/app/lib/youtube.js @@ -2,161 +2,162 @@ * Movies * * @copyright - * Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. + * Copyright (c) 2015-present by Appcelerator, Inc. All Rights Reserved. * * @license * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. */ -var lib = Alloy.Globals; - -var win = null, - videoPlayer = null; +var win = null; +var videoPlayer = null; exports.isPlaying = false; exports.play = function (id) { - exports.isPlaying = true; - // getVideo(id); - - h264videosWithYoutubeURL(id, function success(e) { - playVideo(e); - - }, function error(e) { - Ti.API.error('Error: ' + e); - }); + exports.isPlaying = true; + h264videosWithYoutubeURL(id, function success(e) { + playVideo(e); + }, function error(e) { + Ti.API.error('Error: ' + e); + }); }; function getURLArgs(_string) { - var args = {}; - var pairs = _string.split('&'); - for (var i = 0; i < pairs.length; i++) { - var pos = pairs[i].indexOf('='); - if (pos == -1) { continue; } - var argname = pairs[i].substring(0, pos); - var value = pairs[i].substring(pos + 1); - args[argname] = unescape(value); - } - return args; + var args = {}; + var pairs = _string.split('&'); + for (var i = 0; i < pairs.length; i++) { + var pos = pairs[i].indexOf('='); + if (pos === -1) { + continue; + } + var argname = pairs[i].substring(0, pos); + var value = pairs[i].substring(pos + 1); + args[argname] = unescape(value); + } + return args; } function h264videosWithYoutubeURL(_youtubeId, _callbackOk, _callbackError) { - var youtubeInfoUrl = 'http://www.youtube.com/get_video_info?video_id=' + _youtubeId; - var request = Titanium.Network.createHTTPClient({ timeout: 10000 /* in milliseconds */}); - request.open('GET', youtubeInfoUrl); - request.onerror = function (_event) { - if (_callbackError) { _callbackError({ status: this.status, error: _event.error }); } - }; - request.onload = function (_event) { - var qualities = []; - var response = this.responseText; - var args = getURLArgs(response); - if (!args.hasOwnProperty('url_encoded_fmt_stream_map')) { - if (_callbackError) { _callbackError(); } - } else { - var fmtstring = args['url_encoded_fmt_stream_map']; - var fmtarray = fmtstring.split(','); - for (var i = 0, j = fmtarray.length; i < j; i++) { - var args2 = getURLArgs(fmtarray[i]); - var type = decodeURIComponent(args2['type']); - if (type.indexOf('mp4') >= 0) { - var url = decodeURIComponent(args2['url']); - var quality = decodeURIComponent(args2['quality']); - // qualities[quality] = url; - qualities.push(url); - } - } - if (_callbackOk) { _callbackOk(qualities[0]); } - } - }; - request.send(); + var youtubeInfoUrl = 'http://www.youtube.com/get_video_info?video_id=' + _youtubeId; + var request = Titanium.Network.createHTTPClient({ timeout: 10000 /* in milliseconds */}); + request.open('GET', youtubeInfoUrl); + request.onerror = function (_event) { + if (_callbackError) { + _callbackError({ status: this.status, error: _event.error }); + } + }; + request.onload = function () { + var qualities = []; + var response = this.responseText; + var args = getURLArgs(response); + if (!args.hasOwnProperty('url_encoded_fmt_stream_map')) { + if (_callbackError) { + _callbackError(); + } + } else { + var fmtstring = args['url_encoded_fmt_stream_map']; + var fmtarray = fmtstring.split(','); + for (var i = 0, j = fmtarray.length; i < j; i++) { + var args2 = getURLArgs(fmtarray[i]); + var type = decodeURIComponent(args2['type']); + if (type.indexOf('mp4') >= 0) { + var url = decodeURIComponent(args2['url']); + qualities.push(url); + } + } + if (_callbackOk) { + _callbackOk(qualities[0]); + } + } + }; + request.send(); } -function getVideo(id) { - var client = Ti.Network.createHTTPClient(); - client.onload = function () { - var json = decodeURIComponent(decodeURIComponent(decodeURIComponent(decodeURIComponent(this.responseText.substring(4, this.responseText.length))))); - var response = JSON.parse(json); - var video = response.content.video; - var isHighQuality = video['fmt_stream_map'] != null; - var streamUrl = isHighQuality ? video['fmt_stream_map'][0].url : video.stream_url; - if (!isHighQuality) { - Ti.API.info('using low quality video because fmt_stream_map does not exist in json response, User-Agent probably is not being sent correctly'); - } - playVideo(streamUrl); - }; - if (OS_IOS) { - client.setRequestHeader('Referer', 'http://www.youtube.com/watch?v=' + id); - client.setRequestHeader('User-Agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14 (KHTML, like Gecko) Version/6.0.1 Safari/536.26.14'); - } - client.open('GET', 'http://m.youtube.com/watch?ajax=1&layout=mobile&tsp=1&utcoffset=330&v=' + id); - if (OS_ANDROID) { - client.setRequestHeader('Referer', 'http://www.youtube.com/watch?v=' + id); - client.setRequestHeader('User-Agent', 'Mozilla/5.0 (Linux; U; Android 2.2.1; en-gb; GT-I9003 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); - } - client.send(); -} +// function getVideo(id) { +// var client = Ti.Network.createHTTPClient(); +// client.onload = function () { +// var json = decodeURIComponent(decodeURIComponent(decodeURIComponent(decodeURIComponent(this.responseText.substring(4, this.responseText.length))))); +// var response = JSON.parse(json); +// var video = response.content.video; +// var isHighQuality = video['fmt_stream_map'] != null; +// var streamUrl = isHighQuality ? video['fmt_stream_map'][0].url : video.stream_url; +// if (!isHighQuality) { +// Ti.API.info('using low quality video because fmt_stream_map does not exist in json response, User-Agent probably is not being sent correctly'); +// } +// playVideo(streamUrl); +// }; +// if (OS_IOS) { +// client.setRequestHeader('Referer', 'http://www.youtube.com/watch?v=' + id); +// client.setRequestHeader('User-Agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14 (KHTML, like Gecko) Version/6.0.1 Safari/536.26.14'); +// } +// client.open('GET', 'http://m.youtube.com/watch?ajax=1&layout=mobile&tsp=1&utcoffset=330&v=' + id); +// if (OS_ANDROID) { +// client.setRequestHeader('Referer', 'http://www.youtube.com/watch?v=' + id); +// client.setRequestHeader('User-Agent', 'Mozilla/5.0 (Linux; U; Android 2.2.1; en-gb; GT-I9003 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); +// } +// client.send(); +// } function playVideo(url) { - if (OS_IOS) { - win = Ti.UI.createWindow({ - title: 'View Training Video', - backgroundColor: '#000' - }); - } - if (OS_WINDOWS) { - win = Ti.UI.createWindow({ - title: 'View Training Video', - backgroundColor: '#000' - }); - } - videoPlayer = Ti.Media.createVideoPlayer({ - backgroundColor: '#000', - url: url, - fullscreen: true, - autoplay: true, - scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FIT, - mediaControlMode: Ti.Media.VIDEO_CONTROL_DEFAULT - }); - videoPlayer.addEventListener('complete', function (e) { - Ti.API.info('video player complete'); - exports.close(); - }); - videoPlayer.addEventListener('fullscreen', function (e) { - if (!e.entering) { - Ti.API.info('video player fullscreen exit'); - exports.close(); - } - }); - if (OS_IOS) { - win.add(videoPlayer); - win.open(); - } - if (OS_WINDOWS) { - win.add(videoPlayer); - win.open(); - } + if (OS_IOS) { + win = Ti.UI.createWindow({ + title: 'View Training Video', + backgroundColor: '#000' + }); + } + if (OS_WINDOWS) { + win = Ti.UI.createWindow({ + title: 'View Training Video', + backgroundColor: '#000' + }); + } + videoPlayer = Ti.Media.createVideoPlayer({ + backgroundColor: '#000', + url: url, + fullscreen: true, + autoplay: true, + scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FIT, + mediaControlMode: Ti.Media.VIDEO_CONTROL_DEFAULT + }); + videoPlayer.addEventListener('complete', function () { + Ti.API.info('video player complete'); + exports.close(); + }); + videoPlayer.addEventListener('fullscreen', function (e) { + if (!e.entering) { + Ti.API.info('video player fullscreen exit'); + exports.close(); + } + }); + if (OS_IOS) { + win.add(videoPlayer); + win.open(); + } + if (OS_WINDOWS) { + win.add(videoPlayer); + win.open(); + } } exports.close = function () { - Ti.API.info('closing video player'); + Ti.API.info('closing video player'); - if (OS_IOS) { - if (videoPlayer) { - videoPlayer.fullscreen = false; - } - win && win.close(); - win = null; - } else if (OS_WINDOWS) { - win && win.close(); - win = null; - } else if (videoPlayer) { - videoPlayer.hide(); - videoPlayer.release(); - videoPlayer = null; - } - exports.isPlaying = false; + if (OS_IOS) { + if (videoPlayer) { + videoPlayer.fullscreen = false; + } + win && win.close(); + win = null; + } else if (OS_WINDOWS) { + win && win.close(); + win = null; + } else if (videoPlayer) { + videoPlayer.hide(); + videoPlayer.release(); + videoPlayer = null; + } + exports.isPlaying = false; }; From 9a7d61fac5b511cbdd04ef93247ca5815028a14c Mon Sep 17 00:00:00 2001 From: hansemannn Date: Wed, 25 Jul 2018 13:03:45 +0200 Subject: [PATCH 3/3] Migrate json to real json --- app/lib/data.js | 12 +- app/lib/data/genre.json | 4 +- app/lib/data/genres.json | 2006 +++++++++++++++++++------------------- app/lib/data/list.json | 4 +- app/lib/data/lists.json | 394 ++++---- app/lib/youtube.js | 8 +- 6 files changed, 1209 insertions(+), 1219 deletions(-) diff --git a/app/lib/data.js b/app/lib/data.js index aaf6793..682e69c 100644 --- a/app/lib/data.js +++ b/app/lib/data.js @@ -14,16 +14,12 @@ * @param {Function} callback The callback invoked once parse */ function loadJsonFile(name, callback) { - var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, '/data/' + name + '.json'); - - if (file.exists()) { - var dataSrc = file.read(); - var data = JSON.parse(dataSrc); + try { + const data = require('data/' + name); callback(null, data); - return; + } catch (e) { + callback('Error loading JSON file \'' + name + '\''); } - - callback('Error loading JSON file \'' + name + '\''); } /** diff --git a/app/lib/data/genre.json b/app/lib/data/genre.json index 6cd665e..3ca0320 100644 --- a/app/lib/data/genre.json +++ b/app/lib/data/genre.json @@ -100,7 +100,7 @@ { "title": "Alien Outpost", "backdrop_path": "/fCPqyqCppo0MruBqGXpz5pmUabU.jpg", - "tagline": "Mankind's Last Stand", + "tagline": "Mankind is Last Stand", "poster_path": "/5B182VoY6ZJh0a6kbp9k9UPvl2D.jpg", "id": "54e179ae8fc90956e0c97af1", "mdbid": 312526 @@ -124,7 +124,7 @@ { "title": "Transformers: Age of Extinction", "backdrop_path": "/yTr6tj2FQIKuhGnEQ2h7gXwBLB4.jpg", - "tagline": "This is not war. It's extinction.", + "tagline": "This is not war. Its extinction.", "poster_path": "/6rtXH8cIZbgwLy8EvaXGucwdep5.jpg", "id": "53ee2520587d110822002006", "mdbid": 91314 diff --git a/app/lib/data/genres.json b/app/lib/data/genres.json index a95a2f6..0b1682a 100644 --- a/app/lib/data/genres.json +++ b/app/lib/data/genres.json @@ -1,34 +1,34 @@ [ { - title: 'Action', - backdrop_path: '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:32+0000', - backdrop_paths: [ - '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', - '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', - '/pKawqrtCBMmxarft7o1LbEynys7.jpg', - '/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg', - '/mFb0ygcue4ITixDkdr7wm1Tdarx.jpg', - '/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg', - '/eCgIoGvfNXrbSiQGqQHccuHjQHm.jpg', - '/rKESeEePWWu4rATQDJOktllaDDv.jpg', - '/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg', - '/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg', - '/p5n7VTC6qmFIuBFjACWURYCAlKP.jpg', - '/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg', - '/4qfXT9BtxeFuamR4F49m2mpKQI1.jpg', - '/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg', - '/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg', - '/fCPqyqCppo0MruBqGXpz5pmUabU.jpg', - '/7BhTIyySTmmqNaoguSPjZAVMoQG.jpg', - '/jjAq3tCezdlQduusgtMhpY2XzW0.jpg', - '/cHy7nSitAVgvZ7qfCK4JO47t3oZ.jpg', - '/pNPdcgHT1FpCmauzFWepyfDvDo9.jpg' + "title": "Action", + "backdrop_path": "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:32+0000", + "backdrop_paths": [ + "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", + "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", + "/pKawqrtCBMmxarft7o1LbEynys7.jpg", + "/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg", + "/mFb0ygcue4ITixDkdr7wm1Tdarx.jpg", + "/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg", + "/eCgIoGvfNXrbSiQGqQHccuHjQHm.jpg", + "/rKESeEePWWu4rATQDJOktllaDDv.jpg", + "/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg", + "/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg", + "/p5n7VTC6qmFIuBFjACWURYCAlKP.jpg", + "/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg", + "/4qfXT9BtxeFuamR4F49m2mpKQI1.jpg", + "/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg", + "/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg", + "/fCPqyqCppo0MruBqGXpz5pmUabU.jpg", + "/7BhTIyySTmmqNaoguSPjZAVMoQG.jpg", + "/jjAq3tCezdlQduusgtMhpY2XzW0.jpg", + "/cHy7nSitAVgvZ7qfCK4JO47t3oZ.jpg", + "/pNPdcgHT1FpCmauzFWepyfDvDo9.jpg" ], - poster_path: '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', - id: '54e2cb2c8fc9090996d2de7d', - mdbids: [ + "poster_path": "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", + "id": "54e2cb2c8fc9090996d2de7d", + "mdbids": [ 76757, 177572, 228150, @@ -50,61 +50,61 @@ 91314, 184315 ], - mdbid: 28, - created_at: '2015-02-17T05:01:32+0000', - poster_paths: [ - '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', - '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', - '/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg', - '/lTbbt8otsYLKRDvELMRn83wdNoW.jpg', - '/sq2MmFv9sanl9PFMfbdaBLveSJ8.jpg', - '/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg', - '/4Y9PMR6hO2YWu2BrNhix4lHRA58.jpg', - '/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg', - '/coss7RgL0NH6g4fC2s5atvf3dFO.jpg', - '/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg', - '/2uWb0aSm5cFmRCHP95OdA6hvTEs.jpg', - '/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg', - '/pH4oeiZAh9a40tly4D0l6aAB3ms.jpg', - '/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg', - '/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg', - '/5B182VoY6ZJh0a6kbp9k9UPvl2D.jpg', - '/ooy5M7QXEWVpOTAZIRGMskBQbQ9.jpg', - '/h1XjBJoWdOh8aegBoVYKgABQZSL.jpg', - '/ykIZB9dYBIKV13k5igGFncT5th6.jpg', - '/jEeMN83CRI7lIEffTlgzBcUZzuN.jpg' + "mdbid": 28, + "created_at": "2015-02-17T05:01:32+0000", + "poster_paths": [ + "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", + "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", + "/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg", + "/lTbbt8otsYLKRDvELMRn83wdNoW.jpg", + "/sq2MmFv9sanl9PFMfbdaBLveSJ8.jpg", + "/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg", + "/4Y9PMR6hO2YWu2BrNhix4lHRA58.jpg", + "/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg", + "/coss7RgL0NH6g4fC2s5atvf3dFO.jpg", + "/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg", + "/2uWb0aSm5cFmRCHP95OdA6hvTEs.jpg", + "/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg", + "/pH4oeiZAh9a40tly4D0l6aAB3ms.jpg", + "/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg", + "/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg", + "/5B182VoY6ZJh0a6kbp9k9UPvl2D.jpg", + "/ooy5M7QXEWVpOTAZIRGMskBQbQ9.jpg", + "/h1XjBJoWdOh8aegBoVYKgABQZSL.jpg", + "/ykIZB9dYBIKV13k5igGFncT5th6.jpg", + "/jEeMN83CRI7lIEffTlgzBcUZzuN.jpg" ] }, { - title: 'Adventure', - backdrop_path: '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:32+0000', - backdrop_paths: [ - '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', - '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', - '/umR9aXTxOxQUuDH2DamoJ5fIPB.jpg', - '/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg', - '/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg', - '/pckdZ29bHj11hBsV3SbVVfmCB6C.jpg', - '/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg', - '/4qfXT9BtxeFuamR4F49m2mpKQI1.jpg', - '/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg', - '/83nHcz2KcnEpPXY50Ky2VldewJJ.jpg', - '/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg', - '/hyR7Fs6Tepgu3yCQGtgO4Ilz9tY.jpg', - '/irHmdlkdJphmk4HPfyAQfklKMbY.jpg', - '/jjAq3tCezdlQduusgtMhpY2XzW0.jpg', - '/cHy7nSitAVgvZ7qfCK4JO47t3oZ.jpg', - '/pNPdcgHT1FpCmauzFWepyfDvDo9.jpg', - '/3FweBee0xZoY77uO1bhUOlQorNH.jpg', - '/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg', - '/hbn46fQaRmlpBuUrEiFqv0GDL6Y.jpg', - '/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg' + "title": "Adventure", + "backdrop_path": "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:32+0000", + "backdrop_paths": [ + "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", + "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", + "/umR9aXTxOxQUuDH2DamoJ5fIPB.jpg", + "/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg", + "/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg", + "/pckdZ29bHj11hBsV3SbVVfmCB6C.jpg", + "/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg", + "/4qfXT9BtxeFuamR4F49m2mpKQI1.jpg", + "/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg", + "/83nHcz2KcnEpPXY50Ky2VldewJJ.jpg", + "/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg", + "/hyR7Fs6Tepgu3yCQGtgO4Ilz9tY.jpg", + "/irHmdlkdJphmk4HPfyAQfklKMbY.jpg", + "/jjAq3tCezdlQduusgtMhpY2XzW0.jpg", + "/cHy7nSitAVgvZ7qfCK4JO47t3oZ.jpg", + "/pNPdcgHT1FpCmauzFWepyfDvDo9.jpg", + "/3FweBee0xZoY77uO1bhUOlQorNH.jpg", + "/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg", + "/hbn46fQaRmlpBuUrEiFqv0GDL6Y.jpg", + "/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg" ], - poster_path: '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', - id: '54e2cb2cb1e3a30994751f33', - mdbids: [ + "poster_path": "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", + "id": "54e2cb2cb1e3a30994751f33", + "mdbids": [ 76757, 177572, 122917, @@ -126,61 +126,61 @@ 24428, 170687 ], - mdbid: 12, - created_at: '2015-02-17T05:01:32+0000', - poster_paths: [ - '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', - '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', - '/vgAHvS0bT3fpcpnJqT6uDTUsHTo.jpg', - '/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg', - '/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg', - '/rT9w3tzk25jA8vl7KyvzUP5gHJV.jpg', - '/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg', - '/pH4oeiZAh9a40tly4D0l6aAB3ms.jpg', - '/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg', - '/cWERd8rgbw7bCMZlwP207HUXxym.jpg', - '/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg', - '/gQCiuxGsfiXH1su6lp9n0nd0UeH.jpg', - '/jIjdFXKUNtdf1bwqMrhearpyjMj.jpg', - '/h1XjBJoWdOh8aegBoVYKgABQZSL.jpg', - '/ykIZB9dYBIKV13k5igGFncT5th6.jpg', - '/jEeMN83CRI7lIEffTlgzBcUZzuN.jpg', - '/aROh4ZwLfv9tmtOAsrnkYTbpujA.jpg', - '/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg', - '/cezWGskPY5x7GaglTTRN4Fugfb8.jpg', - '/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg' + "mdbid": 12, + "created_at": "2015-02-17T05:01:32+0000", + "poster_paths": [ + "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", + "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", + "/vgAHvS0bT3fpcpnJqT6uDTUsHTo.jpg", + "/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg", + "/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg", + "/rT9w3tzk25jA8vl7KyvzUP5gHJV.jpg", + "/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg", + "/pH4oeiZAh9a40tly4D0l6aAB3ms.jpg", + "/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg", + "/cWERd8rgbw7bCMZlwP207HUXxym.jpg", + "/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg", + "/gQCiuxGsfiXH1su6lp9n0nd0UeH.jpg", + "/jIjdFXKUNtdf1bwqMrhearpyjMj.jpg", + "/h1XjBJoWdOh8aegBoVYKgABQZSL.jpg", + "/ykIZB9dYBIKV13k5igGFncT5th6.jpg", + "/jEeMN83CRI7lIEffTlgzBcUZzuN.jpg", + "/aROh4ZwLfv9tmtOAsrnkYTbpujA.jpg", + "/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg", + "/cezWGskPY5x7GaglTTRN4Fugfb8.jpg", + "/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg" ] }, { - title: 'Animation', - backdrop_path: '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:33+0000', - backdrop_paths: [ - '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', - '/irHmdlkdJphmk4HPfyAQfklKMbY.jpg', - '/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg', - '/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg', - '/GtodNrQnorVd3Gv6f6i4bdEwkP.jpg', - '/mkzpFIJmndBOfUteS7n3fI04lX3.jpg', - '/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg', - '/agaDrrefPwOBMxSe9SIkq5zS4tQ.jpg', - '/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg', - '/lVshZpxU5EB8zXJrnXxblaDps6m.jpg', - '/1DMrM1RDSClzeabdrTejEYtTFMU.jpg', - '/clvgKN7DWTXm4b81HAHNvcvkBqX.jpg', - '/rmgxcw8tGTmdhsWqdjGBS9uI1tO.jpg', - '/oDqbewoFuIEWA7UWurole6MzDGn.jpg', - '/yIAxebMW8bvGJhZO8Q3TSi4zMDQ.jpg', - '/pQPRp30zd0BSaefterJnLmh4Rs9.jpg', - '/nMulOcoR6HAahofkcuo4mtA0o9j.jpg', + "title": "Animation", + "backdrop_path": "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:33+0000", + "backdrop_paths": [ + "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", + "/irHmdlkdJphmk4HPfyAQfklKMbY.jpg", + "/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg", + "/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg", + "/GtodNrQnorVd3Gv6f6i4bdEwkP.jpg", + "/mkzpFIJmndBOfUteS7n3fI04lX3.jpg", + "/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg", + "/agaDrrefPwOBMxSe9SIkq5zS4tQ.jpg", + "/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg", + "/lVshZpxU5EB8zXJrnXxblaDps6m.jpg", + "/1DMrM1RDSClzeabdrTejEYtTFMU.jpg", + "/clvgKN7DWTXm4b81HAHNvcvkBqX.jpg", + "/rmgxcw8tGTmdhsWqdjGBS9uI1tO.jpg", + "/oDqbewoFuIEWA7UWurole6MzDGn.jpg", + "/yIAxebMW8bvGJhZO8Q3TSi4zMDQ.jpg", + "/pQPRp30zd0BSaefterJnLmh4Rs9.jpg", + "/nMulOcoR6HAahofkcuo4mtA0o9j.jpg", null, - '/3MET6hEfk8n8i0KFRq9BHnJq7ju.jpg', - '/n2vIGWw4ezslXjlP0VNxkp9wqwU.jpg' + "/3MET6hEfk8n8i0KFRq9BHnJq7ju.jpg", + "/n2vIGWw4ezslXjlP0VNxkp9wqwU.jpg" ], - poster_path: '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', - id: '54e2cb2da88c820980760614', - mdbids: [ + "poster_path": "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", + "id": "54e2cb2da88c820980760614", + "mdbids": [ 177572, 109445, 82702, @@ -202,61 +202,61 @@ 218836, 12 ], - mdbid: 16, - created_at: '2015-02-17T05:01:33+0000', - poster_paths: [ - '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', - '/jIjdFXKUNtdf1bwqMrhearpyjMj.jpg', - '/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg', - '/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg', - '/eCdQdoqG9kQQbzPnbVDXqwoTgLl.jpg', - '/qTVlKThCmXOFryiiTJHBMgHhdAv.jpg', - '/lMHbadNmznKs5vgBAkHxKGHulOa.jpg', - '/4XFN435sO7t9sMiWGMtWcV9qfmq.jpg', - '/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg', - '/fhq87M6NNXqYH4OUoIfsM6oDUA3.jpg', - '/9wChSuUoQDiBKUnGTcYMkzRha60.jpg', - '/eFlBFMAifj436QctX3akDkUnhlk.jpg', - '/kQrYyZQHkwkUg2KlUDyvymj9FAp.jpg', - '/zpaQwR0YViPd83bx1e559QyZ35i.jpg', - '/3n0zmm2dPF0TQt2ikJ2tUjKr2FT.jpg', - '/8DGGcTCl47s1tmzSLxUNLXDcJge.jpg', - '/zMAm3WYmvD40FaWFsOmpicQFabz.jpg', - '/Mx9dBrZaVJlFmdebfao08FO6Z.jpg', - '/b5Xn7UQf7s6ZPsDTVT0NeLqiiHY.jpg', - '/zjqInUwldOBa0q07fOyohYCWxWX.jpg' + "mdbid": 16, + "created_at": "2015-02-17T05:01:33+0000", + "poster_paths": [ + "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", + "/jIjdFXKUNtdf1bwqMrhearpyjMj.jpg", + "/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg", + "/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg", + "/eCdQdoqG9kQQbzPnbVDXqwoTgLl.jpg", + "/qTVlKThCmXOFryiiTJHBMgHhdAv.jpg", + "/lMHbadNmznKs5vgBAkHxKGHulOa.jpg", + "/4XFN435sO7t9sMiWGMtWcV9qfmq.jpg", + "/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg", + "/fhq87M6NNXqYH4OUoIfsM6oDUA3.jpg", + "/9wChSuUoQDiBKUnGTcYMkzRha60.jpg", + "/eFlBFMAifj436QctX3akDkUnhlk.jpg", + "/kQrYyZQHkwkUg2KlUDyvymj9FAp.jpg", + "/zpaQwR0YViPd83bx1e559QyZ35i.jpg", + "/3n0zmm2dPF0TQt2ikJ2tUjKr2FT.jpg", + "/8DGGcTCl47s1tmzSLxUNLXDcJge.jpg", + "/zMAm3WYmvD40FaWFsOmpicQFabz.jpg", + "/Mx9dBrZaVJlFmdebfao08FO6Z.jpg", + "/b5Xn7UQf7s6ZPsDTVT0NeLqiiHY.jpg", + "/zjqInUwldOBa0q07fOyohYCWxWX.jpg" ] }, { - title: 'Comedy', - backdrop_path: '/7OluTl9LoaMDZ2MVdrFVuU2os09.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:32+0000', - backdrop_paths: [ - '/7OluTl9LoaMDZ2MVdrFVuU2os09.jpg', - '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', - '/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg', - '/pMNSiNT55XrxWPmoI5ytJyinRa8.jpg', - '/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg', - '/p5n7VTC6qmFIuBFjACWURYCAlKP.jpg', - '/43GrPpAeBUOvOCZ8L1A3MLuDnkc.jpg', - '/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg', - '/3AZX2KB73kSza76h9O4bzdNeIac.jpg', - '/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg', - '/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg', - '/GtodNrQnorVd3Gv6f6i4bdEwkP.jpg', - '/73hI1zgRALUDrB46JDPBLFqHcqv.jpg', - '/USKXUGMT9PZHzq91F5Beuged7.jpg', - '/cANfw6Yh10QC4F3mKcLZ4VoUzhA.jpg', - '/3hOPv3w5mmPV3MA9fk0nPI5MyXV.jpg', - '/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg', - '/z5e275a7iDNCQNx0NelsX5LYmDU.jpg', - '/dYtAyg4vD88hIfrR1VKDnVGhnE6.jpg', - '/6YEWKSFIWFTLnInzXYiSaS7pVOP.jpg' + "title": "Comedy", + "backdrop_path": "/7OluTl9LoaMDZ2MVdrFVuU2os09.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:32+0000", + "backdrop_paths": [ + "/7OluTl9LoaMDZ2MVdrFVuU2os09.jpg", + "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", + "/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg", + "/pMNSiNT55XrxWPmoI5ytJyinRa8.jpg", + "/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg", + "/p5n7VTC6qmFIuBFjACWURYCAlKP.jpg", + "/43GrPpAeBUOvOCZ8L1A3MLuDnkc.jpg", + "/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg", + "/3AZX2KB73kSza76h9O4bzdNeIac.jpg", + "/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg", + "/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg", + "/GtodNrQnorVd3Gv6f6i4bdEwkP.jpg", + "/73hI1zgRALUDrB46JDPBLFqHcqv.jpg", + "/USKXUGMT9PZHzq91F5Beuged7.jpg", + "/cANfw6Yh10QC4F3mKcLZ4VoUzhA.jpg", + "/3hOPv3w5mmPV3MA9fk0nPI5MyXV.jpg", + "/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg", + "/z5e275a7iDNCQNx0NelsX5LYmDU.jpg", + "/dYtAyg4vD88hIfrR1VKDnVGhnE6.jpg", + "/6YEWKSFIWFTLnInzXYiSaS7pVOP.jpg" ], - poster_path: '/zRkLCOx7o9tjPYb9s7u6mpw8VOs.jpg', - id: '54e2cb2ca88c820980760611', - mdbids: [ + "poster_path": "/zRkLCOx7o9tjPYb9s7u6mpw8VOs.jpg", + "id": "54e2cb2ca88c820980760611", + "mdbids": [ 227159, 177572, 194662, @@ -278,61 +278,61 @@ 106646, 82693 ], - mdbid: 35, - created_at: '2015-02-17T05:01:32+0000', - poster_paths: [ - '/zRkLCOx7o9tjPYb9s7u6mpw8VOs.jpg', - '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', - '/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg', - '/Ekw3ijq9L6RiKvv5m2tPOEklHF.jpg', - '/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg', - '/2uWb0aSm5cFmRCHP95OdA6hvTEs.jpg', - '/8GVU8AaYpxiIS462SZgAtjh02pm.jpg', - '/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg', - '/nX5XotM9yprCKarRH4fzOq1VM1J.jpg', - '/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg', - '/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg', - '/eCdQdoqG9kQQbzPnbVDXqwoTgLl.jpg', - '/tWwASv4CU1Au1IukacdSUewDCV3.jpg', - '/bYY46f0PSLJTXzitxGOCd00rj3Y.jpg', - '/w0hzr4eQBk1X4m63fb7sOSt9Bnn.jpg', - '/dNcoXoRC7JHiqbe7k5Ufo6syiPP.jpg', - '/lMHbadNmznKs5vgBAkHxKGHulOa.jpg', - '/yup7xOCpOSHeUyalUH6mpFuBDpG.jpg', - '/wAgdJRx4uZ0u4uzu34NOMvtjLAR.jpg', - '/ilrZAV2klTB0FLxLb01bOp5pzD9.jpg' + "mdbid": 35, + "created_at": "2015-02-17T05:01:32+0000", + "poster_paths": [ + "/zRkLCOx7o9tjPYb9s7u6mpw8VOs.jpg", + "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", + "/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg", + "/Ekw3ijq9L6RiKvv5m2tPOEklHF.jpg", + "/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg", + "/2uWb0aSm5cFmRCHP95OdA6hvTEs.jpg", + "/8GVU8AaYpxiIS462SZgAtjh02pm.jpg", + "/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg", + "/nX5XotM9yprCKarRH4fzOq1VM1J.jpg", + "/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg", + "/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg", + "/eCdQdoqG9kQQbzPnbVDXqwoTgLl.jpg", + "/tWwASv4CU1Au1IukacdSUewDCV3.jpg", + "/bYY46f0PSLJTXzitxGOCd00rj3Y.jpg", + "/w0hzr4eQBk1X4m63fb7sOSt9Bnn.jpg", + "/dNcoXoRC7JHiqbe7k5Ufo6syiPP.jpg", + "/lMHbadNmznKs5vgBAkHxKGHulOa.jpg", + "/yup7xOCpOSHeUyalUH6mpFuBDpG.jpg", + "/wAgdJRx4uZ0u4uzu34NOMvtjLAR.jpg", + "/ilrZAV2klTB0FLxLb01bOp5pzD9.jpg" ] }, { - title: 'Crime', - backdrop_path: '/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:33+0000', - backdrop_paths: [ - '/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg', - '/ts4j3zYaPzdUVF3ijBeBdGVDWjX.jpg', - '/pbZtww8VsNDSwt9eMnG0faELwYV.jpg', - '/rKESeEePWWu4rATQDJOktllaDDv.jpg', - '/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg', - '/e56QsaJy1weAUukiK2ZmIGVUALF.jpg', - '/qjfE7SkPXpqFs8FX8rIaG6eO2aK.jpg', - '/nnMC0BM6XbjIIrT4miYmMtPGcQV.jpg', - '/zddiDFf3X97pCimAOGKh3m0PwJV.jpg', - '/6AocjTM7B0RII4qrXG40wI1rEF3.jpg', - '/biw5Nn85iBZZd8GWYO9XXH56VK2.jpg', - '/3bgtUfKQKNi3nJsAB5URpP2wdRt.jpg', - '/khzRw7ZDE3NIrYpe0RYyB864FPT.jpg', - '/dYtAyg4vD88hIfrR1VKDnVGhnE6.jpg', - '/d5vwBiuJI1a2hBcGjhsWhpmAkL7.jpg', - '/oSno71x3xS7ic311ktzzpVjxzEF.jpg', - '/6V4Ni0ap3yreqSRVfBrzFcryC6f.jpg', - '/hMuPjDgT3MyZkGpST4vky8t0m6h.jpg', - '/9NmTVqQ9f2ltecPZgXIj4Bk2c6s.jpg', - '/8Od5zV7Q7zNOX0y9tyNgpTmoiGA.jpg' + "title": "Crime", + "backdrop_path": "/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:33+0000", + "backdrop_paths": [ + "/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg", + "/ts4j3zYaPzdUVF3ijBeBdGVDWjX.jpg", + "/pbZtww8VsNDSwt9eMnG0faELwYV.jpg", + "/rKESeEePWWu4rATQDJOktllaDDv.jpg", + "/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg", + "/e56QsaJy1weAUukiK2ZmIGVUALF.jpg", + "/qjfE7SkPXpqFs8FX8rIaG6eO2aK.jpg", + "/nnMC0BM6XbjIIrT4miYmMtPGcQV.jpg", + "/zddiDFf3X97pCimAOGKh3m0PwJV.jpg", + "/6AocjTM7B0RII4qrXG40wI1rEF3.jpg", + "/biw5Nn85iBZZd8GWYO9XXH56VK2.jpg", + "/3bgtUfKQKNi3nJsAB5URpP2wdRt.jpg", + "/khzRw7ZDE3NIrYpe0RYyB864FPT.jpg", + "/dYtAyg4vD88hIfrR1VKDnVGhnE6.jpg", + "/d5vwBiuJI1a2hBcGjhsWhpmAkL7.jpg", + "/oSno71x3xS7ic311ktzzpVjxzEF.jpg", + "/6V4Ni0ap3yreqSRVfBrzFcryC6f.jpg", + "/hMuPjDgT3MyZkGpST4vky8t0m6h.jpg", + "/9NmTVqQ9f2ltecPZgXIj4Bk2c6s.jpg", + "/8Od5zV7Q7zNOX0y9tyNgpTmoiGA.jpg" ], - poster_path: '/lTbbt8otsYLKRDvELMRn83wdNoW.jpg', - id: '54e2cb2d8fc9090996d2de7e', - mdbids: [ + "poster_path": "/lTbbt8otsYLKRDvELMRn83wdNoW.jpg", + "id": "54e2cb2d8fc9090996d2de7e", + "mdbids": [ 260346, 242582, 265208, @@ -354,60 +354,60 @@ 187017, 1422 ], - mdbid: 80, - created_at: '2015-02-17T05:01:33+0000', - poster_paths: [ - '/lTbbt8otsYLKRDvELMRn83wdNoW.jpg', - '/fukWJhLISH7f6cnYSdgb0JrSP2Q.jpg', - '/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg', - '/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg', - '/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg', - '/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg', - '/kBXgGUt07sLpw6rhpiYwEyOwUDa.jpg', - '/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg', - '/lj8AMCjWx0jU93XajzUEOUUNKZF.jpg', - '/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg', - '/tn07zjNNIJuOsecqTC2JEYA49uU.jpg', - '/dEYnvnUfXrqvqeRSqvIEtmzhoA8.jpg', - '/k80qKrJ0qQ6ocVo5N932stNSg6j.jpg', - '/wAgdJRx4uZ0u4uzu34NOMvtjLAR.jpg', - '/q2ufZ5zgbyvwSVR9J5wR6nEAEyy.jpg', - '/lcg1bkriMVvc8m0jz5zk0yvzVTA.jpg', - '/sE9OHijLpDXsMlaiLR2NEsi0VYP.jpg', - '/mj1aAY5WbVhb62nw3MvZinsbhke.jpg', - '/gNlV5FhDZ1PjxSv2aqTPS30GEon.jpg', - '/tGLO9zw5ZtCeyyEWgbYGgsFxC6i.jpg' + "mdbid": 80, + "created_at": "2015-02-17T05:01:33+0000", + "poster_paths": [ + "/lTbbt8otsYLKRDvELMRn83wdNoW.jpg", + "/fukWJhLISH7f6cnYSdgb0JrSP2Q.jpg", + "/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg", + "/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg", + "/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg", + "/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg", + "/kBXgGUt07sLpw6rhpiYwEyOwUDa.jpg", + "/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg", + "/lj8AMCjWx0jU93XajzUEOUUNKZF.jpg", + "/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg", + "/tn07zjNNIJuOsecqTC2JEYA49uU.jpg", + "/dEYnvnUfXrqvqeRSqvIEtmzhoA8.jpg", + "/k80qKrJ0qQ6ocVo5N932stNSg6j.jpg", + "/wAgdJRx4uZ0u4uzu34NOMvtjLAR.jpg", + "/q2ufZ5zgbyvwSVR9J5wR6nEAEyy.jpg", + "/lcg1bkriMVvc8m0jz5zk0yvzVTA.jpg", + "/sE9OHijLpDXsMlaiLR2NEsi0VYP.jpg", + "/mj1aAY5WbVhb62nw3MvZinsbhke.jpg", + "/gNlV5FhDZ1PjxSv2aqTPS30GEon.jpg", + "/tGLO9zw5ZtCeyyEWgbYGgsFxC6i.jpg" ] }, { - title: 'Documentary', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:33+0000', - backdrop_paths: [ + "title": "Documentary", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:33+0000", + "backdrop_paths": [ null, - '/hYeLTWIWeP9KdKxjcYnhpvO12EY.jpg', - '/vraH686DWdoM3yD8G0lWuPSpGys.jpg', + "/hYeLTWIWeP9KdKxjcYnhpvO12EY.jpg", + "/vraH686DWdoM3yD8G0lWuPSpGys.jpg", null, null, - '/4pimMgJLY3LnAG1hqVK1aMpZvBw.jpg', - '/uqq2Pdb9eWXQz0Fe8IMpDvbOutD.jpg', - '/y4n7ShCGahGalW2j8eP4uSlEo8y.jpg', - '/bBpiHSUo4L5rN6qJ8Drqx79i9QA.jpg', - '/vcB1yzRxVQxsZrWS4uVxBz1Ia8Q.jpg', - '/rkXYAvWjHATFWE4fSdL5ziIrLBe.jpg', + "/4pimMgJLY3LnAG1hqVK1aMpZvBw.jpg", + "/uqq2Pdb9eWXQz0Fe8IMpDvbOutD.jpg", + "/y4n7ShCGahGalW2j8eP4uSlEo8y.jpg", + "/bBpiHSUo4L5rN6qJ8Drqx79i9QA.jpg", + "/vcB1yzRxVQxsZrWS4uVxBz1Ia8Q.jpg", + "/rkXYAvWjHATFWE4fSdL5ziIrLBe.jpg", null, - '/q7A6qCqmy6daaqGRm3Ee3NUC3xN.jpg', - '/qiQTwNmLWZfm5HWAQkfAMBnISLN.jpg', - '/sYicgyXd0uYqf9gjuBdbfT0zj3r.jpg', - '/vkYLK9JtA5liuPrZhhgrqfVviMy.jpg', + "/q7A6qCqmy6daaqGRm3Ee3NUC3xN.jpg", + "/qiQTwNmLWZfm5HWAQkfAMBnISLN.jpg", + "/sYicgyXd0uYqf9gjuBdbfT0zj3r.jpg", + "/vkYLK9JtA5liuPrZhhgrqfVviMy.jpg", null, null, - '/7y4vgRqEMyJzU3Rk8UzaPs2EA3r.jpg', - '/tED08RIEfQBC2g8xGhpaYwIkQXM.jpg' + "/7y4vgRqEMyJzU3Rk8UzaPs2EA3r.jpg", + "/tED08RIEfQBC2g8xGhpaYwIkQXM.jpg" ], - poster_path: '/jFe3aZZCW7uw1nUltNcKalOXI53.jpg', - id: '54e2cb2da88c820980760615', - mdbids: [ + "poster_path": "/jFe3aZZCW7uw1nUltNcKalOXI53.jpg", + "id": "54e2cb2da88c820980760615", + "mdbids": [ 316020, 181330, 325338, @@ -429,61 +429,61 @@ 105978, 39312 ], - mdbid: 99, - created_at: '2015-02-17T05:01:33+0000', - poster_paths: [ - '/jFe3aZZCW7uw1nUltNcKalOXI53.jpg', - '/jxbSeJkTzPKcikzCFQ33SKLGyvD.jpg', - '/9fs7cAuHLtkuwhYDRSVbMh3eeZz.jpg', - '/aDxGkwCH16lbWwJLehByhB3OdsE.jpg', - '/iakIbfoGC5qp47ZNDEAgZtd4ndl.jpg', - '/kWqcqy0iaG2WWHnykQ0ZcNjx5A5.jpg', - '/ppjN0BZaOJ6aHMXsECHJ0dpFb8Z.jpg', - '/kOkmvY2kjZfilgr4PQBz3plK5nE.jpg', - '/trDmWmPZOQJAcY4flL6yx0kdqjS.jpg', - '/jNSufmwIL6tsIOhTZ1FN47Mdf4T.jpg', - '/snmfymyvgeWDoV8xUClnKEiymmB.jpg', - '/ihEh03PnTrK2sfeiu04JlW5N25D.jpg', - '/ann60e6DLDG0cnjyvkFJAoN7rWx.jpg', - '/c8zcrYHsAg9R9oEbfdRhwslDwnp.jpg', - '/yNuLhb2y6I5cO7BfiJ7bdfllnIG.jpg', - '/uZMItnAF4KW7aS5XwTyL4Pe28Ji.jpg', + "mdbid": 99, + "created_at": "2015-02-17T05:01:33+0000", + "poster_paths": [ + "/jFe3aZZCW7uw1nUltNcKalOXI53.jpg", + "/jxbSeJkTzPKcikzCFQ33SKLGyvD.jpg", + "/9fs7cAuHLtkuwhYDRSVbMh3eeZz.jpg", + "/aDxGkwCH16lbWwJLehByhB3OdsE.jpg", + "/iakIbfoGC5qp47ZNDEAgZtd4ndl.jpg", + "/kWqcqy0iaG2WWHnykQ0ZcNjx5A5.jpg", + "/ppjN0BZaOJ6aHMXsECHJ0dpFb8Z.jpg", + "/kOkmvY2kjZfilgr4PQBz3plK5nE.jpg", + "/trDmWmPZOQJAcY4flL6yx0kdqjS.jpg", + "/jNSufmwIL6tsIOhTZ1FN47Mdf4T.jpg", + "/snmfymyvgeWDoV8xUClnKEiymmB.jpg", + "/ihEh03PnTrK2sfeiu04JlW5N25D.jpg", + "/ann60e6DLDG0cnjyvkFJAoN7rWx.jpg", + "/c8zcrYHsAg9R9oEbfdRhwslDwnp.jpg", + "/yNuLhb2y6I5cO7BfiJ7bdfllnIG.jpg", + "/uZMItnAF4KW7aS5XwTyL4Pe28Ji.jpg", null, - '/3SpRVNuZcvvCvN58nkpHIYzS6kB.jpg', - '/r8jSbyvnBDcy8YrTsQ9Auzm4eNI.jpg', - '/v5E4hs8eMHWhUk2xlQqEYtkJbmp.jpg' + "/3SpRVNuZcvvCvN58nkpHIYzS6kB.jpg", + "/r8jSbyvnBDcy8YrTsQ9Auzm4eNI.jpg", + "/v5E4hs8eMHWhUk2xlQqEYtkJbmp.jpg" ] }, { - title: 'Drama', - backdrop_path: '/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:32+0000', - backdrop_paths: [ - '/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg', - '/nnY2XnO3zjpkdq7xxOZPyI1r6V0.jpg', - '/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg', - '/pKawqrtCBMmxarft7o1LbEynys7.jpg', - '/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg', - '/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg', - '/ts4j3zYaPzdUVF3ijBeBdGVDWjX.jpg', - '/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg', - '/pbZtww8VsNDSwt9eMnG0faELwYV.jpg', - '/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg', - '/qzIu5zbI190k6BHbYgaQA93IZ9K.jpg', - '/geAe08WmchATnZF461WffQBqJk1.jpg', - '/f0HeQdnuFkboXWGBgqtwYUKgLZw.jpg', - '/e56QsaJy1weAUukiK2ZmIGVUALF.jpg', - '/3AZX2KB73kSza76h9O4bzdNeIac.jpg', - '/rjUl3pd1LHVOVfG4IGcyA1cId5l.jpg', - '/nnMC0BM6XbjIIrT4miYmMtPGcQV.jpg', - '/zddiDFf3X97pCimAOGKh3m0PwJV.jpg', - '/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg', - '/6AocjTM7B0RII4qrXG40wI1rEF3.jpg' + "title": "Drama", + "backdrop_path": "/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:32+0000", + "backdrop_paths": [ + "/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg", + "/nnY2XnO3zjpkdq7xxOZPyI1r6V0.jpg", + "/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg", + "/pKawqrtCBMmxarft7o1LbEynys7.jpg", + "/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg", + "/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg", + "/ts4j3zYaPzdUVF3ijBeBdGVDWjX.jpg", + "/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg", + "/pbZtww8VsNDSwt9eMnG0faELwYV.jpg", + "/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg", + "/qzIu5zbI190k6BHbYgaQA93IZ9K.jpg", + "/geAe08WmchATnZF461WffQBqJk1.jpg", + "/f0HeQdnuFkboXWGBgqtwYUKgLZw.jpg", + "/e56QsaJy1weAUukiK2ZmIGVUALF.jpg", + "/3AZX2KB73kSza76h9O4bzdNeIac.jpg", + "/rjUl3pd1LHVOVfG4IGcyA1cId5l.jpg", + "/nnMC0BM6XbjIIrT4miYmMtPGcQV.jpg", + "/zddiDFf3X97pCimAOGKh3m0PwJV.jpg", + "/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg", + "/6AocjTM7B0RII4qrXG40wI1rEF3.jpg" ], - poster_path: '/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg', - id: '54e2cb2ca88c820980760612', - mdbids: [ + "poster_path": "/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg", + "id": "54e2cb2ca88c820980760612", + "mdbids": [ 194662, 216015, 244786, @@ -505,61 +505,61 @@ 72190, 245916 ], - mdbid: 18, - created_at: '2015-02-17T05:01:32+0000', - poster_paths: [ - '/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg', - '/vHX9fxgipKgp9UXJxYNzyhnypQl.jpg', - '/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg', - '/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg', - '/gdiLTof3rbPDAmPaCf4g6op46bj.jpg', - '/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg', - '/fukWJhLISH7f6cnYSdgb0JrSP2Q.jpg', - '/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg', - '/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg', - '/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg', - '/hNnecAVTBdtNXoSdhDXIPKm0SVu.jpg', - '/4jspr8hLLuju59bCnMiefzRW4p0.jpg', - '/eKi4e5zXhQKs0De4xu5AAMvu376.jpg', - '/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg', - '/nX5XotM9yprCKarRH4fzOq1VM1J.jpg', - '/2EUAUIu5lHFlkj5FRryohlH6CRO.jpg', - '/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg', - '/lj8AMCjWx0jU93XajzUEOUUNKZF.jpg', - '/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg', - '/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg' + "mdbid": 18, + "created_at": "2015-02-17T05:01:32+0000", + "poster_paths": [ + "/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg", + "/vHX9fxgipKgp9UXJxYNzyhnypQl.jpg", + "/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg", + "/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg", + "/gdiLTof3rbPDAmPaCf4g6op46bj.jpg", + "/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg", + "/fukWJhLISH7f6cnYSdgb0JrSP2Q.jpg", + "/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg", + "/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg", + "/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg", + "/hNnecAVTBdtNXoSdhDXIPKm0SVu.jpg", + "/4jspr8hLLuju59bCnMiefzRW4p0.jpg", + "/eKi4e5zXhQKs0De4xu5AAMvu376.jpg", + "/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg", + "/nX5XotM9yprCKarRH4fzOq1VM1J.jpg", + "/2EUAUIu5lHFlkj5FRryohlH6CRO.jpg", + "/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg", + "/lj8AMCjWx0jU93XajzUEOUUNKZF.jpg", + "/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg", + "/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg" ] }, { - title: 'Family', - backdrop_path: '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:32+0000', - backdrop_paths: [ - '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', - '/irHmdlkdJphmk4HPfyAQfklKMbY.jpg', - '/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg', - '/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg', - '/GtodNrQnorVd3Gv6f6i4bdEwkP.jpg', - '/73hI1zgRALUDrB46JDPBLFqHcqv.jpg', - '/mkzpFIJmndBOfUteS7n3fI04lX3.jpg', - '/scVPsqO1MryjgbJuGg2JsWTE3WD.jpg', - '/9bd6IFBMwSOINrEW8VIBxaS4cd9.jpg', - '/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg', - '/z5e275a7iDNCQNx0NelsX5LYmDU.jpg', - '/agaDrrefPwOBMxSe9SIkq5zS4tQ.jpg', - '/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg', - '/lVshZpxU5EB8zXJrnXxblaDps6m.jpg', - '/clvgKN7DWTXm4b81HAHNvcvkBqX.jpg', - '/rmgxcw8tGTmdhsWqdjGBS9uI1tO.jpg', - '/x4N74cycZvKu5k3KDERJay4ajR3.jpg', - '/8tuHQglvFEHDASvagt3m5nAam9O.jpg', - '/oDqbewoFuIEWA7UWurole6MzDGn.jpg', - '/oPmZDHPkdmhuvxYGmwtKcQefeNr.jpg' + "title": "Family", + "backdrop_path": "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:32+0000", + "backdrop_paths": [ + "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", + "/irHmdlkdJphmk4HPfyAQfklKMbY.jpg", + "/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg", + "/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg", + "/GtodNrQnorVd3Gv6f6i4bdEwkP.jpg", + "/73hI1zgRALUDrB46JDPBLFqHcqv.jpg", + "/mkzpFIJmndBOfUteS7n3fI04lX3.jpg", + "/scVPsqO1MryjgbJuGg2JsWTE3WD.jpg", + "/9bd6IFBMwSOINrEW8VIBxaS4cd9.jpg", + "/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg", + "/z5e275a7iDNCQNx0NelsX5LYmDU.jpg", + "/agaDrrefPwOBMxSe9SIkq5zS4tQ.jpg", + "/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg", + "/lVshZpxU5EB8zXJrnXxblaDps6m.jpg", + "/clvgKN7DWTXm4b81HAHNvcvkBqX.jpg", + "/rmgxcw8tGTmdhsWqdjGBS9uI1tO.jpg", + "/x4N74cycZvKu5k3KDERJay4ajR3.jpg", + "/8tuHQglvFEHDASvagt3m5nAam9O.jpg", + "/oDqbewoFuIEWA7UWurole6MzDGn.jpg", + "/oPmZDHPkdmhuvxYGmwtKcQefeNr.jpg" ], - poster_path: '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', - id: '54e2cb2ca88c820980760613', - mdbids: [ + "poster_path": "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", + "id": "54e2cb2ca88c820980760613", + "mdbids": [ 177572, 109445, 82702, @@ -581,61 +581,61 @@ 425, 12445 ], - mdbid: 10751, - created_at: '2015-02-17T05:01:32+0000', - poster_paths: [ - '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', - '/jIjdFXKUNtdf1bwqMrhearpyjMj.jpg', - '/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg', - '/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg', - '/eCdQdoqG9kQQbzPnbVDXqwoTgLl.jpg', - '/tWwASv4CU1Au1IukacdSUewDCV3.jpg', - '/qTVlKThCmXOFryiiTJHBMgHhdAv.jpg', - '/saJi9Vs37zLmUENyIEdhgURk3a1.jpg', - '/4FYu1AAu14tuBU0lns0hbKiHUcH.jpg', - '/lMHbadNmznKs5vgBAkHxKGHulOa.jpg', - '/yup7xOCpOSHeUyalUH6mpFuBDpG.jpg', - '/4XFN435sO7t9sMiWGMtWcV9qfmq.jpg', - '/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg', - '/fhq87M6NNXqYH4OUoIfsM6oDUA3.jpg', - '/eFlBFMAifj436QctX3akDkUnhlk.jpg', - '/kQrYyZQHkwkUg2KlUDyvymj9FAp.jpg', - '/pTpxQB1N0waaSc3OSn0e9oc8kx9.jpg', - '/NUbCSwy2EQ9Z6psUjPqr3WdVI2.jpg', - '/zpaQwR0YViPd83bx1e559QyZ35i.jpg', - '/7xmtxRc9nQnCuWINuTT4SMP5NJc.jpg' + "mdbid": 10751, + "created_at": "2015-02-17T05:01:32+0000", + "poster_paths": [ + "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", + "/jIjdFXKUNtdf1bwqMrhearpyjMj.jpg", + "/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg", + "/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg", + "/eCdQdoqG9kQQbzPnbVDXqwoTgLl.jpg", + "/tWwASv4CU1Au1IukacdSUewDCV3.jpg", + "/qTVlKThCmXOFryiiTJHBMgHhdAv.jpg", + "/saJi9Vs37zLmUENyIEdhgURk3a1.jpg", + "/4FYu1AAu14tuBU0lns0hbKiHUcH.jpg", + "/lMHbadNmznKs5vgBAkHxKGHulOa.jpg", + "/yup7xOCpOSHeUyalUH6mpFuBDpG.jpg", + "/4XFN435sO7t9sMiWGMtWcV9qfmq.jpg", + "/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg", + "/fhq87M6NNXqYH4OUoIfsM6oDUA3.jpg", + "/eFlBFMAifj436QctX3akDkUnhlk.jpg", + "/kQrYyZQHkwkUg2KlUDyvymj9FAp.jpg", + "/pTpxQB1N0waaSc3OSn0e9oc8kx9.jpg", + "/NUbCSwy2EQ9Z6psUjPqr3WdVI2.jpg", + "/zpaQwR0YViPd83bx1e559QyZ35i.jpg", + "/7xmtxRc9nQnCuWINuTT4SMP5NJc.jpg" ] }, { - title: 'Fantasy', - backdrop_path: '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:33+0000', - backdrop_paths: [ - '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', - '/umR9aXTxOxQUuDH2DamoJ5fIPB.jpg', - '/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg', - '/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg', - '/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg', - '/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg', - '/hyR7Fs6Tepgu3yCQGtgO4Ilz9tY.jpg', - '/jjAq3tCezdlQduusgtMhpY2XzW0.jpg', - '/3FweBee0xZoY77uO1bhUOlQorNH.jpg', - '/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg', - '/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg', - '/73hI1zgRALUDrB46JDPBLFqHcqv.jpg', + "title": "Fantasy", + "backdrop_path": "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:33+0000", + "backdrop_paths": [ + "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", + "/umR9aXTxOxQUuDH2DamoJ5fIPB.jpg", + "/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg", + "/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg", + "/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg", + "/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg", + "/hyR7Fs6Tepgu3yCQGtgO4Ilz9tY.jpg", + "/jjAq3tCezdlQduusgtMhpY2XzW0.jpg", + "/3FweBee0xZoY77uO1bhUOlQorNH.jpg", + "/cHTJxPcq3hlshzOgHDRMCF8Wb9K.jpg", + "/yFtr1BD7AHeruIm9jsVnoebEN2v.jpg", + "/73hI1zgRALUDrB46JDPBLFqHcqv.jpg", null, - '/scVPsqO1MryjgbJuGg2JsWTE3WD.jpg', - '/9bd6IFBMwSOINrEW8VIBxaS4cd9.jpg', - '/LvmmDZxkTDqp0DX7mUo621ahdX.jpg', - '/tmFDgDmrdp5DYezwpL0ymQKIbnV.jpg', - '/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg', - '/dG4BmM32XJmKiwopLDQmvXEhuHB.jpg', - '/pIUvQ9Ed35wlWhY2oU6OmwEsmzG.jpg' + "/scVPsqO1MryjgbJuGg2JsWTE3WD.jpg", + "/9bd6IFBMwSOINrEW8VIBxaS4cd9.jpg", + "/LvmmDZxkTDqp0DX7mUo621ahdX.jpg", + "/tmFDgDmrdp5DYezwpL0ymQKIbnV.jpg", + "/wPRiV4TVpRCV2es81q0S1eRaUbm.jpg", + "/dG4BmM32XJmKiwopLDQmvXEhuHB.jpg", + "/pIUvQ9Ed35wlWhY2oU6OmwEsmzG.jpg" ], - poster_path: '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', - id: '54e2cb2db1e3a3099c7513ce', - mdbids: [ + "poster_path": "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", + "id": "54e2cb2db1e3a3099c7513ce", + "mdbids": [ 76757, 122917, 49017, @@ -657,60 +657,60 @@ 121, 120 ], - mdbid: 14, - created_at: '2015-02-17T05:01:33+0000', - poster_paths: [ - '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', - '/vgAHvS0bT3fpcpnJqT6uDTUsHTo.jpg', - '/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg', - '/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg', - '/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg', - '/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg', - '/gQCiuxGsfiXH1su6lp9n0nd0UeH.jpg', - '/h1XjBJoWdOh8aegBoVYKgABQZSL.jpg', - '/aROh4ZwLfv9tmtOAsrnkYTbpujA.jpg', - '/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg', - '/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg', - '/tWwASv4CU1Au1IukacdSUewDCV3.jpg', - '/95wDIXF97wk6h3ZGZgX0ztsiETk.jpg', - '/saJi9Vs37zLmUENyIEdhgURk3a1.jpg', - '/4FYu1AAu14tuBU0lns0hbKiHUcH.jpg', - '/bIuOWTtyFPjsFDevqvF3QrD1aun.jpg', - '/ha1FI2U5QF1L7Avb0mqxSgnXlbZ.jpg', - '/lMHbadNmznKs5vgBAkHxKGHulOa.jpg', - '/5o5fv1dHG7vWoH2hmqwihVPBoBm.jpg', - '/9HG6pINW1KoFTAKY3LdybkoOKAm.jpg' + "mdbid": 14, + "created_at": "2015-02-17T05:01:33+0000", + "poster_paths": [ + "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", + "/vgAHvS0bT3fpcpnJqT6uDTUsHTo.jpg", + "/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg", + "/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg", + "/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg", + "/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg", + "/gQCiuxGsfiXH1su6lp9n0nd0UeH.jpg", + "/h1XjBJoWdOh8aegBoVYKgABQZSL.jpg", + "/aROh4ZwLfv9tmtOAsrnkYTbpujA.jpg", + "/Ak8fnAmoTBkXsdYULWXAZA79XB6.jpg", + "/2jHTktwuZRWFjt6TPyVTh4z20Ju.jpg", + "/tWwASv4CU1Au1IukacdSUewDCV3.jpg", + "/95wDIXF97wk6h3ZGZgX0ztsiETk.jpg", + "/saJi9Vs37zLmUENyIEdhgURk3a1.jpg", + "/4FYu1AAu14tuBU0lns0hbKiHUcH.jpg", + "/bIuOWTtyFPjsFDevqvF3QrD1aun.jpg", + "/ha1FI2U5QF1L7Avb0mqxSgnXlbZ.jpg", + "/lMHbadNmznKs5vgBAkHxKGHulOa.jpg", + "/5o5fv1dHG7vWoH2hmqwihVPBoBm.jpg", + "/9HG6pINW1KoFTAKY3LdybkoOKAm.jpg" ] }, { - title: 'Foreign', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:33+0000', - backdrop_paths: [ + "title": "Foreign", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:33+0000", + "backdrop_paths": [ null, - '/z6Vnp7oV4wgrmGNuRw8WH1BpK8G.jpg', - '/tSuyqQmImPqheZOVLFaHNOG4Emd.jpg', - '/sMe6xHHrDVDF9ap8CZgNT0gWtBn.jpg', - '/uUoOPv3gohxLOJdhZ0D2OLctmBV.jpg', - '/oIdAuFg8gNRV2a3QCD6NBDpTFBR.jpg', - '/2JJSyQX2elrTY7sqHwCl1xrsCdy.jpg', - '/iaVBYxaXOZvVoxRopmUzGWr8RNV.jpg', - '/xHsqBcDy5VvV4MuI974HuIoRRQc.jpg', - '/yClF0KasgIupP7Rnkglq5h104LD.jpg', - '/5pyfKiChqJg3cZGn1EM9rIWXALl.jpg', - '/kMLevYmOdG49u1SdlQYCyX5pU5n.jpg', - '/Aa6FlC0W2sljzujYtwrSTry2oVS.jpg', - '/mOz8GDmE5em5o7ImqiMEIN35qqz.jpg', - '/tGtrYbrkBaSBI6wLgtLzvFZsbDh.jpg', - '/npwldtkS6hzeOuXGvBUNRL7N4Jo.jpg', - '/iwUNi6undqtiq0FMNduGjfPs2u.jpg', - '/fIdGH6HpsEOuxkRaRFc1KR5BH5D.jpg', - '/ykJm8JHcuzju5TnM1H4Z8rN56cA.jpg', - '/uOL6xMF1bm5TMb45YTnImByVLfU.jpg' + "/z6Vnp7oV4wgrmGNuRw8WH1BpK8G.jpg", + "/tSuyqQmImPqheZOVLFaHNOG4Emd.jpg", + "/sMe6xHHrDVDF9ap8CZgNT0gWtBn.jpg", + "/uUoOPv3gohxLOJdhZ0D2OLctmBV.jpg", + "/oIdAuFg8gNRV2a3QCD6NBDpTFBR.jpg", + "/2JJSyQX2elrTY7sqHwCl1xrsCdy.jpg", + "/iaVBYxaXOZvVoxRopmUzGWr8RNV.jpg", + "/xHsqBcDy5VvV4MuI974HuIoRRQc.jpg", + "/yClF0KasgIupP7Rnkglq5h104LD.jpg", + "/5pyfKiChqJg3cZGn1EM9rIWXALl.jpg", + "/kMLevYmOdG49u1SdlQYCyX5pU5n.jpg", + "/Aa6FlC0W2sljzujYtwrSTry2oVS.jpg", + "/mOz8GDmE5em5o7ImqiMEIN35qqz.jpg", + "/tGtrYbrkBaSBI6wLgtLzvFZsbDh.jpg", + "/npwldtkS6hzeOuXGvBUNRL7N4Jo.jpg", + "/iwUNi6undqtiq0FMNduGjfPs2u.jpg", + "/fIdGH6HpsEOuxkRaRFc1KR5BH5D.jpg", + "/ykJm8JHcuzju5TnM1H4Z8rN56cA.jpg", + "/uOL6xMF1bm5TMb45YTnImByVLfU.jpg" ], - poster_path: '/lKqtEqj1wHal0deTXEOZ2co9eEv.jpg', - id: '54e2cb2db1e3a3099c7513cf', - mdbids: [ + "poster_path": "/lKqtEqj1wHal0deTXEOZ2co9eEv.jpg", + "id": "54e2cb2db1e3a3099c7513cf", + "mdbids": [ 114876, 186929, 81527, @@ -732,61 +732,61 @@ 10912, 11876 ], - mdbid: 10769, - created_at: '2015-02-17T05:01:33+0000', - poster_paths: [ - '/lKqtEqj1wHal0deTXEOZ2co9eEv.jpg', - '/esDodQMU7j7RRCCvSyhrAlJUtpv.jpg', - '/mBFWp7PAkyTqhqVRDOAEUPLsAh9.jpg', - '/rmBUaljPj6SJVArR68fHl41oJU4.jpg', - '/3VajbHc64y2364LbgtYdLFQRCoP.jpg', - '/7q96evV2xWjvkO4fMdqe8vixKb8.jpg', - '/uiVgc8bCQm6PvQtGG0G1o41Fg4i.jpg', - '/b5fVWYALsSG08JQLHM0puZrhM2u.jpg', - '/8BpbXzSfnQSm3lveCm4h0j08cB7.jpg', - '/dqjTpLIyt3hIGVrIbaymWWTTeHg.jpg', - '/nP4zPLx3crdVVlt4U8JfFmnPdgO.jpg', - '/6ZAopX7i8sOAKekRftwQVavjZvl.jpg', - '/cjAnlvCrp9ZY7atASUsxRrhve7o.jpg', - '/aU7WLwPVCOoonAPWOPBmZ8X0c3c.jpg', - '/qj18ZymP4Xpwgj44mHf8HxFh6Au.jpg', - '/8PZeqDpC3QR67y5d6rMKgzFfQIh.jpg', - '/mLGbcNaheCzI8kYKl07yzs84jA8.jpg', - '/ccMPzxtnr5WcHaiwIN4P7mXoJzo.jpg', - '/yp9rIYBtoJBT6nKo4IFzlQZCFi5.jpg', - '/qombCbObrG6sNEIrsGBllkshZOg.jpg' + "mdbid": 10769, + "created_at": "2015-02-17T05:01:33+0000", + "poster_paths": [ + "/lKqtEqj1wHal0deTXEOZ2co9eEv.jpg", + "/esDodQMU7j7RRCCvSyhrAlJUtpv.jpg", + "/mBFWp7PAkyTqhqVRDOAEUPLsAh9.jpg", + "/rmBUaljPj6SJVArR68fHl41oJU4.jpg", + "/3VajbHc64y2364LbgtYdLFQRCoP.jpg", + "/7q96evV2xWjvkO4fMdqe8vixKb8.jpg", + "/uiVgc8bCQm6PvQtGG0G1o41Fg4i.jpg", + "/b5fVWYALsSG08JQLHM0puZrhM2u.jpg", + "/8BpbXzSfnQSm3lveCm4h0j08cB7.jpg", + "/dqjTpLIyt3hIGVrIbaymWWTTeHg.jpg", + "/nP4zPLx3crdVVlt4U8JfFmnPdgO.jpg", + "/6ZAopX7i8sOAKekRftwQVavjZvl.jpg", + "/cjAnlvCrp9ZY7atASUsxRrhve7o.jpg", + "/aU7WLwPVCOoonAPWOPBmZ8X0c3c.jpg", + "/qj18ZymP4Xpwgj44mHf8HxFh6Au.jpg", + "/8PZeqDpC3QR67y5d6rMKgzFfQIh.jpg", + "/mLGbcNaheCzI8kYKl07yzs84jA8.jpg", + "/ccMPzxtnr5WcHaiwIN4P7mXoJzo.jpg", + "/yp9rIYBtoJBT6nKo4IFzlQZCFi5.jpg", + "/qombCbObrG6sNEIrsGBllkshZOg.jpg" ] }, { - title: 'History', - backdrop_path: '/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:32+0000', - backdrop_paths: [ - '/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg', - '/aMjbjiH0mTUmHVLmYFTTdG5fMZQ.jpg', - '/fsjg1cEgXpO9TkxtmiAcLU8rnHd.jpg', - '/xnRPoFI7wzOYviw3PmoG94X2Lnc.jpg', - '/hAQKDTVKk04LWn82OYWLBPpsaVa.jpg', - '/1A2qOz9zgfG51LCZivXKLPbO88u.jpg', - '/mXJnEzFHmchkMkuvaJ25eV4qWL5.jpg', - '/lYJedpGH3p4oWyVabsekwkULNvz.jpg', - '/lcRGF2RpurdvBiSQVocfzRrxV9u.jpg', - '/sHsPEij3nojL34xcnaLdnuKEfmH.jpg', - '/6Q4GeMo08AOJJos9BzgnutFiZTG.jpg', - '/4y5TDUZlqUmWWtjTAznWb6CFpzt.jpg', - '/3hGRV0xR11aUxCGAJ52F8MTxrno.jpg', - '/q83wt7MsAWHNN1jNFXQb0bnCghe.jpg', - '/exb7qw4BPOwBr0qlxIsEKc3TCR.jpg', - '/rIpSszng8P0DL0TimSzZbpfnvh1.jpg', - '/kV0wiMw24cgac7BqcppgkmUSGIw.jpg', - '/mYNXGr8HNS1TO7wrQVSywrlduk9.jpg', - '/fJQ5kjLx4UdK05MC323Vlzwr6S8.jpg', - '/z7tLZ3c17Ch6qGIhUuiXBGGwHv0.jpg' + "title": "History", + "backdrop_path": "/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:32+0000", + "backdrop_paths": [ + "/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg", + "/aMjbjiH0mTUmHVLmYFTTdG5fMZQ.jpg", + "/fsjg1cEgXpO9TkxtmiAcLU8rnHd.jpg", + "/xnRPoFI7wzOYviw3PmoG94X2Lnc.jpg", + "/hAQKDTVKk04LWn82OYWLBPpsaVa.jpg", + "/1A2qOz9zgfG51LCZivXKLPbO88u.jpg", + "/mXJnEzFHmchkMkuvaJ25eV4qWL5.jpg", + "/lYJedpGH3p4oWyVabsekwkULNvz.jpg", + "/lcRGF2RpurdvBiSQVocfzRrxV9u.jpg", + "/sHsPEij3nojL34xcnaLdnuKEfmH.jpg", + "/6Q4GeMo08AOJJos9BzgnutFiZTG.jpg", + "/4y5TDUZlqUmWWtjTAznWb6CFpzt.jpg", + "/3hGRV0xR11aUxCGAJ52F8MTxrno.jpg", + "/q83wt7MsAWHNN1jNFXQb0bnCghe.jpg", + "/exb7qw4BPOwBr0qlxIsEKc3TCR.jpg", + "/rIpSszng8P0DL0TimSzZbpfnvh1.jpg", + "/kV0wiMw24cgac7BqcppgkmUSGIw.jpg", + "/mYNXGr8HNS1TO7wrQVSywrlduk9.jpg", + "/fJQ5kjLx4UdK05MC323Vlzwr6S8.jpg", + "/z7tLZ3c17Ch6qGIhUuiXBGGwHv0.jpg" ], - poster_path: '/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg', - id: '54e2cb2cb1e3a3099c7513cd', - mdbids: [ + "poster_path": "/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg", + "id": "54e2cb2cb1e3a3099c7513cd", + "mdbids": [ 205596, 891, 273895, @@ -808,61 +808,61 @@ 140823, 967 ], - mdbid: 36, - created_at: '2015-02-17T05:01:32+0000', - poster_paths: [ - '/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg', - '/jh4aA8tryNy1QDiQzkE1kzPqkwc.jpg', - '/xj1H3dpEHhouyJNB1lfpkKf9fXX.jpg', - '/kb3X943WMIJYVg4SOAyK0pmWL5D.jpg', - '/v8M5Sytbut7vBXyZ1HDy8lUVVcB.jpg', - '/y0hJt5WurqDplEzTnrrMCwE1YIZ.jpg', - '/2qAgGeYdLjelOEqjW9FYvPHpplC.jpg', - '/AmkLAKsETY0ZDTNGfXgybOmMGXF.jpg', - '/8knFfuqW289DJi2cpPl4RVTDkbo.jpg', - '/flnoqdC38mbaulAeptjynOFO7yi.jpg', - '/x1QMhNN6dNghhqltcZKBEMuWQ9g.jpg', - '/35CMz4t7PuUiQqt5h4u5nbrXZlF.jpg', - '/aoxYci1HnJdb4bno2jYSnzSGDkL.jpg', - '/m4puTcUAFtFJBLMVoRs0FLk3ET3.jpg', - '/ioI5pOOr5yWZAAZPEts5oSQwUrT.jpg', - '/yPisjyLweCl1tbgwgtzBCNCBle.jpg', - '/syPMBvvZsADTTRu3UKuxO1Wflq.jpg', - '/qtte2n6ygA1zVG5kLrjUGui28TJ.jpg', - '/mvs3reS18RP6IhjLwwLeVtkoeg0.jpg', - '/h5D65IPpYPmuBjIPWBTA557BQFS.jpg' + "mdbid": 36, + "created_at": "2015-02-17T05:01:32+0000", + "poster_paths": [ + "/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg", + "/jh4aA8tryNy1QDiQzkE1kzPqkwc.jpg", + "/xj1H3dpEHhouyJNB1lfpkKf9fXX.jpg", + "/kb3X943WMIJYVg4SOAyK0pmWL5D.jpg", + "/v8M5Sytbut7vBXyZ1HDy8lUVVcB.jpg", + "/y0hJt5WurqDplEzTnrrMCwE1YIZ.jpg", + "/2qAgGeYdLjelOEqjW9FYvPHpplC.jpg", + "/AmkLAKsETY0ZDTNGfXgybOmMGXF.jpg", + "/8knFfuqW289DJi2cpPl4RVTDkbo.jpg", + "/flnoqdC38mbaulAeptjynOFO7yi.jpg", + "/x1QMhNN6dNghhqltcZKBEMuWQ9g.jpg", + "/35CMz4t7PuUiQqt5h4u5nbrXZlF.jpg", + "/aoxYci1HnJdb4bno2jYSnzSGDkL.jpg", + "/m4puTcUAFtFJBLMVoRs0FLk3ET3.jpg", + "/ioI5pOOr5yWZAAZPEts5oSQwUrT.jpg", + "/yPisjyLweCl1tbgwgtzBCNCBle.jpg", + "/syPMBvvZsADTTRu3UKuxO1Wflq.jpg", + "/qtte2n6ygA1zVG5kLrjUGui28TJ.jpg", + "/mvs3reS18RP6IhjLwwLeVtkoeg0.jpg", + "/h5D65IPpYPmuBjIPWBTA557BQFS.jpg" ] }, { - title: 'Horror', - backdrop_path: '/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:33+0000', - backdrop_paths: [ - '/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg', - '/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg', - '/pJXFPBOild76vDAiapX5BOTtj2B.jpg', - '/2ROsQqKfy7f1uqsF8bTC7Vg0ui2.jpg', - '/tgXaHtpmxj4SkMxBTi1Desl6Mc6.jpg', - '/5G5rOi7Qkg5F3u94vpy1lrwr06W.jpg', - '/kTvGzXv4lIoQAOU8hAvdZtnEqy0.jpg', - '/6kazrydTbHlqKzE5h2xUejDgIec.jpg', - '/8iNsXY3LPsuT0gnUiTBMoNuRZI7.jpg', - '/4eGiNZtn6hMJvXfXuhoGmlJnk6e.jpg', - '/snnEAySuzjY7qmCQ5mJpxin7G6d.jpg', - '/vXVTd1owgGyemXKgJUnMLS33NOV.jpg', - '/7gTvjByEOx959HtetwcczO2eOJi.jpg', - '/214TKe8WBBbFXVrBRV9RECeE4oW.jpg', - '/8pCFurneAWouGbBMEoBHqU1ejbb.jpg', - '/9cs9RuOS3A5YEh6r4opVrIGbiJy.jpg', - '/vMNl7mDS57vhbglfth5JV7bAwZp.jpg', - '/rzzabQ2HNUDil53Zfueu0iyasgB.jpg', - '/cQXlDYsxdSJg9quBIM8IgpphAon.jpg', - '/elCm3CYwflEV6EaZdyf9zgS699i.jpg' + "title": "Horror", + "backdrop_path": "/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:33+0000", + "backdrop_paths": [ + "/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg", + "/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg", + "/pJXFPBOild76vDAiapX5BOTtj2B.jpg", + "/2ROsQqKfy7f1uqsF8bTC7Vg0ui2.jpg", + "/tgXaHtpmxj4SkMxBTi1Desl6Mc6.jpg", + "/5G5rOi7Qkg5F3u94vpy1lrwr06W.jpg", + "/kTvGzXv4lIoQAOU8hAvdZtnEqy0.jpg", + "/6kazrydTbHlqKzE5h2xUejDgIec.jpg", + "/8iNsXY3LPsuT0gnUiTBMoNuRZI7.jpg", + "/4eGiNZtn6hMJvXfXuhoGmlJnk6e.jpg", + "/snnEAySuzjY7qmCQ5mJpxin7G6d.jpg", + "/vXVTd1owgGyemXKgJUnMLS33NOV.jpg", + "/7gTvjByEOx959HtetwcczO2eOJi.jpg", + "/214TKe8WBBbFXVrBRV9RECeE4oW.jpg", + "/8pCFurneAWouGbBMEoBHqU1ejbb.jpg", + "/9cs9RuOS3A5YEh6r4opVrIGbiJy.jpg", + "/vMNl7mDS57vhbglfth5JV7bAwZp.jpg", + "/rzzabQ2HNUDil53Zfueu0iyasgB.jpg", + "/cQXlDYsxdSJg9quBIM8IgpphAon.jpg", + "/elCm3CYwflEV6EaZdyf9zgS699i.jpg" ], - poster_path: '/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg', - id: '54e2cb2d8fc9090996d2de80', - mdbids: [ + "poster_path": "/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg", + "id": "54e2cb2d8fc9090996d2de80", + "mdbids": [ 49017, 72190, 242512, @@ -884,61 +884,61 @@ 246741, 10304 ], - mdbid: 27, - created_at: '2015-02-17T05:01:33+0000', - poster_paths: [ - '/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg', - '/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg', - '/i52JCZSHDvkHtjQwlPqMAsjULVH.jpg', - '/l1DRl40x2OWUoPP42v8fjKdS1Z3.jpg', - '/nORMXEkYEbzkU5WkMWMgRDJwjSZ.jpg', - '/5jZRisBShiBpsH2k5rDYGEl9fSh.jpg', - '/KIyDkxJDCpew51Vni8FkHaLkon.jpg', - '/v0ZEUCfwsvUSuqU1bt7L0LJGx2p.jpg', - '/76GXWKs2IDi0ZERKLT57wkToV0A.jpg', - '/A5qwZ3IGWglRZtiLOOwwLWYqVWk.jpg', - '/9Ivu97Dej7zD2G4xnaK8zkDWwJC.jpg', - '/w6lvw6zMnvVB1dAHGkUQ7tCLFpO.jpg', - '/3pFxLrjVFm0uMrMG4B39opOfpqF.jpg', - '/t8cW3FSCDYCaWRiNHSvI6SDuWeA.jpg', - '/yAgxM61Sn0dYML4C9v3MJFp5zPI.jpg', - '/jnllnSq8u4d1oQPU7PsoAHD6bLU.jpg', - '/uU9R1byS3USozpzWJ5oz7YAkXyk.jpg', - '/amJHZ4eOMpqyKo1GK33HFV55zue.jpg', - '/tqUjvYvigCapKws9BbOOZ10sSJA.jpg', - '/xoQpKbnmGPuZub5NAPQq18hDEWA.jpg' + "mdbid": 27, + "created_at": "2015-02-17T05:01:33+0000", + "poster_paths": [ + "/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg", + "/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg", + "/i52JCZSHDvkHtjQwlPqMAsjULVH.jpg", + "/l1DRl40x2OWUoPP42v8fjKdS1Z3.jpg", + "/nORMXEkYEbzkU5WkMWMgRDJwjSZ.jpg", + "/5jZRisBShiBpsH2k5rDYGEl9fSh.jpg", + "/KIyDkxJDCpew51Vni8FkHaLkon.jpg", + "/v0ZEUCfwsvUSuqU1bt7L0LJGx2p.jpg", + "/76GXWKs2IDi0ZERKLT57wkToV0A.jpg", + "/A5qwZ3IGWglRZtiLOOwwLWYqVWk.jpg", + "/9Ivu97Dej7zD2G4xnaK8zkDWwJC.jpg", + "/w6lvw6zMnvVB1dAHGkUQ7tCLFpO.jpg", + "/3pFxLrjVFm0uMrMG4B39opOfpqF.jpg", + "/t8cW3FSCDYCaWRiNHSvI6SDuWeA.jpg", + "/yAgxM61Sn0dYML4C9v3MJFp5zPI.jpg", + "/jnllnSq8u4d1oQPU7PsoAHD6bLU.jpg", + "/uU9R1byS3USozpzWJ5oz7YAkXyk.jpg", + "/amJHZ4eOMpqyKo1GK33HFV55zue.jpg", + "/tqUjvYvigCapKws9BbOOZ10sSJA.jpg", + "/xoQpKbnmGPuZub5NAPQq18hDEWA.jpg" ] }, { - title: 'Music', - backdrop_path: '/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:33+0000', - backdrop_paths: [ - '/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg', - '/24uuwm3w99OYkV6qlfVfbG1IzKR.jpg', - '/8bXlXJtPAaSNYeWzdH4CG8TAsbJ.jpg', - '/iNj9LMS5APEHKsFLJdd5geQ94HM.jpg', - '/697HWfGtDmK5Yi5QTEL19Q8dzPL.jpg', - '/tRB98Z0qNL7TCaoDHMj88m1quSH.jpg', - '/fGq48GZp2PLVgx9IwW5lBf4DBYJ.jpg', - '/sHsPEij3nojL34xcnaLdnuKEfmH.jpg', - '/1jJVDNz5gan9WYuspnKAHwks39e.jpg', - '/xB3whEpbdc4zktvCBqNUvTiouw3.jpg', - '/hqNff5zochp9hzo299wC4Uoy8M9.jpg', - '/q8OEC91NiJOpghWI9hXtC27nFX0.jpg', - '/nXII61245PlG2vOH8Yl15WIhJFP.jpg', - '/vcLqVuSMx7dVfuOVKd4IL4RcMsa.jpg', - '/ngDmpFRzNGr9XMtKchhBZjt4DLH.jpg', - '/8oCkj3t9yvT363svYMssXqGxTRf.jpg', - '/dmcyvwz6AWBuxkZ1pRMJznC3Eb0.jpg', - '/aP9QSw2dFSARo7a59XDfl84lZ3a.jpg', - '/weiACHVZa0lQ10cd3BhJm9d8YUF.jpg', - '/z1nlvpCpMBitAiTSRvda3TxMyFr.jpg' + "title": "Music", + "backdrop_path": "/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:33+0000", + "backdrop_paths": [ + "/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg", + "/24uuwm3w99OYkV6qlfVfbG1IzKR.jpg", + "/8bXlXJtPAaSNYeWzdH4CG8TAsbJ.jpg", + "/iNj9LMS5APEHKsFLJdd5geQ94HM.jpg", + "/697HWfGtDmK5Yi5QTEL19Q8dzPL.jpg", + "/tRB98Z0qNL7TCaoDHMj88m1quSH.jpg", + "/fGq48GZp2PLVgx9IwW5lBf4DBYJ.jpg", + "/sHsPEij3nojL34xcnaLdnuKEfmH.jpg", + "/1jJVDNz5gan9WYuspnKAHwks39e.jpg", + "/xB3whEpbdc4zktvCBqNUvTiouw3.jpg", + "/hqNff5zochp9hzo299wC4Uoy8M9.jpg", + "/q8OEC91NiJOpghWI9hXtC27nFX0.jpg", + "/nXII61245PlG2vOH8Yl15WIhJFP.jpg", + "/vcLqVuSMx7dVfuOVKd4IL4RcMsa.jpg", + "/ngDmpFRzNGr9XMtKchhBZjt4DLH.jpg", + "/8oCkj3t9yvT363svYMssXqGxTRf.jpg", + "/dmcyvwz6AWBuxkZ1pRMJznC3Eb0.jpg", + "/aP9QSw2dFSARo7a59XDfl84lZ3a.jpg", + "/weiACHVZa0lQ10cd3BhJm9d8YUF.jpg", + "/z1nlvpCpMBitAiTSRvda3TxMyFr.jpg" ], - poster_path: '/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg', - id: '54e2cb2db1e3a3099c7513d0', - mdbids: [ + "poster_path": "/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg", + "id": "54e2cb2db1e3a3099c7513d0", + "mdbids": [ 244786, 243683, 206296, @@ -960,61 +960,61 @@ 15121, 209361 ], - mdbid: 10402, - created_at: '2015-02-17T05:01:33+0000', - poster_paths: [ - '/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg', - '/zjzD9DLYNThg3JnPJJOxZc0sxhO.jpg', - '/nPHemX0bcR5OyGPdPVUpIgwFqex.jpg', - '/gyLww7ZlcwuzqvIwM1osR9Ioqtm.jpg', - '/bduyqAyMtPDs4m16F7SuLQtbcud.jpg', - '/2a3ZmHS7IrOGG46hrbSS3qJJk6d.jpg', - '/5SwoeOUyfkS8s6aGB2bLYAL5jKR.jpg', - '/flnoqdC38mbaulAeptjynOFO7yi.jpg', - '/og7KVMqGTFaCNPmGVetxtR30Q0z.jpg', - '/6QmmHozsDv7ktW0cejsS3IJFUlZ.jpg', - '/hkvKhuUUgjJ4jrXKkvqoQ5JnQx5.jpg', - '/vGyhh8XB1AnDhBc4ssxrrz6ihdX.jpg', - '/n69umC19fsIKXlQBm0eD6waSwpI.jpg', - '/qtKYrSlnrgLS7wrYvEbcxrtAAqa.jpg', - '/dPxXbKxpUnrlnKeQ8EGdFTocNjG.jpg', - '/vgYM0ZDoeQKZEGxrGAO221J5rIG.jpg', - '/cEHLYmhklMNiXiB9lolU7SLERu7.jpg', - '/bvGyYmmnQG5NPP7m2nuLhaiC8LH.jpg', - '/459fPVvI4lkEV0piSfcq0irKHi8.jpg', - '/uuQ5wd9EqbOP0MVa7TeZ8RpDiaC.jpg' + "mdbid": 10402, + "created_at": "2015-02-17T05:01:33+0000", + "poster_paths": [ + "/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg", + "/zjzD9DLYNThg3JnPJJOxZc0sxhO.jpg", + "/nPHemX0bcR5OyGPdPVUpIgwFqex.jpg", + "/gyLww7ZlcwuzqvIwM1osR9Ioqtm.jpg", + "/bduyqAyMtPDs4m16F7SuLQtbcud.jpg", + "/2a3ZmHS7IrOGG46hrbSS3qJJk6d.jpg", + "/5SwoeOUyfkS8s6aGB2bLYAL5jKR.jpg", + "/flnoqdC38mbaulAeptjynOFO7yi.jpg", + "/og7KVMqGTFaCNPmGVetxtR30Q0z.jpg", + "/6QmmHozsDv7ktW0cejsS3IJFUlZ.jpg", + "/hkvKhuUUgjJ4jrXKkvqoQ5JnQx5.jpg", + "/vGyhh8XB1AnDhBc4ssxrrz6ihdX.jpg", + "/n69umC19fsIKXlQBm0eD6waSwpI.jpg", + "/qtKYrSlnrgLS7wrYvEbcxrtAAqa.jpg", + "/dPxXbKxpUnrlnKeQ8EGdFTocNjG.jpg", + "/vgYM0ZDoeQKZEGxrGAO221J5rIG.jpg", + "/cEHLYmhklMNiXiB9lolU7SLERu7.jpg", + "/bvGyYmmnQG5NPP7m2nuLhaiC8LH.jpg", + "/459fPVvI4lkEV0piSfcq0irKHi8.jpg", + "/uuQ5wd9EqbOP0MVa7TeZ8RpDiaC.jpg" ] }, { - title: 'Mystery', - backdrop_path: '/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:33+0000', - backdrop_paths: [ - '/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg', - '/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg', - '/pckdZ29bHj11hBsV3SbVVfmCB6C.jpg', - '/e56QsaJy1weAUukiK2ZmIGVUALF.jpg', - '/6AocjTM7B0RII4qrXG40wI1rEF3.jpg', - '/aMjbjiH0mTUmHVLmYFTTdG5fMZQ.jpg', - '/8jpE0Y8InANvFz2FVKmliY4yCQY.jpg', - '/ok6Ws65nDSLAIKkKgIjqyM5OGCc.jpg', - '/s2bT29y0ngXxxu2IA8AOzzXTRhd.jpg', - '/8TE77jL2e4zdERpv8hnBAHUmFRx.jpg', - '/9dQlkIOMjIdNksOjDnz56OvpLkM.jpg', - '/9ISArgiVBdNLASKmvflRDMOYYMj.jpg', - '/dYw7d9wJIZVQdwFpRlx7OyAQxCN.jpg', - '/ba4CpvnaxvAgff2jHiaqJrVpZJ5.jpg', - '/112d2vGKkdrv4ZrjyKCi1vhKZoX.jpg', - '/rRhoMIqgdX9wEtRUOLsqXKkH9I0.jpg', - '/oZY3DOlEZbEZvRxWynWkFTe4UgE.jpg', - '/k8nSKp54r0j1uy9QwM9RaD3goah.jpg', - '/4SySh90NtCRG9SlWuVX5BkaLLRh.jpg', - '/whV2SlkXyH2fWf7a92SGwFQVMTZ.jpg' + "title": "Mystery", + "backdrop_path": "/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:33+0000", + "backdrop_paths": [ + "/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg", + "/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg", + "/pckdZ29bHj11hBsV3SbVVfmCB6C.jpg", + "/e56QsaJy1weAUukiK2ZmIGVUALF.jpg", + "/6AocjTM7B0RII4qrXG40wI1rEF3.jpg", + "/aMjbjiH0mTUmHVLmYFTTdG5fMZQ.jpg", + "/8jpE0Y8InANvFz2FVKmliY4yCQY.jpg", + "/ok6Ws65nDSLAIKkKgIjqyM5OGCc.jpg", + "/s2bT29y0ngXxxu2IA8AOzzXTRhd.jpg", + "/8TE77jL2e4zdERpv8hnBAHUmFRx.jpg", + "/9dQlkIOMjIdNksOjDnz56OvpLkM.jpg", + "/9ISArgiVBdNLASKmvflRDMOYYMj.jpg", + "/dYw7d9wJIZVQdwFpRlx7OyAQxCN.jpg", + "/ba4CpvnaxvAgff2jHiaqJrVpZJ5.jpg", + "/112d2vGKkdrv4ZrjyKCi1vhKZoX.jpg", + "/rRhoMIqgdX9wEtRUOLsqXKkH9I0.jpg", + "/oZY3DOlEZbEZvRxWynWkFTe4UgE.jpg", + "/k8nSKp54r0j1uy9QwM9RaD3goah.jpg", + "/4SySh90NtCRG9SlWuVX5BkaLLRh.jpg", + "/whV2SlkXyH2fWf7a92SGwFQVMTZ.jpg" ], - poster_path: '/gdiLTof3rbPDAmPaCf4g6op46bj.jpg', - id: '54e2cb2d8fc9090996d2de7f', - mdbids: [ + "poster_path": "/gdiLTof3rbPDAmPaCf4g6op46bj.jpg", + "id": "54e2cb2d8fc9090996d2de7f", + "mdbids": [ 210577, 198663, 62, @@ -1036,61 +1036,61 @@ 1124, 171274 ], - mdbid: 9648, - created_at: '2015-02-17T05:01:33+0000', - poster_paths: [ - '/gdiLTof3rbPDAmPaCf4g6op46bj.jpg', - '/coss7RgL0NH6g4fC2s5atvf3dFO.jpg', - '/rT9w3tzk25jA8vl7KyvzUP5gHJV.jpg', - '/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg', - '/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg', - '/jh4aA8tryNy1QDiQzkE1kzPqkwc.jpg', - '/69blTptbjzu4lhBv9wl3lvBKWnw.jpg', - '/jXggcKzlyxj7yMBUIsqwiaaEtD5.jpg', - '/qmDpIHrmpJINaRKAfWQfftjCdyi.jpg', - '/hmOzkHlkGvi8x24fYpFSnXvjklv.jpg', - '/3UG2Pb122c7Va8MBtr1OHRB1YPh.jpg', - '/hGHmdbovLuPi1Vdr6JLp7LhqZ3s.jpg', - '/obhM86qyv8RsE69XSMTtT9FdE0b.jpg', - '/zgB9CCTDlXRv50Z70ZI4elJtNEk.jpg', - '/aZqKsvpJDFy2UzUMsdskNFbfkOd.jpg', - '/7D6S5JydrGqhvjtjUoQjQT5FR3z.jpg', - '/4eESVBvr7KEvPGUZVL5LDWsANda.jpg', - '/22ngurXbLqab7Sko6aTSdwOCe5W.jpg', - '/5MXyQfz8xUP3dIFPTubhTsbFY6N.jpg', - '/2fCg6FORkgRLpFIKlUg4gULIn1u.jpg' + "mdbid": 9648, + "created_at": "2015-02-17T05:01:33+0000", + "poster_paths": [ + "/gdiLTof3rbPDAmPaCf4g6op46bj.jpg", + "/coss7RgL0NH6g4fC2s5atvf3dFO.jpg", + "/rT9w3tzk25jA8vl7KyvzUP5gHJV.jpg", + "/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg", + "/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg", + "/jh4aA8tryNy1QDiQzkE1kzPqkwc.jpg", + "/69blTptbjzu4lhBv9wl3lvBKWnw.jpg", + "/jXggcKzlyxj7yMBUIsqwiaaEtD5.jpg", + "/qmDpIHrmpJINaRKAfWQfftjCdyi.jpg", + "/hmOzkHlkGvi8x24fYpFSnXvjklv.jpg", + "/3UG2Pb122c7Va8MBtr1OHRB1YPh.jpg", + "/hGHmdbovLuPi1Vdr6JLp7LhqZ3s.jpg", + "/obhM86qyv8RsE69XSMTtT9FdE0b.jpg", + "/zgB9CCTDlXRv50Z70ZI4elJtNEk.jpg", + "/aZqKsvpJDFy2UzUMsdskNFbfkOd.jpg", + "/7D6S5JydrGqhvjtjUoQjQT5FR3z.jpg", + "/4eESVBvr7KEvPGUZVL5LDWsANda.jpg", + "/22ngurXbLqab7Sko6aTSdwOCe5W.jpg", + "/5MXyQfz8xUP3dIFPTubhTsbFY6N.jpg", + "/2fCg6FORkgRLpFIKlUg4gULIn1u.jpg" ] }, { - title: 'Romance', - backdrop_path: '/geAe08WmchATnZF461WffQBqJk1.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:33+0000', - backdrop_paths: [ - '/geAe08WmchATnZF461WffQBqJk1.jpg', - '/qBZswxe7zqHEhfZXVHdlwjwSh7H.jpg', - '/9bd6IFBMwSOINrEW8VIBxaS4cd9.jpg', - '/3hOPv3w5mmPV3MA9fk0nPI5MyXV.jpg', - '/6YEWKSFIWFTLnInzXYiSaS7pVOP.jpg', - '/agaDrrefPwOBMxSe9SIkq5zS4tQ.jpg', - '/4f4tWe6uhwtuKMygfIAytR2W0pj.jpg', - '/lVshZpxU5EB8zXJrnXxblaDps6m.jpg', - '/3CbUdwyKnEcLSLkQYWJfi8H6gPO.jpg', - '/clvgKN7DWTXm4b81HAHNvcvkBqX.jpg', - '/24uuwm3w99OYkV6qlfVfbG1IzKR.jpg', - '/8bXlXJtPAaSNYeWzdH4CG8TAsbJ.jpg', - '/iNj9LMS5APEHKsFLJdd5geQ94HM.jpg', - '/whV2SlkXyH2fWf7a92SGwFQVMTZ.jpg', - '/jlU4FvYxUXaxyYM0worlD7wHdQj.jpg', - '/sAsTfl7KTalEZc2M5za8MWJB6mY.jpg', - '/697HWfGtDmK5Yi5QTEL19Q8dzPL.jpg', - '/iMBlLEjC74OQbQ60bubdF27P35K.jpg', - '/fGq48GZp2PLVgx9IwW5lBf4DBYJ.jpg', - '/g9Ug1tS5JT255V8VrpZBDx2EbVB.jpg' + "title": "Romance", + "backdrop_path": "/geAe08WmchATnZF461WffQBqJk1.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:33+0000", + "backdrop_paths": [ + "/geAe08WmchATnZF461WffQBqJk1.jpg", + "/qBZswxe7zqHEhfZXVHdlwjwSh7H.jpg", + "/9bd6IFBMwSOINrEW8VIBxaS4cd9.jpg", + "/3hOPv3w5mmPV3MA9fk0nPI5MyXV.jpg", + "/6YEWKSFIWFTLnInzXYiSaS7pVOP.jpg", + "/agaDrrefPwOBMxSe9SIkq5zS4tQ.jpg", + "/4f4tWe6uhwtuKMygfIAytR2W0pj.jpg", + "/lVshZpxU5EB8zXJrnXxblaDps6m.jpg", + "/3CbUdwyKnEcLSLkQYWJfi8H6gPO.jpg", + "/clvgKN7DWTXm4b81HAHNvcvkBqX.jpg", + "/24uuwm3w99OYkV6qlfVfbG1IzKR.jpg", + "/8bXlXJtPAaSNYeWzdH4CG8TAsbJ.jpg", + "/iNj9LMS5APEHKsFLJdd5geQ94HM.jpg", + "/whV2SlkXyH2fWf7a92SGwFQVMTZ.jpg", + "/jlU4FvYxUXaxyYM0worlD7wHdQj.jpg", + "/sAsTfl7KTalEZc2M5za8MWJB6mY.jpg", + "/697HWfGtDmK5Yi5QTEL19Q8dzPL.jpg", + "/iMBlLEjC74OQbQ60bubdF27P35K.jpg", + "/fGq48GZp2PLVgx9IwW5lBf4DBYJ.jpg", + "/g9Ug1tS5JT255V8VrpZBDx2EbVB.jpg" ], - poster_path: '/4jspr8hLLuju59bCnMiefzRW4p0.jpg', - id: '54e2cb2db1e3a30994751f35', - mdbids: [ + "poster_path": "/4jspr8hLLuju59bCnMiefzRW4p0.jpg", + "id": "54e2cb2db1e3a30994751f35", + "mdbids": [ 266856, 317121, 102651, @@ -1112,61 +1112,61 @@ 8328, 10068 ], - mdbid: 10749, - created_at: '2015-02-17T05:01:33+0000', - poster_paths: [ - '/4jspr8hLLuju59bCnMiefzRW4p0.jpg', - '/bTC4LPtLdnx9bleEcJJ08KVuIkv.jpg', - '/4FYu1AAu14tuBU0lns0hbKiHUcH.jpg', - '/dNcoXoRC7JHiqbe7k5Ufo6syiPP.jpg', - '/ilrZAV2klTB0FLxLb01bOp5pzD9.jpg', - '/4XFN435sO7t9sMiWGMtWcV9qfmq.jpg', - '/fsoTLnUXEUTNuVCBxAJMY0HPPd.jpg', - '/fhq87M6NNXqYH4OUoIfsM6oDUA3.jpg', - '/q8Pm7UpAqDdxo1Xnt29EHHAl2u2.jpg', - '/eFlBFMAifj436QctX3akDkUnhlk.jpg', - '/zjzD9DLYNThg3JnPJJOxZc0sxhO.jpg', - '/nPHemX0bcR5OyGPdPVUpIgwFqex.jpg', - '/gyLww7ZlcwuzqvIwM1osR9Ioqtm.jpg', - '/2fCg6FORkgRLpFIKlUg4gULIn1u.jpg', - '/dxkSApFLkKkcEQgjCH2KPwTHvw4.jpg', - '/4i77Qjxl8ppqquq2yMTKANp7qFZ.jpg', - '/bduyqAyMtPDs4m16F7SuLQtbcud.jpg', - '/omw5eaaPFgIo3IGJBbAF5xIiMLp.jpg', - '/5SwoeOUyfkS8s6aGB2bLYAL5jKR.jpg', - '/ft0NylB71zkkoEnFalNBBDWTXtS.jpg' + "mdbid": 10749, + "created_at": "2015-02-17T05:01:33+0000", + "poster_paths": [ + "/4jspr8hLLuju59bCnMiefzRW4p0.jpg", + "/bTC4LPtLdnx9bleEcJJ08KVuIkv.jpg", + "/4FYu1AAu14tuBU0lns0hbKiHUcH.jpg", + "/dNcoXoRC7JHiqbe7k5Ufo6syiPP.jpg", + "/ilrZAV2klTB0FLxLb01bOp5pzD9.jpg", + "/4XFN435sO7t9sMiWGMtWcV9qfmq.jpg", + "/fsoTLnUXEUTNuVCBxAJMY0HPPd.jpg", + "/fhq87M6NNXqYH4OUoIfsM6oDUA3.jpg", + "/q8Pm7UpAqDdxo1Xnt29EHHAl2u2.jpg", + "/eFlBFMAifj436QctX3akDkUnhlk.jpg", + "/zjzD9DLYNThg3JnPJJOxZc0sxhO.jpg", + "/nPHemX0bcR5OyGPdPVUpIgwFqex.jpg", + "/gyLww7ZlcwuzqvIwM1osR9Ioqtm.jpg", + "/2fCg6FORkgRLpFIKlUg4gULIn1u.jpg", + "/dxkSApFLkKkcEQgjCH2KPwTHvw4.jpg", + "/4i77Qjxl8ppqquq2yMTKANp7qFZ.jpg", + "/bduyqAyMtPDs4m16F7SuLQtbcud.jpg", + "/omw5eaaPFgIo3IGJBbAF5xIiMLp.jpg", + "/5SwoeOUyfkS8s6aGB2bLYAL5jKR.jpg", + "/ft0NylB71zkkoEnFalNBBDWTXtS.jpg" ] }, { - title: 'Science Fiction', - backdrop_path: '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:33+0000', - backdrop_paths: [ - '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', - '/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg', - '/eCgIoGvfNXrbSiQGqQHccuHjQHm.jpg', - '/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg', - '/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg', - '/pckdZ29bHj11hBsV3SbVVfmCB6C.jpg', - '/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg', - '/4qfXT9BtxeFuamR4F49m2mpKQI1.jpg', - '/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg', - '/83nHcz2KcnEpPXY50Ky2VldewJJ.jpg', - '/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg', - '/fCPqyqCppo0MruBqGXpz5pmUabU.jpg', - '/cHy7nSitAVgvZ7qfCK4JO47t3oZ.jpg', - '/rjUl3pd1LHVOVfG4IGcyA1cId5l.jpg', - '/hbn46fQaRmlpBuUrEiFqv0GDL6Y.jpg', - '/c07g3JVBJ6dSO50PsrNG1N5VYmu.jpg', - '/pmZtj1FKvQqISS6iQbkiLg5TAsr.jpg', - '/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg', - '/s9DKwK5fXzaqFOzkZkidkOk4KR9.jpg', - '/ZQixhAZx6fH1VNafFXsqa1B8QI.jpg' + "title": "Science Fiction", + "backdrop_path": "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:33+0000", + "backdrop_paths": [ + "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", + "/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg", + "/eCgIoGvfNXrbSiQGqQHccuHjQHm.jpg", + "/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg", + "/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg", + "/pckdZ29bHj11hBsV3SbVVfmCB6C.jpg", + "/ai9UKd8KownQKGIh1m5p3DuEeMm.jpg", + "/4qfXT9BtxeFuamR4F49m2mpKQI1.jpg", + "/OqCXGt5nl1cHPeotxCDvXLLe6p.jpg", + "/83nHcz2KcnEpPXY50Ky2VldewJJ.jpg", + "/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg", + "/fCPqyqCppo0MruBqGXpz5pmUabU.jpg", + "/cHy7nSitAVgvZ7qfCK4JO47t3oZ.jpg", + "/rjUl3pd1LHVOVfG4IGcyA1cId5l.jpg", + "/hbn46fQaRmlpBuUrEiFqv0GDL6Y.jpg", + "/c07g3JVBJ6dSO50PsrNG1N5VYmu.jpg", + "/pmZtj1FKvQqISS6iQbkiLg5TAsr.jpg", + "/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg", + "/s9DKwK5fXzaqFOzkZkidkOk4KR9.jpg", + "/ZQixhAZx6fH1VNafFXsqa1B8QI.jpg" ], - poster_path: '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', - id: '54e2cb2da88c820980760617', - mdbids: [ + "poster_path": "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", + "id": "54e2cb2da88c820980760617", + "mdbids": [ 76757, 118340, 240832, @@ -1188,58 +1188,58 @@ 206487, 1726 ], - mdbid: 878, - created_at: '2015-02-17T05:01:33+0000', - poster_paths: [ - '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', - '/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg', - '/4Y9PMR6hO2YWu2BrNhix4lHRA58.jpg', - '/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg', - '/coss7RgL0NH6g4fC2s5atvf3dFO.jpg', - '/rT9w3tzk25jA8vl7KyvzUP5gHJV.jpg', - '/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg', - '/pH4oeiZAh9a40tly4D0l6aAB3ms.jpg', - '/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg', - '/cWERd8rgbw7bCMZlwP207HUXxym.jpg', - '/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg', - '/5B182VoY6ZJh0a6kbp9k9UPvl2D.jpg', - '/ykIZB9dYBIKV13k5igGFncT5th6.jpg', - '/2EUAUIu5lHFlkj5FRryohlH6CRO.jpg', - '/cezWGskPY5x7GaglTTRN4Fugfb8.jpg', - '/tAhSyLxpaZJCr1oc2a3flvC2B7x.jpg', - '/sBZs1jSybBRBXDwcCR8IOyHLUMc.jpg', - '/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg', - '/i1trVjOx8rpVQ4zMVvtm5YXG9yA.jpg', - '/s2IG9qXfhJYxIttKyroYFBsHwzQ.jpg' + "mdbid": 878, + "created_at": "2015-02-17T05:01:33+0000", + "poster_paths": [ + "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", + "/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg", + "/4Y9PMR6hO2YWu2BrNhix4lHRA58.jpg", + "/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg", + "/coss7RgL0NH6g4fC2s5atvf3dFO.jpg", + "/rT9w3tzk25jA8vl7KyvzUP5gHJV.jpg", + "/qKkFk9HELmABpcPoc1HHZGIxQ5a.jpg", + "/pH4oeiZAh9a40tly4D0l6aAB3ms.jpg", + "/oDL2ryJ0sV2bmjgshVgJb3qzvwp.jpg", + "/cWERd8rgbw7bCMZlwP207HUXxym.jpg", + "/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg", + "/5B182VoY6ZJh0a6kbp9k9UPvl2D.jpg", + "/ykIZB9dYBIKV13k5igGFncT5th6.jpg", + "/2EUAUIu5lHFlkj5FRryohlH6CRO.jpg", + "/cezWGskPY5x7GaglTTRN4Fugfb8.jpg", + "/tAhSyLxpaZJCr1oc2a3flvC2B7x.jpg", + "/sBZs1jSybBRBXDwcCR8IOyHLUMc.jpg", + "/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg", + "/i1trVjOx8rpVQ4zMVvtm5YXG9yA.jpg", + "/s2IG9qXfhJYxIttKyroYFBsHwzQ.jpg" ] }, { - title: 'TV Movie', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:33+0000', - backdrop_paths: [ + "title": "TV Movie", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:33+0000", + "backdrop_paths": [ null, - '/lBIU50ihAcSJtxrayTv1CmyP7r0.jpg', - '/3Kq2dwrhHPOZTlSCO78D6xt0twi.jpg', - '/7ZAUeJEbkTsFchCbHPuTQiyzAUi.jpg', - '/jh1RyJeB9ramb7lRlo2PhBH0PGE.jpg', - '/cRfp77R9uCGqrMQL4cU8SeQwlrm.jpg', - '/rtPtwVTo4RqumivX2zspSk8GyCy.jpg', - '/dFqXuO2prVc0GEJt3fkhT9uw7F.jpg', - '/irZdN7HNiBfZt61m146ugmasNwY.jpg', - '/ie6u0zegHcVJEtHSpYn0KgEogrD.jpg', - '/c8WBbyFXaV5mSZ0wMh6x1BImPwU.jpg', - '/kHvPwL8b8CJuXl5YD7URIkBiHla.jpg', - '/99HVdqFO3SYlHIIn1e3NWWxfqLR.jpg', - '/8HsZ5j58BcU9Hf2FvCfBbjr8FY5.jpg', - '/5aPnM6kDZ6YLXwRD6z8tUCjMhvr.jpg', - '/fvszcGGBnh7KPLKOuKu1FPsr9vZ.jpg', - '/p7kHtJDMuowURRgR9wsMIeu941M.jpg', - '/zbc9LCaJcwSLKQntBxxA2YoixQa.jpg', - '/voMLIvBs7Pi8Zs2UtBztBEZg1ZS.jpg' + "/lBIU50ihAcSJtxrayTv1CmyP7r0.jpg", + "/3Kq2dwrhHPOZTlSCO78D6xt0twi.jpg", + "/7ZAUeJEbkTsFchCbHPuTQiyzAUi.jpg", + "/jh1RyJeB9ramb7lRlo2PhBH0PGE.jpg", + "/cRfp77R9uCGqrMQL4cU8SeQwlrm.jpg", + "/rtPtwVTo4RqumivX2zspSk8GyCy.jpg", + "/dFqXuO2prVc0GEJt3fkhT9uw7F.jpg", + "/irZdN7HNiBfZt61m146ugmasNwY.jpg", + "/ie6u0zegHcVJEtHSpYn0KgEogrD.jpg", + "/c8WBbyFXaV5mSZ0wMh6x1BImPwU.jpg", + "/kHvPwL8b8CJuXl5YD7URIkBiHla.jpg", + "/99HVdqFO3SYlHIIn1e3NWWxfqLR.jpg", + "/8HsZ5j58BcU9Hf2FvCfBbjr8FY5.jpg", + "/5aPnM6kDZ6YLXwRD6z8tUCjMhvr.jpg", + "/fvszcGGBnh7KPLKOuKu1FPsr9vZ.jpg", + "/p7kHtJDMuowURRgR9wsMIeu941M.jpg", + "/zbc9LCaJcwSLKQntBxxA2YoixQa.jpg", + "/voMLIvBs7Pi8Zs2UtBztBEZg1ZS.jpg" ], - id: '54e2cb2d8fc90956e0d464e4', - mdbids: [ + "id": "54e2cb2d8fc90956e0d464e4", + "mdbids": [ 323384, 256835, 285135, @@ -1260,60 +1260,60 @@ 13400, 72115 ], - mdbid: 10770, - created_at: '2015-02-17T05:01:33+0000', - poster_paths: [ + "mdbid": 10770, + "created_at": "2015-02-17T05:01:33+0000", + "poster_paths": [ null, - '/aGDVBwpxlA95mn7yTxwM8r0oTR0.jpg', - '/dafW2jgYi345RLn4cFoyCol4mUk.jpg', - '/kQXniShyRw5b0aEppkaWhesRelD.jpg', - '/7BduKfMtcj0nssxoy4mvvVB294h.jpg', - '/buoq7zYO4J3ttkEAqEMWelPDC0G.jpg', - '/3Bn0tc1BsheZwUQtvl10wTgQ16J.jpg', - '/sX9LQImeUYNuLZ137Uk7iOBjf4o.jpg', - '/xVTmmJdb5IKNbdT7dKOVARxoRTY.jpg', - '/gW02wV7kJBvcwHR3g3zInTCcwqF.jpg', - '/e4G3tVosLUOS6NdG2XwgBsYOcwl.jpg', - '/ll9H7W4fwZuGyKam03VAjT2oHfv.jpg', - '/vTkbuc3uRXCfprVHjJ3PIthVsTz.jpg', - '/nmVdWSfqTUhAH3HiOS8gbZHIQtt.jpg', - '/8QbyrbsW0eln4lBc7DtZyAJvl3h.jpg', - '/pABrtVmKsq1vXbP6CpTZbjXiu1l.jpg', - '/y1ChvzGMMI5eys69A1wKuRXpSma.jpg', - '/otO3xI0R7O3NcSy2cOFRLlxbSYA.jpg', - '/h3KI8SoEhk5im7HnlZAlXaDLjtB.jpg' + "/aGDVBwpxlA95mn7yTxwM8r0oTR0.jpg", + "/dafW2jgYi345RLn4cFoyCol4mUk.jpg", + "/kQXniShyRw5b0aEppkaWhesRelD.jpg", + "/7BduKfMtcj0nssxoy4mvvVB294h.jpg", + "/buoq7zYO4J3ttkEAqEMWelPDC0G.jpg", + "/3Bn0tc1BsheZwUQtvl10wTgQ16J.jpg", + "/sX9LQImeUYNuLZ137Uk7iOBjf4o.jpg", + "/xVTmmJdb5IKNbdT7dKOVARxoRTY.jpg", + "/gW02wV7kJBvcwHR3g3zInTCcwqF.jpg", + "/e4G3tVosLUOS6NdG2XwgBsYOcwl.jpg", + "/ll9H7W4fwZuGyKam03VAjT2oHfv.jpg", + "/vTkbuc3uRXCfprVHjJ3PIthVsTz.jpg", + "/nmVdWSfqTUhAH3HiOS8gbZHIQtt.jpg", + "/8QbyrbsW0eln4lBc7DtZyAJvl3h.jpg", + "/pABrtVmKsq1vXbP6CpTZbjXiu1l.jpg", + "/y1ChvzGMMI5eys69A1wKuRXpSma.jpg", + "/otO3xI0R7O3NcSy2cOFRLlxbSYA.jpg", + "/h3KI8SoEhk5im7HnlZAlXaDLjtB.jpg" ] }, { - title: 'Thriller', - backdrop_path: '/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:33+0000', - backdrop_paths: [ - '/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg', - '/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg', - '/mFb0ygcue4ITixDkdr7wm1Tdarx.jpg', - '/gktL2rfE7d1xrwPSSTohxLOjLSs.jpg', - '/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg', - '/pbZtww8VsNDSwt9eMnG0faELwYV.jpg', - '/rKESeEePWWu4rATQDJOktllaDDv.jpg', - '/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg', - '/83nHcz2KcnEpPXY50Ky2VldewJJ.jpg', - '/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg', - '/fCPqyqCppo0MruBqGXpz5pmUabU.jpg', - '/e56QsaJy1weAUukiK2ZmIGVUALF.jpg', - '/qjfE7SkPXpqFs8FX8rIaG6eO2aK.jpg', - '/rjUl3pd1LHVOVfG4IGcyA1cId5l.jpg', - '/nnMC0BM6XbjIIrT4miYmMtPGcQV.jpg', - '/c07g3JVBJ6dSO50PsrNG1N5VYmu.jpg', - '/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg', - '/s9DKwK5fXzaqFOzkZkidkOk4KR9.jpg', - '/6AocjTM7B0RII4qrXG40wI1rEF3.jpg', - '/biw5Nn85iBZZd8GWYO9XXH56VK2.jpg' + "title": "Thriller", + "backdrop_path": "/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:33+0000", + "backdrop_paths": [ + "/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg", + "/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg", + "/mFb0ygcue4ITixDkdr7wm1Tdarx.jpg", + "/gktL2rfE7d1xrwPSSTohxLOjLSs.jpg", + "/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg", + "/pbZtww8VsNDSwt9eMnG0faELwYV.jpg", + "/rKESeEePWWu4rATQDJOktllaDDv.jpg", + "/yTbPPmLAn7DiiM0sPYfZduoAjB.jpg", + "/83nHcz2KcnEpPXY50Ky2VldewJJ.jpg", + "/Fp3piEuHXxKnPBO5R0Wj4wjZHg.jpg", + "/fCPqyqCppo0MruBqGXpz5pmUabU.jpg", + "/e56QsaJy1weAUukiK2ZmIGVUALF.jpg", + "/qjfE7SkPXpqFs8FX8rIaG6eO2aK.jpg", + "/rjUl3pd1LHVOVfG4IGcyA1cId5l.jpg", + "/nnMC0BM6XbjIIrT4miYmMtPGcQV.jpg", + "/c07g3JVBJ6dSO50PsrNG1N5VYmu.jpg", + "/xMOQVYLeIKBXenJ9KMeasj7S64y.jpg", + "/s9DKwK5fXzaqFOzkZkidkOk4KR9.jpg", + "/6AocjTM7B0RII4qrXG40wI1rEF3.jpg", + "/biw5Nn85iBZZd8GWYO9XXH56VK2.jpg" ], - poster_path: '/lTbbt8otsYLKRDvELMRn83wdNoW.jpg', - id: '54e2cb2db1e3a30994751f34', - mdbids: [ + "poster_path": "/lTbbt8otsYLKRDvELMRn83wdNoW.jpg", + "id": "54e2cb2db1e3a30994751f34", + "mdbids": [ 260346, 210577, 245891, @@ -1335,61 +1335,61 @@ 245916, 201088 ], - mdbid: 53, - created_at: '2015-02-17T05:01:33+0000', - poster_paths: [ - '/lTbbt8otsYLKRDvELMRn83wdNoW.jpg', - '/gdiLTof3rbPDAmPaCf4g6op46bj.jpg', - '/sq2MmFv9sanl9PFMfbdaBLveSJ8.jpg', - '/8oPY6ULFOTbAEskySNhgsUIN4fW.jpg', - '/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg', - '/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg', - '/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg', - '/coss7RgL0NH6g4fC2s5atvf3dFO.jpg', - '/cWERd8rgbw7bCMZlwP207HUXxym.jpg', - '/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg', - '/5B182VoY6ZJh0a6kbp9k9UPvl2D.jpg', - '/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg', - '/kBXgGUt07sLpw6rhpiYwEyOwUDa.jpg', - '/2EUAUIu5lHFlkj5FRryohlH6CRO.jpg', - '/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg', - '/tAhSyLxpaZJCr1oc2a3flvC2B7x.jpg', - '/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg', - '/i1trVjOx8rpVQ4zMVvtm5YXG9yA.jpg', - '/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg', - '/tn07zjNNIJuOsecqTC2JEYA49uU.jpg' + "mdbid": 53, + "created_at": "2015-02-17T05:01:33+0000", + "poster_paths": [ + "/lTbbt8otsYLKRDvELMRn83wdNoW.jpg", + "/gdiLTof3rbPDAmPaCf4g6op46bj.jpg", + "/sq2MmFv9sanl9PFMfbdaBLveSJ8.jpg", + "/8oPY6ULFOTbAEskySNhgsUIN4fW.jpg", + "/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg", + "/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg", + "/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg", + "/coss7RgL0NH6g4fC2s5atvf3dFO.jpg", + "/cWERd8rgbw7bCMZlwP207HUXxym.jpg", + "/ezIurBz2fdUc68d98Fp9dRf5ihv.jpg", + "/5B182VoY6ZJh0a6kbp9k9UPvl2D.jpg", + "/xxe77USOk2tPnq7G4cL42gf1OxQ.jpg", + "/kBXgGUt07sLpw6rhpiYwEyOwUDa.jpg", + "/2EUAUIu5lHFlkj5FRryohlH6CRO.jpg", + "/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg", + "/tAhSyLxpaZJCr1oc2a3flvC2B7x.jpg", + "/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg", + "/i1trVjOx8rpVQ4zMVvtm5YXG9yA.jpg", + "/zVFVvN2AHXQi3AwHLXauoraMXA3.jpg", + "/tn07zjNNIJuOsecqTC2JEYA49uU.jpg" ] }, { - title: 'War', - backdrop_path: '/pKawqrtCBMmxarft7o1LbEynys7.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:33+0000', - backdrop_paths: [ - '/pKawqrtCBMmxarft7o1LbEynys7.jpg', - '/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg', - '/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg', - '/7BhTIyySTmmqNaoguSPjZAVMoQG.jpg', - '/dwRCptswUg5T27EM6hyXPlObRbE.jpg', - '/krkkgbtWHlMXVLbPGdIxzxKJERM.jpg', - '/mXJnEzFHmchkMkuvaJ25eV4qWL5.jpg', - '/4y5TDUZlqUmWWtjTAznWb6CFpzt.jpg', - '/8Sh5rRcOrBy4AIm3keZ50dOIn4D.jpg', - '/7nF6B9yCEq1ZCT82sGJVtNxOcl5.jpg', - '/9iZJAidcAdkoYtVx6ywjFbD3Aek.jpg', - '/cD7lPdjFyf5dQIlc6ToehqFrIZU.jpg', - '/q83wt7MsAWHNN1jNFXQb0bnCghe.jpg', - '/5tc7kIF9MXLwSDyW61sj4jTvBxX.jpg', - '/rIpSszng8P0DL0TimSzZbpfnvh1.jpg', - '/nhHsH7qUySVTY57mxf231xO7Fga.jpg', - '/cVkTGLthpromkyzyCFLvvLPZxFM.jpg', - '/9GyBSsMiGkPSk4OESIYZuedijBI.jpg', - '/haOTy0A9tMaoEEWdoaGavBnPQfY.jpg', - '/cDctk61tUeQz4LX7tTFPknI28ea.jpg' + "title": "War", + "backdrop_path": "/pKawqrtCBMmxarft7o1LbEynys7.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:33+0000", + "backdrop_paths": [ + "/pKawqrtCBMmxarft7o1LbEynys7.jpg", + "/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg", + "/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg", + "/7BhTIyySTmmqNaoguSPjZAVMoQG.jpg", + "/dwRCptswUg5T27EM6hyXPlObRbE.jpg", + "/krkkgbtWHlMXVLbPGdIxzxKJERM.jpg", + "/mXJnEzFHmchkMkuvaJ25eV4qWL5.jpg", + "/4y5TDUZlqUmWWtjTAznWb6CFpzt.jpg", + "/8Sh5rRcOrBy4AIm3keZ50dOIn4D.jpg", + "/7nF6B9yCEq1ZCT82sGJVtNxOcl5.jpg", + "/9iZJAidcAdkoYtVx6ywjFbD3Aek.jpg", + "/cD7lPdjFyf5dQIlc6ToehqFrIZU.jpg", + "/q83wt7MsAWHNN1jNFXQb0bnCghe.jpg", + "/5tc7kIF9MXLwSDyW61sj4jTvBxX.jpg", + "/rIpSszng8P0DL0TimSzZbpfnvh1.jpg", + "/nhHsH7qUySVTY57mxf231xO7Fga.jpg", + "/cVkTGLthpromkyzyCFLvvLPZxFM.jpg", + "/9GyBSsMiGkPSk4OESIYZuedijBI.jpg", + "/haOTy0A9tMaoEEWdoaGavBnPQfY.jpg", + "/cDctk61tUeQz4LX7tTFPknI28ea.jpg" ], - poster_path: '/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg', - id: '54e2cb2d8fc9090996d2de81', - mdbids: [ + "poster_path": "/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg", + "id": "54e2cb2d8fc9090996d2de81", + "mdbids": [ 228150, 49017, 205596, @@ -1411,61 +1411,61 @@ 72976, 676 ], - mdbid: 10752, - created_at: '2015-02-17T05:01:33+0000', - poster_paths: [ - '/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg', - '/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg', - '/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg', - '/ooy5M7QXEWVpOTAZIRGMskBQbQ9.jpg', - '/bRE7nmNuZzciep7MDkNfuTrM9zW.jpg', - '/c7Sqof18FgkoNcA0r5BFUcPLER1.jpg', - '/2qAgGeYdLjelOEqjW9FYvPHpplC.jpg', - '/35CMz4t7PuUiQqt5h4u5nbrXZlF.jpg', - '/ls9r2SG2IHJyCfpT0vxZZiT7ynF.jpg', - '/vDwqPyhkzFPRDmwz9KbzN2ouEPe.jpg', - '/e0etqHTsH7kSKR5orkUM5TjHXmy.jpg', - '/niqc0v3Lclh99Mmmxm49qZTIo2e.jpg', - '/m4puTcUAFtFJBLMVoRs0FLk3ET3.jpg', - '/jkzJg3WYFf2SPFVfyeRQL75vFzu.jpg', - '/yPisjyLweCl1tbgwgtzBCNCBle.jpg', - '/sm1QVZu5RKe1vXVHZooo4SZyHMx.jpg', - '/29veIwD38rVL2qY74emXQw4y25H.jpg', - '/orGXnBKfT41LxZhitLkXhqUfJJW.jpg', - '/gkkiDu9srCCbCMxGKwNwKCxK7KF.jpg', - '/gzjMpcyV1RksWonaA87DZ8wQTH0.jpg' + "mdbid": 10752, + "created_at": "2015-02-17T05:01:33+0000", + "poster_paths": [ + "/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg", + "/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg", + "/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg", + "/ooy5M7QXEWVpOTAZIRGMskBQbQ9.jpg", + "/bRE7nmNuZzciep7MDkNfuTrM9zW.jpg", + "/c7Sqof18FgkoNcA0r5BFUcPLER1.jpg", + "/2qAgGeYdLjelOEqjW9FYvPHpplC.jpg", + "/35CMz4t7PuUiQqt5h4u5nbrXZlF.jpg", + "/ls9r2SG2IHJyCfpT0vxZZiT7ynF.jpg", + "/vDwqPyhkzFPRDmwz9KbzN2ouEPe.jpg", + "/e0etqHTsH7kSKR5orkUM5TjHXmy.jpg", + "/niqc0v3Lclh99Mmmxm49qZTIo2e.jpg", + "/m4puTcUAFtFJBLMVoRs0FLk3ET3.jpg", + "/jkzJg3WYFf2SPFVfyeRQL75vFzu.jpg", + "/yPisjyLweCl1tbgwgtzBCNCBle.jpg", + "/sm1QVZu5RKe1vXVHZooo4SZyHMx.jpg", + "/29veIwD38rVL2qY74emXQw4y25H.jpg", + "/orGXnBKfT41LxZhitLkXhqUfJJW.jpg", + "/gkkiDu9srCCbCMxGKwNwKCxK7KF.jpg", + "/gzjMpcyV1RksWonaA87DZ8wQTH0.jpg" ] }, { - title: 'Western', - backdrop_path: '/qUcmEqnzIwlwZxSyTf3WliSfAjJ.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T05:01:33+0000', - backdrop_paths: [ - '/qUcmEqnzIwlwZxSyTf3WliSfAjJ.jpg', - '/tkxiEwG9xJIbyzvJSGYUyTkz3Mj.jpg', - '/vNNWdSVML7sXSzf4N4BLgVVKNFu.jpg', - '/lagdbLlNPVVbFczUgRnGjdeKeQC.jpg', - '/xGC2fY5KFmtuXnsuQwYQKFOLZFy.jpg', - '/tzJmubvEPw2etDhzqpA6Wb3K2EZ.jpg', - '/sgcgfrlOOB6lVXbfl75YTszF4jI.jpg', - '/wDPmggrApz7nxy4BAQk3rCLi3R6.jpg', - '/mndYimxcima4Z5YxH8XngTEGi5L.jpg', - '/gkW2RMlwl4kqaMIDjaAE73rAPpZ.jpg', - '/6A3UPYZEnMUlUgC7XOMntvdT0ni.jpg', - '/iob9MPYquOckNbhhjFUazRDlgGG.jpg', - '/gmapSsDGkPNPRxaQXLdotYkYKzM.jpg', - '/1tH9AnFjBFemdowMfDrnnhY8Y1z.jpg', - '/ftKZn79wtRqPdBJ95s5DGqbfhSy.jpg', - '/oTbK2deLtUKlIEpR7iU4acqnrZI.jpg', - '/pV3LyrIFTodujodc9mceF92zZog.jpg', - '/bhWbbMA70zc67Ba0OVLOFz8sRre.jpg', - '/izqIXYopCnJbL5LDm3X30RF8gLI.jpg', - '/nKYH8DaWjKE3RhEyaa0Ue01kPCp.jpg' + "title": "Western", + "backdrop_path": "/qUcmEqnzIwlwZxSyTf3WliSfAjJ.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T05:01:33+0000", + "backdrop_paths": [ + "/qUcmEqnzIwlwZxSyTf3WliSfAjJ.jpg", + "/tkxiEwG9xJIbyzvJSGYUyTkz3Mj.jpg", + "/vNNWdSVML7sXSzf4N4BLgVVKNFu.jpg", + "/lagdbLlNPVVbFczUgRnGjdeKeQC.jpg", + "/xGC2fY5KFmtuXnsuQwYQKFOLZFy.jpg", + "/tzJmubvEPw2etDhzqpA6Wb3K2EZ.jpg", + "/sgcgfrlOOB6lVXbfl75YTszF4jI.jpg", + "/wDPmggrApz7nxy4BAQk3rCLi3R6.jpg", + "/mndYimxcima4Z5YxH8XngTEGi5L.jpg", + "/gkW2RMlwl4kqaMIDjaAE73rAPpZ.jpg", + "/6A3UPYZEnMUlUgC7XOMntvdT0ni.jpg", + "/iob9MPYquOckNbhhjFUazRDlgGG.jpg", + "/gmapSsDGkPNPRxaQXLdotYkYKzM.jpg", + "/1tH9AnFjBFemdowMfDrnnhY8Y1z.jpg", + "/ftKZn79wtRqPdBJ95s5DGqbfhSy.jpg", + "/oTbK2deLtUKlIEpR7iU4acqnrZI.jpg", + "/pV3LyrIFTodujodc9mceF92zZog.jpg", + "/bhWbbMA70zc67Ba0OVLOFz8sRre.jpg", + "/izqIXYopCnJbL5LDm3X30RF8gLI.jpg", + "/nKYH8DaWjKE3RhEyaa0Ue01kPCp.jpg" ], - poster_path: '/5WJnxuw41sddupf8cwOxYftuvJG.jpg', - id: '54e2cb2da88c820980760616', - mdbids: [ + "poster_path": "/5WJnxuw41sddupf8cwOxYftuvJG.jpg", + "id": "54e2cb2da88c820980760616", + "mdbids": [ 68718, 188161, 266285, @@ -1487,29 +1487,29 @@ 6038, 33 ], - mdbid: 37, - created_at: '2015-02-17T05:01:33+0000', - poster_paths: [ - '/5WJnxuw41sddupf8cwOxYftuvJG.jpg', - '/12fqfvUmBOPg2pA0RsEhc31P28O.jpg', - '/pzKXVk5NZH8Uw1tBS9YE1dLva6x.jpg', - '/rVAHRtAMhV8QVXQMQ8NxNbZXCDp.jpg', - '/8PD1dgf0kQHtRawoSxp1jFemI1q.jpg', - '/yccgwPNVaqtgS1d0U5jjM6Mnza8.jpg', - '/b4vil5ueYJNBNypHmo1tpuevh4z.jpg', - '/qc7vaF5fIeTllAykdP3wldlMyRh.jpg', - '/sFLgxvtK9vxbNq502peVJ847Owp.jpg', - '/hpmclspug1I8EwKSWhL7pWWltA.jpg', - '/ocQ3rPqTkzLrj2zsTuIGjtpp9cJ.jpg', - '/Ai1lpWFaBHH3szTSBz7eZT3iobi.jpg', - '/tXEHvxU315Yu7bEaMMRcpDpW6RI.jpg', - '/5BiWWo12FnSFTatD8dfMpoF7bVs.jpg', - '/uh0sJcx3SLtclJSuKAXl6Tt6AV0.jpg', - '/l55xYXNXWHikLN1fX19gJjD91kB.jpg', - '/bIQQm0M2frhkctqR5vPyU1qqcZm.jpg', - '/59ywz8rQmXn4bl60WOMJddPc7z.jpg', - '/2H2h2Qdt2TXLQslCHi8xEDDONpq.jpg', - '/9oPodyvCWyPMZJDjg29tBfFRwtG.jpg' + "mdbid": 37, + "created_at": "2015-02-17T05:01:33+0000", + "poster_paths": [ + "/5WJnxuw41sddupf8cwOxYftuvJG.jpg", + "/12fqfvUmBOPg2pA0RsEhc31P28O.jpg", + "/pzKXVk5NZH8Uw1tBS9YE1dLva6x.jpg", + "/rVAHRtAMhV8QVXQMQ8NxNbZXCDp.jpg", + "/8PD1dgf0kQHtRawoSxp1jFemI1q.jpg", + "/yccgwPNVaqtgS1d0U5jjM6Mnza8.jpg", + "/b4vil5ueYJNBNypHmo1tpuevh4z.jpg", + "/qc7vaF5fIeTllAykdP3wldlMyRh.jpg", + "/sFLgxvtK9vxbNq502peVJ847Owp.jpg", + "/hpmclspug1I8EwKSWhL7pWWltA.jpg", + "/ocQ3rPqTkzLrj2zsTuIGjtpp9cJ.jpg", + "/Ai1lpWFaBHH3szTSBz7eZT3iobi.jpg", + "/tXEHvxU315Yu7bEaMMRcpDpW6RI.jpg", + "/5BiWWo12FnSFTatD8dfMpoF7bVs.jpg", + "/uh0sJcx3SLtclJSuKAXl6Tt6AV0.jpg", + "/l55xYXNXWHikLN1fX19gJjD91kB.jpg", + "/bIQQm0M2frhkctqR5vPyU1qqcZm.jpg", + "/59ywz8rQmXn4bl60WOMJddPc7z.jpg", + "/2H2h2Qdt2TXLQslCHi8xEDDONpq.jpg", + "/9oPodyvCWyPMZJDjg29tBfFRwtG.jpg" ] } -]; +] \ No newline at end of file diff --git a/app/lib/data/list.json b/app/lib/data/list.json index ae529a5..1e74475 100644 --- a/app/lib/data/list.json +++ b/app/lib/data/list.json @@ -28,7 +28,7 @@ { "title": "Wild Card", "backdrop_path": "/pbZtww8VsNDSwt9eMnG0faELwYV.jpg", - "tagline": "It's a card… and it's wild. Now watch the movie.", + "tagline": "Its a card... and its wild. Now watch the movie.", "poster_path": "/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg", "id": "54d8d176a88c820980253916", "mdbid": 265208 @@ -84,7 +84,7 @@ { "title": "The SpongeBob Movie: Sponge Out of Water", "backdrop_path": "/1WNayre36yQ2ZBNXzXksQotoK25.jpg", - "tagline": "He's leaving his world behind, to redeem himself of these past 10 years", + "tagline": "He is leaving his world behind, to redeem himself of these past 10 years", "poster_path": "/sZGlB5G7FjGiGwVUusluSb9DdKd.jpg", "id": "54d8d1768fc909099681ef72", "mdbid": 228165 diff --git a/app/lib/data/lists.json b/app/lib/data/lists.json index 1bb1fbc..6701f6c 100644 --- a/app/lib/data/lists.json +++ b/app/lib/data/lists.json @@ -1,35 +1,35 @@ [ { - list_id: 'now_playing', - title: 'Now Playing', - backdrop_path: '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T04:59:25+0000', - backdrop_paths: [ - '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', - '/nnY2XnO3zjpkdq7xxOZPyI1r6V0.jpg', - '/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg', - '/pbZtww8VsNDSwt9eMnG0faELwYV.jpg', - '/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg', - '/7QCoaQQ8UE1kKNr13amz190Q6Fy.jpg', - '/qBZswxe7zqHEhfZXVHdlwjwSh7H.jpg', - '/biw5Nn85iBZZd8GWYO9XXH56VK2.jpg', - '/mkzpFIJmndBOfUteS7n3fI04lX3.jpg', - '/scVPsqO1MryjgbJuGg2JsWTE3WD.jpg', - '/Aq0EuKR46NNXw6c8WJV9bYljzCD.jpg', - '/1DMrM1RDSClzeabdrTejEYtTFMU.jpg', - '/j0cBcUtenrbhX0acGZLxYWDbScx.jpg', - '/tGyXLY1jzK29z9blMzy0yc3qTG8.jpg', - '/8bXlXJtPAaSNYeWzdH4CG8TAsbJ.jpg', + "list_id": "now_playing", + "title": "Now Playing", + "backdrop_path": "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T04:59:25+0000", + "backdrop_paths": [ + "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", + "/nnY2XnO3zjpkdq7xxOZPyI1r6V0.jpg", + "/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg", + "/pbZtww8VsNDSwt9eMnG0faELwYV.jpg", + "/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg", + "/7QCoaQQ8UE1kKNr13amz190Q6Fy.jpg", + "/qBZswxe7zqHEhfZXVHdlwjwSh7H.jpg", + "/biw5Nn85iBZZd8GWYO9XXH56VK2.jpg", + "/mkzpFIJmndBOfUteS7n3fI04lX3.jpg", + "/scVPsqO1MryjgbJuGg2JsWTE3WD.jpg", + "/Aq0EuKR46NNXw6c8WJV9bYljzCD.jpg", + "/1DMrM1RDSClzeabdrTejEYtTFMU.jpg", + "/j0cBcUtenrbhX0acGZLxYWDbScx.jpg", + "/tGyXLY1jzK29z9blMzy0yc3qTG8.jpg", + "/8bXlXJtPAaSNYeWzdH4CG8TAsbJ.jpg", null, - '/3ReehmXMwnhwqdvjzECb72Xw27W.jpg', - '/lYJedpGH3p4oWyVabsekwkULNvz.jpg', - '/yIAxebMW8bvGJhZO8Q3TSi4zMDQ.jpg', + "/3ReehmXMwnhwqdvjzECb72Xw27W.jpg", + "/lYJedpGH3p4oWyVabsekwkULNvz.jpg", + "/yIAxebMW8bvGJhZO8Q3TSi4zMDQ.jpg", null ], - poster_path: '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', - id: '54da1dd4a88c8209802f25a8', - mdbids: [ + "poster_path": "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", + "id": "54da1dd4a88c8209802f25a8", + "mdbids": [ 76757, 216015, 260346, @@ -51,62 +51,62 @@ 297556, 302960 ], - created_at: '2015-02-10T15:03:48+0000', - order: 0, - poster_paths: [ - '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', - '/vHX9fxgipKgp9UXJxYNzyhnypQl.jpg', - '/lTbbt8otsYLKRDvELMRn83wdNoW.jpg', - '/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg', - '/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg', - '/vYAvnSWC0LkH58cOeExajuuSrUC.jpg', - '/bTC4LPtLdnx9bleEcJJ08KVuIkv.jpg', - '/tn07zjNNIJuOsecqTC2JEYA49uU.jpg', - '/qTVlKThCmXOFryiiTJHBMgHhdAv.jpg', - '/saJi9Vs37zLmUENyIEdhgURk3a1.jpg', - '/9scuwyaJBqxMmapuyts4s2zt9sP.jpg', - '/9wChSuUoQDiBKUnGTcYMkzRha60.jpg', - '/2FXTYOn4S4uInujHS4qMU8gwV97.jpg', - '/nGULYz1iLVAeS9dQkZZ2oNTt4s3.jpg', - '/nPHemX0bcR5OyGPdPVUpIgwFqex.jpg', + "created_at": "2015-02-10T15:03:48+0000", + "order": 0, + "poster_paths": [ + "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", + "/vHX9fxgipKgp9UXJxYNzyhnypQl.jpg", + "/lTbbt8otsYLKRDvELMRn83wdNoW.jpg", + "/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg", + "/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg", + "/vYAvnSWC0LkH58cOeExajuuSrUC.jpg", + "/bTC4LPtLdnx9bleEcJJ08KVuIkv.jpg", + "/tn07zjNNIJuOsecqTC2JEYA49uU.jpg", + "/qTVlKThCmXOFryiiTJHBMgHhdAv.jpg", + "/saJi9Vs37zLmUENyIEdhgURk3a1.jpg", + "/9scuwyaJBqxMmapuyts4s2zt9sP.jpg", + "/9wChSuUoQDiBKUnGTcYMkzRha60.jpg", + "/2FXTYOn4S4uInujHS4qMU8gwV97.jpg", + "/nGULYz1iLVAeS9dQkZZ2oNTt4s3.jpg", + "/nPHemX0bcR5OyGPdPVUpIgwFqex.jpg", null, - '/chgpheyKaJzOVN6u3n2tJupO4aC.jpg', - '/AmkLAKsETY0ZDTNGfXgybOmMGXF.jpg', - '/3n0zmm2dPF0TQt2ikJ2tUjKr2FT.jpg', - '/Mx9dBrZaVJlFmdebfao08FO6Z.jpg' + "/chgpheyKaJzOVN6u3n2tJupO4aC.jpg", + "/AmkLAKsETY0ZDTNGfXgybOmMGXF.jpg", + "/3n0zmm2dPF0TQt2ikJ2tUjKr2FT.jpg", + "/Mx9dBrZaVJlFmdebfao08FO6Z.jpg" ] }, { - list_id: 'upcoming', - title: 'Upcoming', - backdrop_path: '/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T04:59:24+0000', - backdrop_paths: [ - '/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg', - '/jmZ8cnELpLGhEEgoRp5QR5VoGyp.jpg', - '/snnEAySuzjY7qmCQ5mJpxin7G6d.jpg', - '/c8kSlfYBUap9csjYkKd22aOypcu.jpg', - '/5KnJ8T0ynd0EDEd1gYCDmGvPVjE.jpg', + "list_id": "upcoming", + "title": "Upcoming", + "backdrop_path": "/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T04:59:24+0000", + "backdrop_paths": [ + "/eNNQo0CSJpN7KYrQB6lKFqcNE4W.jpg", + "/jmZ8cnELpLGhEEgoRp5QR5VoGyp.jpg", + "/snnEAySuzjY7qmCQ5mJpxin7G6d.jpg", + "/c8kSlfYBUap9csjYkKd22aOypcu.jpg", + "/5KnJ8T0ynd0EDEd1gYCDmGvPVjE.jpg", null, - '/2AmaN4jrpl2xz48mYqQeSBzhwhX.jpg', + "/2AmaN4jrpl2xz48mYqQeSBzhwhX.jpg", null, null, null, null, - '/wIFCpX549uyfGbiMqeHsz0Yvymz.jpg', + "/wIFCpX549uyfGbiMqeHsz0Yvymz.jpg", null, - '/ekrLcwLhqypvzz6GuJ6x7KlGvR3.jpg', - '/89LLa0mSHoJn2QAqsMRDBggEE2f.jpg', - '/bTtMPoc7iatQfja8z13GNNNrNSF.jpg', - '/rbKVsANECkgZ1s52rVYFMLghs7j.jpg', - '/sH4J1XiOx4PJ2cZ6toEDOcFeGOl.jpg', + "/ekrLcwLhqypvzz6GuJ6x7KlGvR3.jpg", + "/89LLa0mSHoJn2QAqsMRDBggEE2f.jpg", + "/bTtMPoc7iatQfja8z13GNNNrNSF.jpg", + "/rbKVsANECkgZ1s52rVYFMLghs7j.jpg", + "/sH4J1XiOx4PJ2cZ6toEDOcFeGOl.jpg", null, - '/5sgK02F3bKKVIsOtUswzmUw4hA1.jpg' + "/5sgK02F3bKKVIsOtUswzmUw4hA1.jpg" ], - poster_path: '/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg', - id: '54da1dd38fc90909968ca17b', - mdbids: [ + "poster_path": "/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg", + "id": "54da1dd38fc90909968ca17b", + "mdbids": [ 316322, 289720, 298032, @@ -128,62 +128,62 @@ 299822, 319513 ], - created_at: '2015-02-10T15:03:47+0000', - order: 1, - poster_paths: [ - '/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg', - '/dUIubxF5osHOJxS3mJNWCqTqWn5.jpg', - '/9Ivu97Dej7zD2G4xnaK8zkDWwJC.jpg', - '/uYtl5SBJzmk9HMcOgwtsjWNXs0o.jpg', - '/nIQOgiHnAF9fnvqnOO0etd0YIb9.jpg', - '/7Vm0FymDPlstRt6WusaJbmZVzRS.jpg', - '/yZlIxGm61jIGq8b3YmMiWaKGvIz.jpg', - '/sJKCBIlRAuAx0436t231LRLoqWa.jpg', - '/iqIaXLOQeOELAvtuchkEghIN5ay.jpg', + "created_at": "2015-02-10T15:03:47+0000", + "order": 1, + "poster_paths": [ + "/rtQ0rhI9V8lbklEXin1saCpHzdA.jpg", + "/dUIubxF5osHOJxS3mJNWCqTqWn5.jpg", + "/9Ivu97Dej7zD2G4xnaK8zkDWwJC.jpg", + "/uYtl5SBJzmk9HMcOgwtsjWNXs0o.jpg", + "/nIQOgiHnAF9fnvqnOO0etd0YIb9.jpg", + "/7Vm0FymDPlstRt6WusaJbmZVzRS.jpg", + "/yZlIxGm61jIGq8b3YmMiWaKGvIz.jpg", + "/sJKCBIlRAuAx0436t231LRLoqWa.jpg", + "/iqIaXLOQeOELAvtuchkEghIN5ay.jpg", null, - '/szxELMq84TgMtuI6NqYFgjAh3O0.jpg', - '/5zfxgiWdWDM9WRu8DiDBdgAohiK.jpg', + "/szxELMq84TgMtuI6NqYFgjAh3O0.jpg", + "/5zfxgiWdWDM9WRu8DiDBdgAohiK.jpg", null, - '/2jG4mqV3Z1HY1uKz21PGLUfeuZM.jpg', - '/3gl11EsZS5vboQvvMYeCIzitaJz.jpg', - '/tSUuubFMZZVmGNGSP8S9bkH3BLP.jpg', - '/86bY7OdITV3PewH3utGhFdgejq1.jpg', - '/lKNYRlJ9jJAPU7yNYU0qTSQ4AYa.jpg', - '/bch1TOaN7T1WSHTnVaGp2PwcWFm.jpg', - '/3HNi27VKFzE1HJkjemDWqequHZF.jpg' + "/2jG4mqV3Z1HY1uKz21PGLUfeuZM.jpg", + "/3gl11EsZS5vboQvvMYeCIzitaJz.jpg", + "/tSUuubFMZZVmGNGSP8S9bkH3BLP.jpg", + "/86bY7OdITV3PewH3utGhFdgejq1.jpg", + "/lKNYRlJ9jJAPU7yNYU0qTSQ4AYa.jpg", + "/bch1TOaN7T1WSHTnVaGp2PwcWFm.jpg", + "/3HNi27VKFzE1HJkjemDWqequHZF.jpg" ] }, { - list_id: 'popular', - title: 'Popular', - backdrop_path: '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T04:59:24+0000', - backdrop_paths: [ - '/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg', - '/7OluTl9LoaMDZ2MVdrFVuU2os09.jpg', - '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', - '/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg', - '/nnY2XnO3zjpkdq7xxOZPyI1r6V0.jpg', - '/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg', - '/pKawqrtCBMmxarft7o1LbEynys7.jpg', - '/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg', - '/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg', - '/umR9aXTxOxQUuDH2DamoJ5fIPB.jpg', - '/mFb0ygcue4ITixDkdr7wm1Tdarx.jpg', - '/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg', - '/pMNSiNT55XrxWPmoI5ytJyinRa8.jpg', - '/gktL2rfE7d1xrwPSSTohxLOjLSs.jpg', - '/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg', - '/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg', - '/pbZtww8VsNDSwt9eMnG0faELwYV.jpg', - '/eCgIoGvfNXrbSiQGqQHccuHjQHm.jpg', - '/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg', - '/rKESeEePWWu4rATQDJOktllaDDv.jpg' + "list_id": "popular", + "title": "Popular", + "backdrop_path": "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T04:59:24+0000", + "backdrop_paths": [ + "/oYZtd7Md78HuzBvT5dlJlHWc89O.jpg", + "/7OluTl9LoaMDZ2MVdrFVuU2os09.jpg", + "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", + "/AsJVim0Hk3KbQPbfjyijfjqmaoZ.jpg", + "/nnY2XnO3zjpkdq7xxOZPyI1r6V0.jpg", + "/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg", + "/pKawqrtCBMmxarft7o1LbEynys7.jpg", + "/tSqrJxQ6UHQHdcbQokdCtAmv9Vx.jpg", + "/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg", + "/umR9aXTxOxQUuDH2DamoJ5fIPB.jpg", + "/mFb0ygcue4ITixDkdr7wm1Tdarx.jpg", + "/6UPlIYKxZqUR6Xbpgu1JKG0J7UC.jpg", + "/pMNSiNT55XrxWPmoI5ytJyinRa8.jpg", + "/gktL2rfE7d1xrwPSSTohxLOjLSs.jpg", + "/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg", + "/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg", + "/pbZtww8VsNDSwt9eMnG0faELwYV.jpg", + "/eCgIoGvfNXrbSiQGqQHccuHjQHm.jpg", + "/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg", + "/rKESeEePWWu4rATQDJOktllaDDv.jpg" ], - poster_path: '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', - id: '54da1dd28fc90956e08e8acf', - mdbids: [ + "poster_path": "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", + "id": "54da1dd28fc90956e08e8acf", + "mdbids": [ 76757, 227159, 177572, @@ -205,62 +205,62 @@ 157336, 156022 ], - created_at: '2015-02-10T15:03:46+0000', - order: 2, - poster_paths: [ - '/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg', - '/zRkLCOx7o9tjPYb9s7u6mpw8VOs.jpg', - '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', - '/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg', - '/vHX9fxgipKgp9UXJxYNzyhnypQl.jpg', - '/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg', - '/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg', - '/lTbbt8otsYLKRDvELMRn83wdNoW.jpg', - '/gdiLTof3rbPDAmPaCf4g6op46bj.jpg', - '/vgAHvS0bT3fpcpnJqT6uDTUsHTo.jpg', - '/sq2MmFv9sanl9PFMfbdaBLveSJ8.jpg', - '/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg', - '/Ekw3ijq9L6RiKvv5m2tPOEklHF.jpg', - '/8oPY6ULFOTbAEskySNhgsUIN4fW.jpg', - '/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg', - '/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg', - '/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg', - '/4Y9PMR6hO2YWu2BrNhix4lHRA58.jpg', - '/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg', - '/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg' + "created_at": "2015-02-10T15:03:46+0000", + "order": 2, + "poster_paths": [ + "/9D1A46Tkf44r6REj1mXZhHtUQXt.jpg", + "/zRkLCOx7o9tjPYb9s7u6mpw8VOs.jpg", + "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", + "/6yjQoECOKuXzQ14Bnf68WzTIotJ.jpg", + "/vHX9fxgipKgp9UXJxYNzyhnypQl.jpg", + "/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg", + "/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg", + "/lTbbt8otsYLKRDvELMRn83wdNoW.jpg", + "/gdiLTof3rbPDAmPaCf4g6op46bj.jpg", + "/vgAHvS0bT3fpcpnJqT6uDTUsHTo.jpg", + "/sq2MmFv9sanl9PFMfbdaBLveSJ8.jpg", + "/4oy4e0DP6LRwRszfx8NY8EYBj8V.jpg", + "/Ekw3ijq9L6RiKvv5m2tPOEklHF.jpg", + "/8oPY6ULFOTbAEskySNhgsUIN4fW.jpg", + "/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg", + "/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg", + "/s5qUhHvFAZZ7Q4r5Dn3GdsfaPKI.jpg", + "/4Y9PMR6hO2YWu2BrNhix4lHRA58.jpg", + "/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg", + "/2eQfjqlvPAxd9aLDs8DvsKLnfed.jpg" ] }, { - list_id: 'top_rated', - title: 'Top Rated', - backdrop_path: '/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg', - user_id: '53da46c1485fc30823004750', - updated_at: '2015-02-17T04:59:24+0000', - backdrop_paths: [ - '/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg', - '/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg', - '/cqn1ynw78Wan37jzs1Ckm7va97G.jpg', - '/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg', - '/sFQ10h9DnjOYIF4HjtLQuZ8pnb4.jpg', - '/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg', - '/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg', - '/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg', - '/hZWp4W5aQvGm1WiiGFYIuBUOQ3K.jpg', - '/61vLiK96sbXeHpQiMxI4CuqBA3z.jpg', - '/xBKGJQsAIeweesB79KC89FpBrVr.jpg', - '/iob9MPYquOckNbhhjFUazRDlgGG.jpg', - '/p4lpdTn3nW8nZBzyAU5kbb7PPBr.jpg', - '/ddlMODFJUjvhzrymuW7O7KPuhVL.jpg', - '/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg', - '/lH2Ga8OzjU1XlxJ73shOlPx6cRw.jpg', - '/b7BxW3C4cjVKOlKzFBoMUgyNt6A.jpg', - '/6xKCYgH16UuwEGAyroLU6p8HLIn.jpg', - '/wFkv7l6iz0fgXtmS24lTNyz8tV8.jpg', - '/xxAgWR8WVBoXDUIopqHNYFxyla6.jpg' + "list_id": "top_rated", + "title": "Top Rated", + "backdrop_path": "/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg", + "user_id": "53da46c1485fc30823004750", + "updated_at": "2015-02-17T04:59:24+0000", + "backdrop_paths": [ + "/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg", + "/8LraGVyVBrgzIfzxKV66oqOSGBU.jpg", + "/cqn1ynw78Wan37jzs1Ckm7va97G.jpg", + "/hctIo3ugW79kzV6F9d6A1sMIAyP.jpg", + "/sFQ10h9DnjOYIF4HjtLQuZ8pnb4.jpg", + "/uRHdkM871YJQDl3ux3ulCQw7BfV.jpg", + "/bHarw8xrmQeqf3t8HpuMY7zoK4x.jpg", + "/2BXd0t9JdVqCp9sKf6kzMkr7QjB.jpg", + "/hZWp4W5aQvGm1WiiGFYIuBUOQ3K.jpg", + "/61vLiK96sbXeHpQiMxI4CuqBA3z.jpg", + "/xBKGJQsAIeweesB79KC89FpBrVr.jpg", + "/iob9MPYquOckNbhhjFUazRDlgGG.jpg", + "/p4lpdTn3nW8nZBzyAU5kbb7PPBr.jpg", + "/ddlMODFJUjvhzrymuW7O7KPuhVL.jpg", + "/bt6DhdALyhf90gReozoQ0y3R3vZ.jpg", + "/lH2Ga8OzjU1XlxJ73shOlPx6cRw.jpg", + "/b7BxW3C4cjVKOlKzFBoMUgyNt6A.jpg", + "/6xKCYgH16UuwEGAyroLU6p8HLIn.jpg", + "/wFkv7l6iz0fgXtmS24lTNyz8tV8.jpg", + "/xxAgWR8WVBoXDUIopqHNYFxyla6.jpg" ], - poster_path: '/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg', - id: '54da1dd2b1e3a3099c2f4f0f', - mdbids: [ + "poster_path": "/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg", + "id": "54da1dd2b1e3a3099c2f4f0f", + "mdbids": [ 157336, 244786, 140420, @@ -282,29 +282,29 @@ 599, 24480 ], - created_at: '2015-02-10T15:03:46+0000', - order: 3, - poster_paths: [ - '/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg', - '/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg', - '/xBo8dd2zUbMvcypwScDN3mpN7IZ.jpg', - '/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg', - '/A2rxR8g3y6kcjIoR2fcwtq9eppc.jpg', - '/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg', - '/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg', - '/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg', - '/sc6XLX6J714LDkVV3Ys3clgypQS.jpg', - '/5hqbJSmtAimbaP3XcYshCixuUtk.jpg', - '/9O7gLzmreU0nGkIB6K3BsJbzvNv.jpg', - '/Ai1lpWFaBHH3szTSBz7eZT3iobi.jpg', - '/py4pMp6QlKUjjzCk8icZ2GrYw3Z.jpg', - '/wYkiNNMM1O5c2yEcj8Lf9UbaB1a.jpg', - '/gdiLTof3rbPDAmPaCf4g6op46bj.jpg', - '/wvlFtIwh0GIqHRAz9F5cCch2IJD.jpg', - '/sEUG3qjxwHjxkzuO7plrRHhOZUH.jpg', - '/d4KNaTrltq6bpkFS01pYtyXa09m.jpg', - '/oFwzvRgfxJc0FUr2mwYTi10dk3G.jpg', - '/5M5bg79OV96Vb4O0fDjX5clxASG.jpg' + "created_at": "2015-02-10T15:03:46+0000", + "order": 3, + "poster_paths": [ + "/m0UDkSPoVkmNfXFR9FN13yewy4B.jpg", + "/lIv1QinFqz4dlp5U4lQ6HaiskOZ.jpg", + "/xBo8dd2zUbMvcypwScDN3mpN7IZ.jpg", + "/noUp0XOqIcmgefRnRZa1nhtRvWO.jpg", + "/A2rxR8g3y6kcjIoR2fcwtq9eppc.jpg", + "/pXN5zQHdqmvpUZDPkLooGD6PnAW.jpg", + "/9gm3lL8JMTTmc3W4BmNMCuRLdL8.jpg", + "/3zQvuSAUdC3mrx9vnSEpkFX0968.jpg", + "/sc6XLX6J714LDkVV3Ys3clgypQS.jpg", + "/5hqbJSmtAimbaP3XcYshCixuUtk.jpg", + "/9O7gLzmreU0nGkIB6K3BsJbzvNv.jpg", + "/Ai1lpWFaBHH3szTSBz7eZT3iobi.jpg", + "/py4pMp6QlKUjjzCk8icZ2GrYw3Z.jpg", + "/wYkiNNMM1O5c2yEcj8Lf9UbaB1a.jpg", + "/gdiLTof3rbPDAmPaCf4g6op46bj.jpg", + "/wvlFtIwh0GIqHRAz9F5cCch2IJD.jpg", + "/sEUG3qjxwHjxkzuO7plrRHhOZUH.jpg", + "/d4KNaTrltq6bpkFS01pYtyXa09m.jpg", + "/oFwzvRgfxJc0FUr2mwYTi10dk3G.jpg", + "/5M5bg79OV96Vb4O0fDjX5clxASG.jpg" ] } -]; +] \ No newline at end of file diff --git a/app/lib/youtube.js b/app/lib/youtube.js index 0893547..77d78db 100644 --- a/app/lib/youtube.js +++ b/app/lib/youtube.js @@ -117,10 +117,7 @@ function playVideo(url) { videoPlayer = Ti.Media.createVideoPlayer({ backgroundColor: '#000', url: url, - fullscreen: true, - autoplay: true, - scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FIT, - mediaControlMode: Ti.Media.VIDEO_CONTROL_DEFAULT + autoplay: true }); videoPlayer.addEventListener('complete', function () { Ti.API.info('video player complete'); @@ -146,9 +143,6 @@ exports.close = function () { Ti.API.info('closing video player'); if (OS_IOS) { - if (videoPlayer) { - videoPlayer.fullscreen = false; - } win && win.close(); win = null; } else if (OS_WINDOWS) {