@types/numeral
Advanced tools
Comparing version 0.0.27 to 0.0.28
@@ -6,3 +6,3 @@ // Type definitions for Numeral.js | ||
// Kenneth Luján <https://github.com/klujanrosas> | ||
// Carlos Quiroga <https://github.com/KarlosQ> | ||
// Carlos Quiroga <https://github.com/KarlosQ> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -13,28 +13,28 @@ | ||
interface NumeralJSLocale { | ||
delimiters: { | ||
thousands: string; | ||
decimal: string; | ||
}; | ||
abbreviations: { | ||
thousand: string; | ||
million: string; | ||
billion: string; | ||
trillion: string; | ||
}; | ||
ordinal(num: number): string; | ||
currency: { | ||
symbol: string; | ||
}; | ||
delimiters: { | ||
thousands: string; | ||
decimal: string; | ||
}; | ||
abbreviations: { | ||
thousand: string; | ||
million: string; | ||
billion: string; | ||
trillion: string; | ||
}; | ||
ordinal(num: number): string; | ||
currency: { | ||
symbol: string; | ||
}; | ||
} | ||
interface NumeralJSLocales { | ||
[id: string]: NumeralJSLocale | ||
[id: string]: NumeralJSLocale | ||
} | ||
interface NumeralJSOptions { | ||
currentLocale: string; | ||
zeroFormat: string; | ||
nullFormat: string; | ||
defaultFormat: string; | ||
scalePercentBy100: boolean; | ||
currentLocale: string; | ||
zeroFormat: string; | ||
nullFormat: string; | ||
defaultFormat: string; | ||
scalePercentBy100: boolean; | ||
} | ||
@@ -46,8 +46,8 @@ | ||
interface NumeralJsFormat { | ||
regexps: { | ||
format: RegExp, | ||
unformat: RegExp, | ||
}, | ||
format: (value: any, format: string, roundingFunction: RoundingFunction) => string, | ||
unformat: (value: string) => number | ||
regexps: { | ||
format: RegExp, | ||
unformat: RegExp, | ||
}, | ||
format: (value: any, format: string, roundingFunction: RoundingFunction) => string, | ||
unformat: (value: string) => number | ||
} | ||
@@ -59,56 +59,56 @@ | ||
interface Numeral { | ||
(value?: any): Numeral; | ||
version: string; | ||
isNumeral: boolean; | ||
options: NumeralJSOptions; | ||
(value?: any): Numeral; | ||
version: string; | ||
isNumeral: boolean; | ||
options: NumeralJSOptions; | ||
/** | ||
* This function sets the current locale. If no arguments are passed in, | ||
* it will simply return the current global locale key. | ||
*/ | ||
locale(key?: string): string; | ||
/** | ||
* This function sets the current locale. If no arguments are passed in, | ||
* it will simply return the current global locale key. | ||
*/ | ||
locale(key?: string): string; | ||
/** | ||
* Object with all loaded locales | ||
*/ | ||
locales: NumeralJSLocales; | ||
/** | ||
* Object with all loaded locales | ||
*/ | ||
locales: NumeralJSLocales; | ||
/** | ||
* This function provides access to the loaded locale data. If | ||
* no arguments are passed in, it will simply return the current | ||
* global locale object. | ||
* | ||
* @param key Locale key, e.g 'es' for a spanish locale definition | ||
*/ | ||
localeData(key?: string): NumeralJSLocale; | ||
/** | ||
* This function provides access to the loaded locale data. If | ||
* no arguments are passed in, it will simply return the current | ||
* global locale object. | ||
* | ||
* @param key Locale key, e.g 'es' for a spanish locale definition | ||
*/ | ||
localeData(key?: string): NumeralJSLocale; | ||
/** | ||
* This function resets the configuration to all the defaults | ||
*/ | ||
reset(): void; | ||
/** | ||
* This function resets the configuration to all the defaults | ||
*/ | ||
reset(): void; | ||
/** | ||
* Registers a language definition or a custom format definition. | ||
* | ||
* @param what Allowed values are: either 'format' or 'locale' | ||
* @param key The key of the registerd type, e.g. 'de' for a german locale definition | ||
* @param value The locale definition or the format definitiion | ||
*/ | ||
register(what: RegisterType, key: string, value: NumeralJSLocale | NumeralJsFormat): NumeralJSLocale | NumeralJsFormat; | ||
/** | ||
* Registers a language definition or a custom format definition. | ||
* | ||
* @param what Allowed values are: either 'format' or 'locale' | ||
* @param key The key of the registerd type, e.g. 'de' for a german locale definition | ||
* @param value The locale definition or the format definitiion | ||
*/ | ||
register(what: RegisterType, key: string, value: NumeralJSLocale | NumeralJsFormat): NumeralJSLocale | NumeralJsFormat; | ||
zeroFormat(format: string): void; | ||
nullFormat(format: string): void; | ||
defaultFormat(format: string): void; | ||
clone(): Numeral; | ||
format(inputString?: string, roundingFunction?: RoundingFunction): string; | ||
unformat(inputString: string): number; | ||
value(): number; | ||
valueOf(): number; | ||
set(value: any): Numeral; | ||
add(value: any): Numeral; | ||
subtract(value: any): Numeral; | ||
multiply(value: any): Numeral; | ||
divide(value: any): Numeral; | ||
difference(value: any): number; | ||
validate(value: any, culture: any): boolean; | ||
zeroFormat(format: string): void; | ||
nullFormat(format: string): void; | ||
defaultFormat(format: string): void; | ||
clone(): Numeral; | ||
format(inputString?: string, roundingFunction?: RoundingFunction): string; | ||
unformat(inputString: string): number; | ||
value(): number; | ||
valueOf(): number; | ||
set(value: any): Numeral; | ||
add(value: any): Numeral; | ||
subtract(value: any): Numeral; | ||
multiply(value: any): Numeral; | ||
divide(value: any): Numeral; | ||
difference(value: any): number; | ||
validate(value: any, culture: any): boolean; | ||
} | ||
@@ -115,0 +115,0 @@ |
{ | ||
"name": "@types/numeral", | ||
"version": "0.0.27", | ||
"version": "0.0.28", | ||
"description": "TypeScript definitions for Numeral.js", | ||
@@ -37,4 +37,4 @@ "license": "MIT", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "26e23e2f0e98145b0fc18aefca113822bf64e9915150debe34b2096226f2ce20", | ||
"typeScriptVersion": "2.8" | ||
"typesPublisherContentHash": "9bc9ede1d55687261ee54573e15db033945a60011391ff2fb5e5e1ecda64ed17", | ||
"typeScriptVersion": "3.0" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Sun, 26 Apr 2020 17:42:25 GMT | ||
* Last updated: Fri, 15 May 2020 11:31:27 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: `numeral` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6328