File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2475,7 +2475,7 @@ ErrorBuilder.prototype.read = function(name) {
24752475 if ( ! self . isPrepared )
24762476 self . prepare ( ) ;
24772477
2478- var error = self . items . find ( 'name' , name ) ;
2478+ var error = self . items . findItem ( 'name' , name ) ;
24792479 if ( error )
24802480 return error . error ;
24812481
Original file line number Diff line number Diff line change 1010- added: `/startup/` all scripts this directory are executed only one (then are renamed)
1111- added: `F.route()` supports a new flag: `cors` (creates a cors route) and `credentials` (enables cookies for cors)
1212- added: `ErrorBuilder.plain()` returns all errors as simple string
13+ - added: `Array.findItem()` alias to `Array.find()`
1314
1415- updated: `F.route(url, ...)` - `url`can be String Array with multiple relative paths by @Harry-Stot
1516- updated: `F.file()` supports flags instead of middleware and flags supports extensions `['.jpg', '.png']`
Original file line number Diff line number Diff line change @@ -229,10 +229,10 @@ function prototypeArray() {
229229
230230 assert . ok ( obj [ '3' ] . value === 30 , 'array.toObject(with name)' ) ;
231231
232- assert . ok ( arr . find ( function ( o ) { return o . name === '4' ; } ) . value === 40 , 'array.find()' ) ;
233- assert . ok ( arr . find ( function ( o ) { return o . name === '6' ; } ) === null , 'array.find(): null' ) ;
234- assert . ok ( arr . find ( 'name' , '4' ) . value === 40 , 'array.find(inline)' ) ;
235- assert . ok ( arr . find ( 'name' , '6' ) === null , 'array.find(inline): null' ) ;
232+ assert . ok ( arr . findItem ( function ( o ) { return o . name === '4' ; } ) . value === 40 , 'array.find()' ) ;
233+ assert . ok ( arr . findItem ( function ( o ) { return o . name === '6' ; } ) === null , 'array.find(): null' ) ;
234+ assert . ok ( arr . findItem ( 'name' , '4' ) . value === 40 , 'array.find(inline)' ) ;
235+ assert . ok ( arr . findItem ( 'name' , '6' ) === null , 'array.find(inline): null' ) ;
236236
237237 arr = arr . remove ( function ( o ) {
238238 return o . value > 30 ;
Original file line number Diff line number Diff line change @@ -4129,7 +4129,7 @@ Array.prototype.where = function(cb, value) {
41294129 * @param {Object } value Optional.
41304130 * @return {Array }
41314131 */
4132- Array . prototype . find = function ( cb , value ) {
4132+ Array . prototype . findItem = Array . prototype . find = function ( cb , value ) {
41334133 var self = this ;
41344134 var index = self . findIndex ( cb , value ) ;
41354135 if ( index === - 1 )
You can’t perform that action at this time.
0 commit comments