1
- /*! algoliasearch 3.24.1 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */
1
+ /*! algoliasearch 3.24.2 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */
2
2
( function ( f ) { var g ; if ( typeof window !== 'undefined' ) { g = window } else if ( typeof self !== 'undefined' ) { g = self } g . ALGOLIA_MIGRATION_LAYER = f ( ) } ) ( 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 ) {
3
3
4
4
module . exports = function load ( src , opts , cb ) {
@@ -4050,7 +4050,7 @@ inherits(Index, IndexCore);
4050
4050
* error: null or Error('message')
4051
4051
* content: the server answer that contains 3 elements: createAt, taskId and objectID
4052
4052
*/
4053
- Index . prototype . addObject = function ( content , objectID , callback ) {
4053
+ Index . prototype . addObject = deprecate ( function ( content , objectID , callback ) {
4054
4054
var indexObj = this ;
4055
4055
4056
4056
if ( arguments . length === 1 || typeof objectID === 'function' ) {
@@ -4068,7 +4068,7 @@ Index.prototype.addObject = function(content, objectID, callback) {
4068
4068
hostType : 'write' ,
4069
4069
callback : callback
4070
4070
} ) ;
4071
- } ;
4071
+ } , deprecatedMessage ( 'index.addObject(obj)' , 'index.addObjects([obj])' ) ) ;
4072
4072
4073
4073
/*
4074
4074
* Add several objects
@@ -4116,7 +4116,7 @@ Index.prototype.addObjects = function(objects, callback) {
4116
4116
* error: null or Error('message')
4117
4117
* content: the server answer that contains 3 elements: createAt, taskId and objectID
4118
4118
*/
4119
- Index . prototype . partialUpdateObject = function ( partialObject , createIfNotExists , callback ) {
4119
+ Index . prototype . partialUpdateObject = deprecate ( function ( partialObject , createIfNotExists , callback ) {
4120
4120
if ( arguments . length === 1 || typeof createIfNotExists === 'function' ) {
4121
4121
callback = createIfNotExists ;
4122
4122
createIfNotExists = undefined ;
@@ -4135,7 +4135,7 @@ Index.prototype.partialUpdateObject = function(partialObject, createIfNotExists,
4135
4135
hostType : 'write' ,
4136
4136
callback : callback
4137
4137
} ) ;
4138
- } ;
4138
+ } , deprecatedMessage ( 'index.partialUpdateObject(obj)' , 'partialUpdateObjects([obj])' ) ) ;
4139
4139
4140
4140
/*
4141
4141
* Partially Override the content of several objects
@@ -4187,7 +4187,7 @@ Index.prototype.partialUpdateObjects = function(objects, createIfNotExists, call
4187
4187
* error: null or Error('message')
4188
4188
* content: the server answer that updateAt and taskID
4189
4189
*/
4190
- Index . prototype . saveObject = function ( object , callback ) {
4190
+ Index . prototype . saveObject = deprecate ( function ( object , callback ) {
4191
4191
var indexObj = this ;
4192
4192
return this . as . _jsonRequest ( {
4193
4193
method : 'PUT' ,
@@ -4196,7 +4196,7 @@ Index.prototype.saveObject = function(object, callback) {
4196
4196
hostType : 'write' ,
4197
4197
callback : callback
4198
4198
} ) ;
4199
- } ;
4199
+ } , deprecatedMessage ( 'index.saveObject(obj)' , 'index.saveObjects([obj])' ) ) ;
4200
4200
4201
4201
/*
4202
4202
* Override the content of several objects
@@ -4243,7 +4243,7 @@ Index.prototype.saveObjects = function(objects, callback) {
4243
4243
* error: null or Error('message')
4244
4244
* content: the server answer that contains 3 elements: createAt, taskId and objectID
4245
4245
*/
4246
- Index . prototype . deleteObject = function ( objectID , callback ) {
4246
+ Index . prototype . deleteObject = deprecate ( function ( objectID , callback ) {
4247
4247
if ( typeof objectID === 'function' || typeof objectID !== 'string' && typeof objectID !== 'number' ) {
4248
4248
var err = new errors . AlgoliaSearchError ( 'Cannot delete an object without an objectID' ) ;
4249
4249
callback = objectID ;
@@ -4261,7 +4261,7 @@ Index.prototype.deleteObject = function(objectID, callback) {
4261
4261
hostType : 'write' ,
4262
4262
callback : callback
4263
4263
} ) ;
4264
- } ;
4264
+ } , deprecatedMessage ( 'index.deleteObject(objectID)' , 'index.deleteObjects([objectID])' ) ) ;
4265
4265
4266
4266
/*
4267
4267
* Delete several objects from an index
@@ -4493,7 +4493,7 @@ Index.prototype.browseAll = function(query, queryParameters) {
4493
4493
* Get a Typeahead.js adapter
4494
4494
* @param searchParams contains an object with query parameters (see search for details)
4495
4495
*/
4496
- Index . prototype . ttAdapter = function ( params ) {
4496
+ Index . prototype . ttAdapter = deprecate ( function ( params ) {
4497
4497
var self = this ;
4498
4498
return function ttAdapter ( query , syncCb , asyncCb ) {
4499
4499
var cb ;
@@ -4515,7 +4515,9 @@ Index.prototype.ttAdapter = function(params) {
4515
4515
cb ( content . hits ) ;
4516
4516
} ) ;
4517
4517
} ;
4518
- } ;
4518
+ } ,
4519
+ 'ttAdapter is not necessary anymore and will be removed in the next version,\n' +
4520
+ 'have a look at autocomplete.js (https://github.com/algolia/autocomplete.js)' ) ;
4519
4521
4520
4522
/*
4521
4523
* Wait the publication of a task on the server.
@@ -5512,7 +5514,7 @@ IndexCore.prototype._search = function(params, url, callback, additionalUA) {
5512
5514
* error: null or Error('message')
5513
5515
* content: the object to retrieve or the error message if a failure occured
5514
5516
*/
5515
- IndexCore . prototype . getObject = function ( objectID , attrs , callback ) {
5517
+ IndexCore . prototype . getObject = deprecate ( function ( objectID , attrs , callback ) {
5516
5518
var indexObj = this ;
5517
5519
5518
5520
if ( arguments . length === 1 || typeof attrs === 'function' ) {
@@ -5537,7 +5539,7 @@ IndexCore.prototype.getObject = function(objectID, attrs, callback) {
5537
5539
hostType : 'read' ,
5538
5540
callback : callback
5539
5541
} ) ;
5540
- } ;
5542
+ } , deprecatedMessage ( 'index.getObject(objectID)' , 'index.getObjects([objectID])' ) ) ;
5541
5543
5542
5544
/*
5543
5545
* Get several objects from this index
@@ -6283,8 +6285,7 @@ module.exports = function deprecate(fn, message) {
6283
6285
} , { } ] , 28 :[ function ( require , module , exports ) {
6284
6286
module . exports = function deprecatedMessage ( previousUsage , newUsage ) {
6285
6287
var githubAnchorLink = previousUsage . toLowerCase ( )
6286
- . replace ( '.' , '' )
6287
- . replace ( '()' , '' ) ;
6288
+ . replace ( / [ \. \( \) ] / g, '' ) ;
6288
6289
6289
6290
return 'algoliasearch: `' + previousUsage + '` was replaced by `' + newUsage +
6290
6291
'`. Please see https://github.com/algolia/algoliasearch-client-javascript/wiki/Deprecated#' + githubAnchorLink ;
@@ -6559,6 +6560,6 @@ function cleanup() {
6559
6560
} , { "1" :1 } ] , 36 :[ function ( require , module , exports ) {
6560
6561
'use strict' ;
6561
6562
6562
- module . exports = '3.24.1 ' ;
6563
+ module . exports = '3.24.2 ' ;
6563
6564
6564
6565
} , { } ] } , { } , [ 19 ] ) ;
0 commit comments