()
| 36 | // need a safe Intl object before they define Intl.Collator. |
| 37 | // https://tc39.es/ecma402/#sec-intl.collator |
| 38 | function ensureIntl() { |
| 39 | if (typeof Intl === 'undefined') { |
| 40 | if (typeof window !== 'undefined') { |
| 41 | Object.defineProperty(window, 'Intl', { |
| 42 | value: {}, |
| 43 | }) |
| 44 | // @ts-ignore we don't include @types/node so global isn't a thing |
| 45 | } else if (typeof global !== 'undefined') { |
| 46 | // @ts-ignore we don't include @types/node so global isn't a thing |
| 47 | Object.defineProperty(global, 'Intl', { |
| 48 | value: {}, |
| 49 | }) |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | export const Collator = function ( |
| 55 | this: CollatorType, |
no outgoing calls
no test coverage detected