src/third_party/mozjs/extract/js/src/builtin/intl/Collator.js
/**
 * Compute an internal properties object from |lazyCollatorData|.
 */
Compute an internal properties object from |lazyCollatorData|.
Compute an internal properties object from |lazyCollatorData| .
function resolveCollatorInternals(lazyCollatorData) {
    assert(IsObject(lazyCollatorData), "lazy data not an object?");
    var internalProps = std_Object_create(null);
    var Collator = collatorInternalProperties;
    internalProps.usage = lazyCollatorData.usage;
    var collatorIsSorting = lazyCollatorData.usage === "sort";
    var localeData = collatorIsSorting
                     ? Collator.sortLocaleData
                     : Collator.searchLocaleData;
    var relevantExtensionKeys = Collator.relevantExtensionKeys;
    var r = ResolveLocale("Collator",
                          lazyCollatorData.requestedLocales,
                          lazyCollatorData.opt,
                          relevantExtensionKeys,
                          localeData);
    internalProps.locale = r.locale;
    var collation = r.co;
    if (collation === null)
        collation = "default";
    internalProps.collation = collation;
    internalProps.numeric = r.kn === "true";
    internalProps.caseFirst = r.kf;
    var s = lazyCollatorData.rawSensitivity;
    if (s === undefined) {
        s = "variant";
    }
    internalProps.sensitivity = s;
    internalProps.ignorePunctuation = lazyCollatorData.ignorePunctuation;
    return internalProps;
}
function resolveCollatorInternals ( lazyCollatorData ) { assert ( IsObject ( lazyCollatorData ) , "lazy data not an object?" ) ; var internalProps = std_Object_create ( null ) ; var Collator = collatorInternalProperties ; internalProps . usage = lazyCollatorData . usage ; var collatorIsSorting = lazyCollatorData . usage === "sort" ; var localeData = collatorIsSorting ? Collator . sortLocaleData : Collator . searchLocaleData ; var relevantExtensionKeys = Collator . relevantExtensionKeys ; var r = ResolveLocale ( "Collator" , lazyCollatorData . requestedLocales , lazyCollatorData . opt , relevantExtensionKeys , localeData ) ; internalProps . locale = r . locale ; var collation = r . co ; if ( collation === null ) collation = "default" ; internalProps . collation = collation ; internalProps . numeric = r . kn === "true" ; internalProps . caseFirst = r . kf ; var s = lazyCollatorData . rawSensitivity ; if ( s === undefined ) { s = "variant" ; } internalProps . sensitivity = s ; internalProps . ignorePunctuation = lazyCollatorData . ignorePunctuation ; return internalProps ; }
Compute an internal properties object from |lazyCollatorData|.
Compute an internal properties object from |lazyCollatorData| .
// Step 5. // Steps 6-7. // Compute effective locale. // Step 16. // Step 17. // Step 18. // Step 19. // Step 20. // Step 21. // Step 22. // Step 23. // Compute remaining collation options. // Step 25. // In theory the default sensitivity for the "search" collator is // locale dependent; in reality the CLDR/ICU default strength is // always tertiary. Therefore use "variant" as the default value for // both collation modes. // Step 26. // Step 28. // The caller is responsible for associating |internalProps| with the right // object using |setInternalProperties|.