Skip to content

Commit

Permalink
feat: use export default for locales (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT committed Jan 21, 2022
1 parent 160de12 commit 93e8e53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/index.ts
Expand Up @@ -12,6 +12,7 @@ import { Hacker } from './hacker';
import { Helpers } from './helpers';
import { Image } from './image';
import { Internet } from './internet';
import allLocales from './locales';
import { Lorem } from './lorem';
import { Mersenne } from './mersenne';
import { Music } from './music';
Expand Down Expand Up @@ -438,7 +439,7 @@ export class Faker {

// since we are requiring the top level of faker, load all locales by default
export const faker: Faker = new Faker({
locales: require('./locales'),
locales: allLocales,
});

export default faker;
2 changes: 1 addition & 1 deletion src/locales/index.ts
Expand Up @@ -115,4 +115,4 @@ const locales: { [lang: string]: LocaleDefinition } = {
zu_ZA,
};

export = locales;
export default locales;

0 comments on commit 93e8e53

Please sign in to comment.