@@ -47,8 +47,6 @@ const filterMixins = {};
4747 * @returns The request instance (for chaining)
4848 */
4949filterMixins . filter = function ( props , value ) {
50- /* jshint validthis:true */
51-
5250 if ( ! props || typeof props === 'string' && value === undefined ) {
5351 // We have no filter to set, or no value to set for that filter
5452 return this ;
@@ -74,14 +72,15 @@ filterMixins.filter = function( props, value ) {
7472 * @returns The request instance (for chaining)
7573 */
7674filterMixins . taxonomy = function ( taxonomy , term ) {
77- /* jshint validthis:true */
7875 const termIsArray = Array . isArray ( term ) ;
76+
7977 const termIsNumber = termIsArray ?
8078 term . reduce (
8179 ( allAreNumbers , term ) => allAreNumbers && typeof term === 'number' ,
8280 true
8381 ) :
8482 typeof term === 'number' ;
83+
8584 const termIsString = termIsArray ?
8685 term . reduce (
8786 ( allAreStrings , term ) => allAreStrings && typeof term === 'string' ,
@@ -133,7 +132,6 @@ filterMixins.taxonomy = function( taxonomy, term ) {
133132 * @returns The request instance (for chaining)
134133 */
135134filterMixins . year = function ( year ) {
136- /* jshint validthis:true */
137135 return filterMixins . filter . call ( this , 'year' , year ) ;
138136} ;
139137
@@ -147,7 +145,6 @@ filterMixins.year = function( year ) {
147145 * @returns The request instance (for chaining)
148146 */
149147filterMixins . month = function ( month ) {
150- /* jshint validthis:true */
151148 let monthDate ;
152149 if ( typeof month === 'string' ) {
153150 // Append a arbitrary day and year to the month to parse the string into a Date
@@ -179,7 +176,6 @@ filterMixins.month = function( month ) {
179176 * @returns The request instance (for chaining)
180177 */
181178filterMixins . day = function ( day ) {
182- /* jshint validthis:true */
183179 return filterMixins . filter . call ( this , 'day' , day ) ;
184180} ;
185181
@@ -192,7 +188,6 @@ filterMixins.day = function( day ) {
192188 * @returns The request instance (for chaining)
193189 */
194190filterMixins . path = function ( path ) {
195- /* jshint validthis:true */
196191 return filterMixins . filter . call ( this , 'pagename' , path ) ;
197192} ;
198193
0 commit comments