@elfedali/moroccan-data 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,104 @@
1
+ type Rng = () => number;
2
+
3
+ type Gender = 'male' | 'female';
4
+ interface Address {
5
+ street: string;
6
+ city: string;
7
+ region: string;
8
+ postalCode: string;
9
+ latitude: number;
10
+ longitude: number;
11
+ country: 'Morocco';
12
+ countryCode: 'MA';
13
+ }
14
+ interface MoroccanFakerOptions {
15
+ seed?: number;
16
+ rng?: Rng;
17
+ }
18
+ declare class MoroccanFaker {
19
+ private readonly random;
20
+ readonly person: {
21
+ firstName: (gender?: Gender) => string;
22
+ lastName: () => string;
23
+ fullName: (options?: {
24
+ gender?: Gender;
25
+ }) => string;
26
+ jobTitle: () => string;
27
+ };
28
+ readonly location: {
29
+ region: () => string;
30
+ city: () => string;
31
+ postalCode: () => string;
32
+ streetAddress: () => string;
33
+ latitude: () => number;
34
+ longitude: () => number;
35
+ coordinates: () => {
36
+ latitude: number;
37
+ longitude: number;
38
+ };
39
+ address: () => Address;
40
+ };
41
+ readonly phone: {
42
+ mobile: (options?: {
43
+ formatted?: boolean;
44
+ }) => string;
45
+ internationalMobile: (options?: {
46
+ formatted?: boolean;
47
+ }) => string;
48
+ };
49
+ readonly internet: {
50
+ username: (options?: {
51
+ firstName?: string;
52
+ lastName?: string;
53
+ }) => string;
54
+ email: (options?: {
55
+ firstName?: string;
56
+ lastName?: string;
57
+ domain?: string;
58
+ }) => string;
59
+ };
60
+ readonly id: {
61
+ cin: () => string;
62
+ ice: () => string;
63
+ };
64
+ readonly company: {
65
+ name: () => string;
66
+ };
67
+ readonly date: {
68
+ between: (from: Date | number | string, to: Date | number | string) => Date;
69
+ isoDate: (options?: {
70
+ from?: Date | number | string;
71
+ to?: Date | number | string;
72
+ }) => string;
73
+ };
74
+ readonly time: {
75
+ hhmm: () => string;
76
+ hhmmss: () => string;
77
+ };
78
+ readonly text: {
79
+ sentence: () => string;
80
+ paragraph: (options?: {
81
+ sentences?: number;
82
+ }) => string;
83
+ text: (options?: {
84
+ sentences?: number;
85
+ }) => string;
86
+ };
87
+ readonly number: {
88
+ int: (options?: {
89
+ min?: number;
90
+ max?: number;
91
+ }) => number;
92
+ float: (options?: {
93
+ min?: number;
94
+ max?: number;
95
+ precision?: number;
96
+ }) => number;
97
+ };
98
+ constructor(options?: MoroccanFakerOptions);
99
+ seed(seed: number): this;
100
+ }
101
+ declare function createMoroccanFaker(options?: MoroccanFakerOptions): MoroccanFaker;
102
+ declare const morocco: MoroccanFaker;
103
+
104
+ export { type Address, type Gender, MoroccanFaker, type MoroccanFakerOptions, createMoroccanFaker, morocco };
@@ -0,0 +1,104 @@
1
+ type Rng = () => number;
2
+
3
+ type Gender = 'male' | 'female';
4
+ interface Address {
5
+ street: string;
6
+ city: string;
7
+ region: string;
8
+ postalCode: string;
9
+ latitude: number;
10
+ longitude: number;
11
+ country: 'Morocco';
12
+ countryCode: 'MA';
13
+ }
14
+ interface MoroccanFakerOptions {
15
+ seed?: number;
16
+ rng?: Rng;
17
+ }
18
+ declare class MoroccanFaker {
19
+ private readonly random;
20
+ readonly person: {
21
+ firstName: (gender?: Gender) => string;
22
+ lastName: () => string;
23
+ fullName: (options?: {
24
+ gender?: Gender;
25
+ }) => string;
26
+ jobTitle: () => string;
27
+ };
28
+ readonly location: {
29
+ region: () => string;
30
+ city: () => string;
31
+ postalCode: () => string;
32
+ streetAddress: () => string;
33
+ latitude: () => number;
34
+ longitude: () => number;
35
+ coordinates: () => {
36
+ latitude: number;
37
+ longitude: number;
38
+ };
39
+ address: () => Address;
40
+ };
41
+ readonly phone: {
42
+ mobile: (options?: {
43
+ formatted?: boolean;
44
+ }) => string;
45
+ internationalMobile: (options?: {
46
+ formatted?: boolean;
47
+ }) => string;
48
+ };
49
+ readonly internet: {
50
+ username: (options?: {
51
+ firstName?: string;
52
+ lastName?: string;
53
+ }) => string;
54
+ email: (options?: {
55
+ firstName?: string;
56
+ lastName?: string;
57
+ domain?: string;
58
+ }) => string;
59
+ };
60
+ readonly id: {
61
+ cin: () => string;
62
+ ice: () => string;
63
+ };
64
+ readonly company: {
65
+ name: () => string;
66
+ };
67
+ readonly date: {
68
+ between: (from: Date | number | string, to: Date | number | string) => Date;
69
+ isoDate: (options?: {
70
+ from?: Date | number | string;
71
+ to?: Date | number | string;
72
+ }) => string;
73
+ };
74
+ readonly time: {
75
+ hhmm: () => string;
76
+ hhmmss: () => string;
77
+ };
78
+ readonly text: {
79
+ sentence: () => string;
80
+ paragraph: (options?: {
81
+ sentences?: number;
82
+ }) => string;
83
+ text: (options?: {
84
+ sentences?: number;
85
+ }) => string;
86
+ };
87
+ readonly number: {
88
+ int: (options?: {
89
+ min?: number;
90
+ max?: number;
91
+ }) => number;
92
+ float: (options?: {
93
+ min?: number;
94
+ max?: number;
95
+ precision?: number;
96
+ }) => number;
97
+ };
98
+ constructor(options?: MoroccanFakerOptions);
99
+ seed(seed: number): this;
100
+ }
101
+ declare function createMoroccanFaker(options?: MoroccanFakerOptions): MoroccanFaker;
102
+ declare const morocco: MoroccanFaker;
103
+
104
+ export { type Address, type Gender, MoroccanFaker, type MoroccanFakerOptions, createMoroccanFaker, morocco };