mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
24 lines
803 B
JavaScript
24 lines
803 B
JavaScript
|
|
/**
|
||
|
|
******************************************************************************
|
||
|
|
* Xenia : Xbox 360 Emulator Research Project *
|
||
|
|
******************************************************************************
|
||
|
|
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||
|
|
* Released under the BSD license - see LICENSE in the root for more details. *
|
||
|
|
******************************************************************************
|
||
|
|
*/
|
||
|
|
|
||
|
|
'use strict';
|
||
|
|
|
||
|
|
var module = angular.module('xe.filters', []);
|
||
|
|
|
||
|
|
|
||
|
|
module.filter("hex32", function() {
|
||
|
|
return function(number) {
|
||
|
|
if (number !== null && number !== undefined) {
|
||
|
|
var str = "" + number.toString(16).toUpperCase();
|
||
|
|
while (str.length < 8) str = "0" + str;
|
||
|
|
return str;
|
||
|
|
}
|
||
|
|
};
|
||
|
|
});
|