New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-typeahead

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-typeahead - npm Package Compare versions

Comparing version

to
1.1.4

25

dist/react-typeahead.js
!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.ReactTypeahead=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);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/*!
Copyright (c) 2015 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
function classNames() {

@@ -28,3 +34,3 @@ var classes = '';

// safely export classNames in case the script is included directly on a page
// safely export classNames for node / browserify
if (typeof module !== 'undefined' && module.exports) {

@@ -34,2 +40,9 @@ module.exports = classNames;

// safely export classNames for RequireJS
if (typeof define !== 'undefined' && define.amd) {
define('classnames', [], function() {
return classNames;
});
}
},{}],2:[function(require,module,exports){

@@ -488,2 +501,3 @@ /*

var IDENTITY_FN = function(input) { return input; };
var SHOULD_SEARCH_VALUE = function(input) { return input && input.trim().length > 0; };
var _generateAccessor = function(field) {

@@ -575,2 +589,3 @@ return function(object) { return object[field]; };

getOptionsForValue: function(value, options) {
if (!SHOULD_SEARCH_VALUE(value)) { return []; }
var filterOptions = this._generateFilterFunction();

@@ -745,4 +760,5 @@ var result = filterOptions(value, options);

// If there are no visible elements, don't perform selector navigation.
// Just pass this up to the upstream onKeydown handler
if (!this._hasHint()) {
// Just pass this up to the upstream onKeydown handler.
// Also skip if the user is pressing the shift key, since none of our handlers are looking for shift
if (!this._hasHint() || event.shiftKey) {
return this.props.onKeyDown(event);

@@ -829,5 +845,4 @@ }

return function(value, options) {
var transformedOptions = options.map(mapper);
return fuzzy
.filter(value, transformedOptions)
.filter(value, options, {extract: mapper})
.map(function(res) { return options[res.index]; });

@@ -834,0 +849,0 @@ };

@@ -12,2 +12,3 @@ /**

var IDENTITY_FN = function(input) { return input; };
var SHOULD_SEARCH_VALUE = function(input) { return input && input.trim().length > 0; };
var _generateAccessor = function(field) {

@@ -99,2 +100,3 @@ return function(object) { return object[field]; };

getOptionsForValue: function(value, options) {
if (!SHOULD_SEARCH_VALUE(value)) { return []; }
var filterOptions = this._generateFilterFunction();

@@ -269,4 +271,5 @@ var result = filterOptions(value, options);

// If there are no visible elements, don't perform selector navigation.
// Just pass this up to the upstream onKeydown handler
if (!this._hasHint()) {
// Just pass this up to the upstream onKeydown handler.
// Also skip if the user is pressing the shift key, since none of our handlers are looking for shift
if (!this._hasHint() || event.shiftKey) {
return this.props.onKeyDown(event);

@@ -353,5 +356,4 @@ }

return function(value, options) {
var transformedOptions = options.map(mapper);
return fuzzy
.filter(value, transformedOptions)
.filter(value, options, {extract: mapper})
.map(function(res) { return options[res.index]; });

@@ -358,0 +360,0 @@ };

2

package.json
{
"name": "react-typeahead",
"version": "1.1.3",
"version": "1.1.4",
"description": "React-based typeahead and typeahead-tokenizer",

@@ -5,0 +5,0 @@ "keywords": [

@@ -191,3 +191,3 @@ # react-typeahead

- This is the Typeahead's `props.options` filtered and limited to `Typeahead.props.maxVisible`.
- `props.selectedIndex`
- `props.selectionIndex`
- The index of the highlighted option for rendering

@@ -194,0 +194,0 @@

@@ -12,2 +12,3 @@ /**

var IDENTITY_FN = function(input) { return input; };
var SHOULD_SEARCH_VALUE = function(input) { return input && input.trim().length > 0; };
var _generateAccessor = function(field) {

@@ -99,2 +100,3 @@ return function(object) { return object[field]; };

getOptionsForValue: function(value, options) {
if (!SHOULD_SEARCH_VALUE(value)) { return []; }
var filterOptions = this._generateFilterFunction();

@@ -269,4 +271,5 @@ var result = filterOptions(value, options);

// If there are no visible elements, don't perform selector navigation.
// Just pass this up to the upstream onKeydown handler
if (!this._hasHint()) {
// Just pass this up to the upstream onKeydown handler.
// Also skip if the user is pressing the shift key, since none of our handlers are looking for shift
if (!this._hasHint() || event.shiftKey) {
return this.props.onKeyDown(event);

@@ -353,5 +356,4 @@ }

return function(value, options) {
var transformedOptions = options.map(mapper);
return fuzzy
.filter(value, transformedOptions)
.filter(value, options, {extract: mapper})
.map(function(res) { return options[res.index]; });

@@ -358,0 +360,0 @@ };