mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
43 lines
538 B
TypeScript
43 lines
538 B
TypeScript
/// <reference path="wnumb.d.ts" />
|
|
|
|
|
|
var moneyFormat = wNumb({
|
|
mark: '.',
|
|
thousand: ',',
|
|
prefix: '$ ',
|
|
postfix: ' p.p.'
|
|
});
|
|
|
|
moneyFormat.to( 301980.62 );
|
|
|
|
moneyFormat.from( '$ 301,980.62 p.p.' );
|
|
|
|
var Format = wNumb({
|
|
prefix: '$ ',
|
|
decimals: 3,
|
|
thousand: ','
|
|
});
|
|
|
|
Format = wNumb({
|
|
thousand: '.',
|
|
encoder: function( a ){
|
|
return a * 1E7;
|
|
},
|
|
decoder: function( a ){
|
|
return a / 1E7;
|
|
}
|
|
});
|
|
|
|
Format = wNumb({
|
|
prefix: '$',
|
|
postfix: ',-',
|
|
thousand: ','
|
|
});
|
|
|
|
|
|
Format = wNumb({
|
|
prefix: '$',
|
|
negativeBefore: '[NEGATIVE] '
|
|
});
|
|
|