@@ -10,8 +10,8 @@ var currencies = require('../data/currencies');
10
10
*
11
11
* If the parameter is a number, the number is treated the relative
12
12
*/
13
- module . filter ( 'rpamount' , function ( ) {
14
- return function ( input , options ) {
13
+ module . filter ( 'rpamount' , function rpamountFilter ( ) {
14
+ return function rpamount ( input , options ) {
15
15
var currency ;
16
16
var opts = jQuery . extend ( true , { } , options ) ;
17
17
@@ -152,8 +152,8 @@ module.filter('rpamount', function() {
152
152
* If the input is neither an Amount or Currency object it will be passed to
153
153
* Amount#from_json to try to interpret it.
154
154
*/
155
- module . filter ( 'rpcurrency' , function ( ) {
156
- return function ( input ) {
155
+ module . filter ( 'rpcurrency' , function rpcurrencyFilter ( ) {
156
+ return function rpcurrency ( input ) {
157
157
if ( ! input ) return "" ;
158
158
159
159
var currency ;
@@ -171,8 +171,8 @@ module.filter('rpcurrency', function() {
171
171
/**
172
172
* Get the currency issuer.
173
173
*/
174
- module . filter ( 'rpissuer' , function ( ) {
175
- return function ( input ) {
174
+ module . filter ( 'rpissuer' , function rpissuerFilter ( ) {
175
+ return function rpissuer ( input ) {
176
176
if ( ! input ) return "" ;
177
177
178
178
var amount = Amount . from_json ( input ) ;
@@ -185,8 +185,8 @@ module.filter('rpissuer', function() {
185
185
/**
186
186
* Get the full currency name from an Amount.
187
187
*/
188
- module . filter ( 'rpcurrencyfull' , [ '$rootScope' , function ( $scope ) {
189
- return function ( input ) {
188
+ module . filter ( 'rpcurrencyfull' , [ '$rootScope' , function rpcurrencyfullFilter ( $scope ) {
189
+ return function rpcurrencyfull ( input ) {
190
190
if ( ! input ) return "" ;
191
191
192
192
var amount = Amount . from_json ( input ) ;
@@ -203,8 +203,8 @@ module.filter('rpcurrencyfull', ['$rootScope', function ($scope) {
203
203
/**
204
204
* Calculate a ratio of two Amounts.
205
205
*/
206
- module . filter ( 'rpamountratio' , function ( ) {
207
- return function ( numerator , denominator ) {
206
+ module . filter ( 'rpamountratio' , function rpamountratioFilter ( ) {
207
+ return function rpamountratio ( numerator , denominator ) {
208
208
try {
209
209
return Amount . from_json ( numerator ) . ratio_human ( denominator , { reference_date : new Date ( ) } ) ;
210
210
} catch ( err ) {
@@ -216,8 +216,8 @@ module.filter('rpamountratio', function() {
216
216
/**
217
217
* Calculate the sum of two Amounts.
218
218
*/
219
- module . filter ( 'rpamountadd' , function ( ) {
220
- return function ( a , b ) {
219
+ module . filter ( 'rpamountadd' , function rpamountaddFilter ( ) {
220
+ return function rpamountadd ( a , b ) {
221
221
try {
222
222
b = Amount . from_json ( b ) ;
223
223
if ( b . is_zero ( ) ) return a ;
@@ -230,8 +230,8 @@ module.filter('rpamountadd', function() {
230
230
/**
231
231
* Calculate the difference of two Amounts.
232
232
*/
233
- module . filter ( 'rpamountsubtract' , function ( ) {
234
- return function ( a , b ) {
233
+ module . filter ( 'rpamountsubtract' , function rpamountsubtractFilter ( ) {
234
+ return function rpamountsubtract ( a , b ) {
235
235
try {
236
236
return Amount . from_json ( a ) . subtract ( b ) ;
237
237
} catch ( err ) {
@@ -247,8 +247,8 @@ module.filter('rpamountsubtract', function() {
247
247
*/
248
248
var momentCache = { } ;
249
249
250
- module . filter ( 'rpfromnow' , function ( ) {
251
- return function ( input ) {
250
+ module . filter ( 'rpfromnow' , function rpfromnowFilter ( ) {
251
+ return function rpfromnow ( input ) {
252
252
// This is an expensive function, cache it
253
253
if ( ! momentCache [ input ] ) momentCache [ input ] = moment ( input ) . fromNow ( ) ;
254
254
@@ -261,8 +261,8 @@ module.filter('rpfromnow', function() {
261
261
*
262
262
* Shows a ripple name for a given ripple address
263
263
*/
264
- module . filter ( "rpripplename" , [ 'rpId' , function ( id ) {
265
- return function ( address , options ) {
264
+ module . filter ( "rpripplename" , [ 'rpId' , function rpripplenameFilter ( id ) {
265
+ return function rpripplename ( address , options ) {
266
266
var ripplename = id . resolveNameSync ( address , options ) ;
267
267
if ( ripplename !== address ) {
268
268
return ripplename ;
@@ -274,8 +274,8 @@ module.filter("rpripplename", ['rpId', function(id) {
274
274
}
275
275
} ] ) ;
276
276
277
- module . filter ( "rpripplenamefull" , [ 'rpId' , function ( id ) {
278
- return function ( address , options ) {
277
+ module . filter ( "rpripplenamefull" , [ 'rpId' , function rpripplenamefullFilter ( id ) {
278
+ return function rpripplenamefull ( address , options ) {
279
279
var ripplename = id . resolveNameSync ( address , options ) ;
280
280
if ( ripplename !== address ) {
281
281
return ripplename ;
@@ -287,8 +287,8 @@ module.filter("rpripplenamefull", ['rpId', function(id) {
287
287
/**
288
288
* Show contact name or address
289
289
*/
290
- module . filter ( 'rpcontactname' , [ '$rootScope' , function ( $scope ) {
291
- return function ( address ) {
290
+ module . filter ( 'rpcontactname' , [ '$rootScope' , function rpcontactnameFilter ( $scope ) {
291
+ return function rpcontactname ( address ) {
292
292
address = address ? "" + address : "" ;
293
293
294
294
var contact = webutil . getContact ( $scope . userBlob . data . contacts , address ) ;
@@ -301,8 +301,8 @@ module.filter('rpcontactname', ['$rootScope', function ($scope) {
301
301
} ;
302
302
} ] ) ;
303
303
304
- module . filter ( 'rpcontactnamefull' , [ '$rootScope' , function ( $scope ) {
305
- return function ( address ) {
304
+ module . filter ( 'rpcontactnamefull' , [ '$rootScope' , function rpcontactnamefullFilter ( $scope ) {
305
+ return function rpcontactnamefull ( address ) {
306
306
address = address ? "" + address : "" ;
307
307
var contact = webutil . getContact ( $scope . userBlob . data . contacts , address ) ;
308
308
@@ -314,8 +314,8 @@ module.filter('rpcontactnamefull', ['$rootScope', function ($scope) {
314
314
} ;
315
315
} ] ) ;
316
316
317
- module . filter ( 'rponlycontactname' , [ '$rootScope' , function ( $scope ) {
318
- return function ( address ) {
317
+ module . filter ( 'rponlycontactname' , [ '$rootScope' , function rponlycontactnameFilter ( $scope ) {
318
+ return function rponlycontactname ( address ) {
319
319
address = address ? "" + address : "" ;
320
320
321
321
var contact = webutil . getContact ( $scope . userBlob . data . contacts , address ) ;
@@ -331,8 +331,8 @@ module.filter('rponlycontactname', ['$rootScope', function ($scope) {
331
331
*
332
332
* The number of the bullets will correspond to the length of the string.
333
333
*/
334
- module . filter ( 'rpmask' , function ( ) {
335
- return function ( pass ) {
334
+ module . filter ( 'rpmask' , function rpmaskFilter ( ) {
335
+ return function rpmask ( pass ) {
336
336
pass = "" + pass ;
337
337
return Array ( pass . length + 1 ) . join ( "•" ) ;
338
338
} ;
@@ -343,8 +343,8 @@ module.filter('rpmask', function() {
343
343
*
344
344
* The number of the bullets will correspond to the length of the string.
345
345
*/
346
- module . filter ( 'rptruncate' , function ( ) {
347
- return function ( str , len ) {
346
+ module . filter ( 'rptruncate' , function rptruncateFilter ( ) {
347
+ return function rptruncate ( str , len ) {
348
348
return str ? str . slice ( 0 , len ) : '' ;
349
349
} ;
350
350
} ) ;
@@ -355,7 +355,7 @@ module.filter('rptruncate', function() {
355
355
* Based on code by aioobe @ StackOverflow.
356
356
* @see http://stackoverflow.com/questions/3758606
357
357
*/
358
- module . filter ( 'rpfilesize' , function ( ) {
358
+ module . filter ( 'rpfilesize' , function rpfilesizeFilter ( ) {
359
359
function number_format ( number , decimals , dec_point , thousands_sep ) {
360
360
// http://kevin.vanzonneveld.net
361
361
// + original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
@@ -387,7 +387,7 @@ module.filter('rpfilesize', function() {
387
387
//var prefixes = "KMGTPE";
388
388
//var common = "iB";
389
389
390
- return function ( str ) {
390
+ return function rpfilesize ( str ) {
391
391
var bytes = + str ;
392
392
if ( bytes < unit ) return bytes + " B" ;
393
393
var exp = Math . floor ( Math . log ( bytes ) / Math . log ( unit ) ) ;
@@ -399,8 +399,8 @@ module.filter('rpfilesize', function() {
399
399
/**
400
400
* Uppercase the first letter.
401
401
*/
402
- module . filter ( 'rpucfirst' , function ( ) {
403
- return function ( str ) {
402
+ module . filter ( 'rpucfirst' , function rpucfirstFilter ( ) {
403
+ return function rpucfirst ( str ) {
404
404
str = "" + str ;
405
405
return str . charAt ( 0 ) . toUpperCase ( ) + str . slice ( 1 ) ;
406
406
} ;
@@ -413,8 +413,8 @@ module.filter('rpucfirst', function() {
413
413
* Example1 : ng-repeat="n in [20] | rprange"
414
414
* Example2 : ng-repeat="n in [10, 35] | rprange"
415
415
*/
416
- module . filter ( 'rprange' , function ( ) {
417
- return function ( input ) {
416
+ module . filter ( 'rprange' , function rprangeFilter ( ) {
417
+ return function rprange ( input ) {
418
418
var lowBound , highBound ;
419
419
switch ( input . length ) {
420
420
case 1 :
@@ -435,15 +435,15 @@ module.filter('rprange', function() {
435
435
} ;
436
436
} ) ;
437
437
438
- module . filter ( 'rpaddressorigin' , function ( ) {
439
- return function ( recipient ) {
438
+ module . filter ( 'rpaddressorigin' , function rpaddressoriginFilter ( ) {
439
+ return function rpaddressorigin ( recipient ) {
440
440
if ( ~ recipient . indexOf ( '@' ) ) return 'federation' ;
441
441
return ! isNaN ( Base . decode_check ( [ 0 , 5 ] , recipient , 'bitcoin' ) ) ? 'bitcoin' : 'ripple' ;
442
442
} ;
443
443
} ) ;
444
444
445
- module . filter ( 'rpheavynormalize' , function ( ) {
446
- return function ( value , maxLength ) {
445
+ module . filter ( 'rpheavynormalize' , function rpheavynormalizeFilter ( ) {
446
+ return function rpheavynormalize ( value , maxLength ) {
447
447
return String ( value )
448
448
// Remove non-printable and non-ASCII characters
449
449
. replace ( / [ ^ - ~ ] / g, '' )
@@ -461,8 +461,8 @@ module.filter('rpheavynormalize', function() {
461
461
/**
462
462
* Used to filter My Orders on trade tab.
463
463
*/
464
- module . filter ( 'rpcurrentpair' , function ( ) {
465
- return function ( items , doFilter , currentKey ) {
464
+ module . filter ( 'rpcurrentpair' , function rpcurrentpairFilter ( ) {
465
+ return function rpcurrentpair ( items , doFilter , currentKey ) {
466
466
if ( ! doFilter ) {
467
467
return items ;
468
468
}
@@ -489,8 +489,8 @@ module.filter('rpcurrentpair', function() {
489
489
* Return object properties.
490
490
* Used in trade tab to make My Orders list sortable.
491
491
*/
492
- module . filter ( 'rpvalues' , function ( ) {
493
- return function ( items_object ) {
492
+ module . filter ( 'rpvalues' , function rpvaluesFilter ( ) {
493
+ return function rpvalues ( items_object ) {
494
494
var values = _ . values ( items_object ) ;
495
495
return _ . values ( items_object ) ;
496
496
}
@@ -499,8 +499,8 @@ module.filter('rpvalues', function() {
499
499
/**
500
500
* My Orders widget sorting filter.
501
501
*/
502
- module . filter ( 'rpsortmyorders' , function ( ) {
503
- return function ( items_object , field , reverse ) {
502
+ module . filter ( 'rpsortmyorders' , function rpsortmyordersFilter ( ) {
503
+ return function rpsortmyorders ( items_object , field , reverse ) {
504
504
var arrayCopy = items_object . slice ( 0 ) ;
505
505
arrayCopy . sort ( function ( a , b ) {
506
506
var res = 0 ;
@@ -542,8 +542,8 @@ module.filter('rpsortmyorders', function() {
542
542
/**
543
543
* Contacts sorting filter
544
544
*/
545
- module . filter ( 'rpsortcontacts' , function ( ) {
546
- return function ( items_object , field , reverse ) {
545
+ module . filter ( 'rpsortcontacts' , function rpsortcontactsFilter ( ) {
546
+ return function rpsortcontacts ( items_object , field , reverse ) {
547
547
var arrayCopy = items_object . slice ( 0 ) ;
548
548
arrayCopy . sort ( function ( a , b ) {
549
549
var res = 0 ;
@@ -565,8 +565,8 @@ module.filter('rpsortcontacts', function() {
565
565
}
566
566
} ) ;
567
567
568
- module . filter ( 'rprange' , function ( ) {
569
- return function ( input , total ) {
568
+ module . filter ( 'rprange' , function rprangeFilter ( ) {
569
+ return function rprange ( input , total ) {
570
570
total = parseInt ( total , 10 ) ;
571
571
for ( var i = 1 ; i <= total ; i ++ )
572
572
input . push ( i ) ;
0 commit comments