namefully 1.0.9 → 1.2.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.
- package/LICENSE +21 -674
- package/dist/example/index.js +2734 -0
- package/dist/lib/config.d.ts +121 -0
- package/dist/lib/config.js +189 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/constants.d.ts +4 -0
- package/dist/lib/constants.js +31 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/error.d.ts +172 -0
- package/dist/lib/error.js +210 -0
- package/dist/lib/error.js.map +1 -0
- package/dist/lib/{usecases/index.d.ts → example/example.d.ts} +0 -0
- package/dist/lib/full-name.d.ts +71 -0
- package/dist/lib/full-name.js +147 -0
- package/dist/lib/full-name.js.map +1 -0
- package/dist/lib/index.d.ts +16 -6
- package/dist/lib/index.js +29 -8
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/name.d.ts +177 -0
- package/dist/lib/name.js +322 -0
- package/dist/lib/name.js.map +1 -0
- package/dist/lib/namefully.d.ts +303 -208
- package/dist/lib/namefully.js +603 -442
- package/dist/lib/namefully.js.map +1 -1
- package/dist/lib/parser.d.ts +46 -0
- package/dist/lib/parser.js +173 -0
- package/dist/lib/parser.js.map +1 -0
- package/dist/lib/src/config.d.ts +121 -0
- package/dist/lib/src/constants.d.ts +4 -0
- package/dist/lib/src/error.d.ts +172 -0
- package/dist/lib/src/full-name.d.ts +71 -0
- package/dist/lib/src/index.d.ts +16 -6
- package/dist/lib/src/name.d.ts +177 -0
- package/dist/lib/src/namefully.d.ts +303 -208
- package/dist/lib/src/parser.d.ts +46 -0
- package/dist/lib/src/types.d.ts +127 -0
- package/dist/lib/src/utils.d.ts +63 -0
- package/dist/lib/src/validator.d.ts +66 -0
- package/dist/lib/types.d.ts +127 -0
- package/dist/lib/types.js +181 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/utils.d.ts +63 -0
- package/dist/lib/utils.js +138 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/validator.d.ts +66 -0
- package/dist/lib/validator.js +332 -0
- package/dist/lib/validator.js.map +1 -0
- package/dist/umd/namefully.js +2191 -2111
- package/dist/umd/namefully.js.map +1 -1
- package/dist/umd/namefully.min.js +1 -1
- package/dist/umd/namefully.min.js.LICENSE.txt +8 -20
- package/dist/umd/namefully.min.js.map +1 -1
- package/package.json +50 -53
- package/readme.md +151 -175
- package/changelog.md +0 -114
- package/dist/lib/core/constants.d.ts +0 -26
- package/dist/lib/core/constants.js +0 -42
- package/dist/lib/core/constants.js.map +0 -1
- package/dist/lib/core/index.d.ts +0 -9
- package/dist/lib/core/index.js +0 -13
- package/dist/lib/core/index.js.map +0 -1
- package/dist/lib/core/parsers/array-name.parser.d.ts +0 -42
- package/dist/lib/core/parsers/array-name.parser.js +0 -84
- package/dist/lib/core/parsers/array-name.parser.js.map +0 -1
- package/dist/lib/core/parsers/array-string.parser.d.ts +0 -48
- package/dist/lib/core/parsers/array-string.parser.js +0 -96
- package/dist/lib/core/parsers/array-string.parser.js.map +0 -1
- package/dist/lib/core/parsers/index.d.ts +0 -11
- package/dist/lib/core/parsers/index.js +0 -11
- package/dist/lib/core/parsers/index.js.map +0 -1
- package/dist/lib/core/parsers/nama.parser.d.ts +0 -34
- package/dist/lib/core/parsers/nama.parser.js +0 -75
- package/dist/lib/core/parsers/nama.parser.js.map +0 -1
- package/dist/lib/core/parsers/parser.d.ts +0 -29
- package/dist/lib/core/parsers/parser.js +0 -3
- package/dist/lib/core/parsers/parser.js.map +0 -1
- package/dist/lib/core/parsers/string.parser.d.ts +0 -61
- package/dist/lib/core/parsers/string.parser.js +0 -63
- package/dist/lib/core/parsers/string.parser.js.map +0 -1
- package/dist/lib/core/utils/utils.d.ts +0 -14
- package/dist/lib/core/utils/utils.js +0 -67
- package/dist/lib/core/utils/utils.js.map +0 -1
- package/dist/lib/models/enums.d.ts +0 -91
- package/dist/lib/models/enums.js +0 -98
- package/dist/lib/models/enums.js.map +0 -1
- package/dist/lib/models/firstname.d.ts +0 -41
- package/dist/lib/models/firstname.js +0 -59
- package/dist/lib/models/firstname.js.map +0 -1
- package/dist/lib/models/index.d.ts +0 -12
- package/dist/lib/models/index.js +0 -15
- package/dist/lib/models/index.js.map +0 -1
- package/dist/lib/models/lastname.d.ts +0 -44
- package/dist/lib/models/lastname.js +0 -86
- package/dist/lib/models/lastname.js.map +0 -1
- package/dist/lib/models/misc.d.ts +0 -80
- package/dist/lib/models/misc.js +0 -3
- package/dist/lib/models/misc.js.map +0 -1
- package/dist/lib/models/name.d.ts +0 -48
- package/dist/lib/models/name.js +0 -72
- package/dist/lib/models/name.js.map +0 -1
- package/dist/lib/models/summary.d.ts +0 -23
- package/dist/lib/models/summary.js +0 -60
- package/dist/lib/models/summary.js.map +0 -1
- package/dist/lib/src/core/constants.d.ts +0 -26
- package/dist/lib/src/core/index.d.ts +0 -9
- package/dist/lib/src/core/parsers/array-name.parser.d.ts +0 -42
- package/dist/lib/src/core/parsers/array-string.parser.d.ts +0 -48
- package/dist/lib/src/core/parsers/index.d.ts +0 -11
- package/dist/lib/src/core/parsers/nama.parser.d.ts +0 -34
- package/dist/lib/src/core/parsers/parser.d.ts +0 -29
- package/dist/lib/src/core/parsers/string.parser.d.ts +0 -61
- package/dist/lib/src/core/utils/utils.d.ts +0 -14
- package/dist/lib/src/models/enums.d.ts +0 -91
- package/dist/lib/src/models/firstname.d.ts +0 -41
- package/dist/lib/src/models/index.d.ts +0 -12
- package/dist/lib/src/models/lastname.d.ts +0 -44
- package/dist/lib/src/models/misc.d.ts +0 -80
- package/dist/lib/src/models/name.d.ts +0 -48
- package/dist/lib/src/models/summary.d.ts +0 -23
- package/dist/lib/src/validators/array-name.validator.d.ts +0 -25
- package/dist/lib/src/validators/array-string.validator.d.ts +0 -43
- package/dist/lib/src/validators/common/validation-error.d.ts +0 -19
- package/dist/lib/src/validators/common/validation-rule.d.ts +0 -69
- package/dist/lib/src/validators/common/validation-type.d.ts +0 -24
- package/dist/lib/src/validators/firstname.validator.d.ts +0 -20
- package/dist/lib/src/validators/fullname.validator.d.ts +0 -21
- package/dist/lib/src/validators/index.d.ts +0 -21
- package/dist/lib/src/validators/lastname.validator.d.ts +0 -20
- package/dist/lib/src/validators/middlename.validator.d.ts +0 -20
- package/dist/lib/src/validators/nama.validator.d.ts +0 -21
- package/dist/lib/src/validators/namon.validator.d.ts +0 -20
- package/dist/lib/src/validators/prefix.validator.d.ts +0 -14
- package/dist/lib/src/validators/string-name.validator.d.ts +0 -20
- package/dist/lib/src/validators/suffix.validator.d.ts +0 -14
- package/dist/lib/src/validators/validator.d.ts +0 -13
- package/dist/lib/usecases/compress.usecase.d.ts +0 -8
- package/dist/lib/usecases/constants.d.ts +0 -7
- package/dist/lib/usecases/describe.usecase.d.ts +0 -12
- package/dist/lib/usecases/format.usecase.d.ts +0 -6
- package/dist/lib/usecases/namefully.usecase.d.ts +0 -14
- package/dist/lib/usecases/shorten.usecase.d.ts +0 -6
- package/dist/lib/validators/array-name.validator.d.ts +0 -25
- package/dist/lib/validators/array-name.validator.js +0 -82
- package/dist/lib/validators/array-name.validator.js.map +0 -1
- package/dist/lib/validators/array-string.validator.d.ts +0 -43
- package/dist/lib/validators/array-string.validator.js +0 -80
- package/dist/lib/validators/array-string.validator.js.map +0 -1
- package/dist/lib/validators/common/validation-error.d.ts +0 -19
- package/dist/lib/validators/common/validation-error.js +0 -26
- package/dist/lib/validators/common/validation-error.js.map +0 -1
- package/dist/lib/validators/common/validation-rule.d.ts +0 -69
- package/dist/lib/validators/common/validation-rule.js +0 -73
- package/dist/lib/validators/common/validation-rule.js.map +0 -1
- package/dist/lib/validators/common/validation-type.d.ts +0 -24
- package/dist/lib/validators/common/validation-type.js +0 -28
- package/dist/lib/validators/common/validation-type.js.map +0 -1
- package/dist/lib/validators/firstname.validator.d.ts +0 -20
- package/dist/lib/validators/firstname.validator.js +0 -29
- package/dist/lib/validators/firstname.validator.js.map +0 -1
- package/dist/lib/validators/fullname.validator.d.ts +0 -21
- package/dist/lib/validators/fullname.validator.js +0 -38
- package/dist/lib/validators/fullname.validator.js.map +0 -1
- package/dist/lib/validators/index.d.ts +0 -21
- package/dist/lib/validators/index.js +0 -35
- package/dist/lib/validators/index.js.map +0 -1
- package/dist/lib/validators/lastname.validator.d.ts +0 -20
- package/dist/lib/validators/lastname.validator.js +0 -29
- package/dist/lib/validators/lastname.validator.js.map +0 -1
- package/dist/lib/validators/middlename.validator.d.ts +0 -20
- package/dist/lib/validators/middlename.validator.js +0 -38
- package/dist/lib/validators/middlename.validator.js.map +0 -1
- package/dist/lib/validators/nama.validator.d.ts +0 -21
- package/dist/lib/validators/nama.validator.js +0 -43
- package/dist/lib/validators/nama.validator.js.map +0 -1
- package/dist/lib/validators/namon.validator.d.ts +0 -20
- package/dist/lib/validators/namon.validator.js +0 -29
- package/dist/lib/validators/namon.validator.js.map +0 -1
- package/dist/lib/validators/prefix.validator.d.ts +0 -14
- package/dist/lib/validators/prefix.validator.js +0 -31
- package/dist/lib/validators/prefix.validator.js.map +0 -1
- package/dist/lib/validators/string-name.validator.d.ts +0 -20
- package/dist/lib/validators/string-name.validator.js +0 -29
- package/dist/lib/validators/string-name.validator.js.map +0 -1
- package/dist/lib/validators/suffix.validator.d.ts +0 -14
- package/dist/lib/validators/suffix.validator.js +0 -31
- package/dist/lib/validators/suffix.validator.js.map +0 -1
- package/dist/lib/validators/validator.d.ts +0 -13
- package/dist/lib/validators/validator.js +0 -9
- package/dist/lib/validators/validator.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../../src/core/parsers/parser.ts"],"names":[],"mappings":""}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A string parser
|
|
3
|
-
*
|
|
4
|
-
* Created on March 15, 2020
|
|
5
|
-
* @author Ralph Florent <ralflornt@gmail.com>
|
|
6
|
-
*/
|
|
7
|
-
import { Separator, Fullname, NameOrder } from '../../models/index';
|
|
8
|
-
import { Parser } from './index';
|
|
9
|
-
/**
|
|
10
|
-
* Represents a string parser
|
|
11
|
-
* @class
|
|
12
|
-
* @implements {Parser}
|
|
13
|
-
* @classdesc
|
|
14
|
-
* This parser parses a string name using a separator, if set, or simply using
|
|
15
|
-
* the space character <' '> as a basis for the split.
|
|
16
|
-
*
|
|
17
|
-
* **NOTE**:
|
|
18
|
-
* A string name is basically a string type containing the name parts differentiated
|
|
19
|
-
* with the help of a separator. The default separator is the character <space>
|
|
20
|
-
* or <' '>. However, it can be very, very helpful to use a distinct separator
|
|
21
|
-
* (e.g., a colon <:>) to handle multiple names for a `Namon`. That is to say,
|
|
22
|
-
* a piece of name shaped as `De La Cruz` is a last name that needs to be handled
|
|
23
|
-
* as a whole, and therefore requires that a different type of separator to split
|
|
24
|
-
* up the name parts. Alternatively, the `ArrayStringParser` can be used by indicating
|
|
25
|
-
* specifically which part of the name is what. Do note that this parser is actually
|
|
26
|
-
* a wrapper of the `ArrayStringParser`.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* Given the name `Maria De La Cruz`, using this parser without indicating a
|
|
30
|
-
* separator different than <space> will definitely throw an error. So, if the proper
|
|
31
|
-
* proper of doing when `De La Cruz` is the last name:
|
|
32
|
-
* ```
|
|
33
|
-
* > const name = new Namefully('Maria:De La Cruz', { separator: Separator.COLON })
|
|
34
|
-
* > console.log(name.getLastname())
|
|
35
|
-
* De La Cruz
|
|
36
|
-
* ```
|
|
37
|
-
* Or
|
|
38
|
-
* ```
|
|
39
|
-
* > const name = new Namefully(['Maria', 'De La Cruz'])
|
|
40
|
-
* > console.log(name.getLastname())
|
|
41
|
-
* De La Cruz
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
export default class StringParser implements Parser<string> {
|
|
45
|
-
raw: string;
|
|
46
|
-
/**
|
|
47
|
-
* Create a parser ready to parse the raw data
|
|
48
|
-
* @param {string} raw data as a string representation
|
|
49
|
-
*/
|
|
50
|
-
constructor(raw: string);
|
|
51
|
-
/**
|
|
52
|
-
* Parses the raw data into a full name
|
|
53
|
-
* @param options how to parse
|
|
54
|
-
* @returns {Fullname}
|
|
55
|
-
*/
|
|
56
|
-
parse(options: {
|
|
57
|
-
orderedBy: NameOrder;
|
|
58
|
-
separator: Separator;
|
|
59
|
-
bypass: boolean;
|
|
60
|
-
}): Fullname;
|
|
61
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("./index");
|
|
4
|
-
/**
|
|
5
|
-
* Represents a string parser
|
|
6
|
-
* @class
|
|
7
|
-
* @implements {Parser}
|
|
8
|
-
* @classdesc
|
|
9
|
-
* This parser parses a string name using a separator, if set, or simply using
|
|
10
|
-
* the space character <' '> as a basis for the split.
|
|
11
|
-
*
|
|
12
|
-
* **NOTE**:
|
|
13
|
-
* A string name is basically a string type containing the name parts differentiated
|
|
14
|
-
* with the help of a separator. The default separator is the character <space>
|
|
15
|
-
* or <' '>. However, it can be very, very helpful to use a distinct separator
|
|
16
|
-
* (e.g., a colon <:>) to handle multiple names for a `Namon`. That is to say,
|
|
17
|
-
* a piece of name shaped as `De La Cruz` is a last name that needs to be handled
|
|
18
|
-
* as a whole, and therefore requires that a different type of separator to split
|
|
19
|
-
* up the name parts. Alternatively, the `ArrayStringParser` can be used by indicating
|
|
20
|
-
* specifically which part of the name is what. Do note that this parser is actually
|
|
21
|
-
* a wrapper of the `ArrayStringParser`.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* Given the name `Maria De La Cruz`, using this parser without indicating a
|
|
25
|
-
* separator different than <space> will definitely throw an error. So, if the proper
|
|
26
|
-
* proper of doing when `De La Cruz` is the last name:
|
|
27
|
-
* ```
|
|
28
|
-
* > const name = new Namefully('Maria:De La Cruz', { separator: Separator.COLON })
|
|
29
|
-
* > console.log(name.getLastname())
|
|
30
|
-
* De La Cruz
|
|
31
|
-
* ```
|
|
32
|
-
* Or
|
|
33
|
-
* ```
|
|
34
|
-
* > const name = new Namefully(['Maria', 'De La Cruz'])
|
|
35
|
-
* > console.log(name.getLastname())
|
|
36
|
-
* De La Cruz
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
class StringParser {
|
|
40
|
-
/**
|
|
41
|
-
* Create a parser ready to parse the raw data
|
|
42
|
-
* @param {string} raw data as a string representation
|
|
43
|
-
*/
|
|
44
|
-
constructor(raw) {
|
|
45
|
-
this.raw = raw;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Parses the raw data into a full name
|
|
49
|
-
* @param options how to parse
|
|
50
|
-
* @returns {Fullname}
|
|
51
|
-
*/
|
|
52
|
-
parse(options) {
|
|
53
|
-
// given this setting
|
|
54
|
-
const { orderedBy, separator, bypass } = options;
|
|
55
|
-
// then distribute all the elements accordingly
|
|
56
|
-
const nama = this.raw.split(separator);
|
|
57
|
-
const fullname = new index_1.ArrayStringParser(nama).parse({ orderedBy, bypass });
|
|
58
|
-
// finally return high quality of data
|
|
59
|
-
return fullname;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.default = StringParser;
|
|
63
|
-
//# sourceMappingURL=string.parser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.parser.js","sourceRoot":"","sources":["../../../../src/core/parsers/string.parser.ts"],"names":[],"mappings":";;AAOA,mCAAoD;AAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAqB,YAAY;IAE7B;;;OAGG;IACH,YAAmB,GAAW;QAAX,QAAG,GAAH,GAAG,CAAQ;IAAG,CAAC;IAElC;;;;OAIG;IACH,KAAK,CAAC,OAIL;QAEG,qBAAqB;QACrB,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAEjD,+CAA+C;QAC/C,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACvC,MAAM,QAAQ,GAAG,IAAI,yBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;QAE1E,sCAAsC;QACtC,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ;AA7BD,+BA6BC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utils for the core functionalities of `Namefully`
|
|
3
|
-
*
|
|
4
|
-
* Created on March 16, 2020
|
|
5
|
-
* @author Ralph Florent <ralflornt@gmail.com>
|
|
6
|
-
*/
|
|
7
|
-
import { NameIndex, NameOrder } from '../../models';
|
|
8
|
-
/**
|
|
9
|
-
* Reorganizes the existing global indexes for array of name parts
|
|
10
|
-
* @param orderedBy by first or last name
|
|
11
|
-
* @param argLength length of the provided array
|
|
12
|
-
* @param nameIndex global preset of indexing
|
|
13
|
-
*/
|
|
14
|
-
export declare function organizeNameIndex(orderedBy: NameOrder, argLength: number, nameIndex?: NameIndex): NameIndex;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const core_1 = require("../../core");
|
|
4
|
-
/**
|
|
5
|
-
* Reorganizes the existing global indexes for array of name parts
|
|
6
|
-
* @param orderedBy by first or last name
|
|
7
|
-
* @param argLength length of the provided array
|
|
8
|
-
* @param nameIndex global preset of indexing
|
|
9
|
-
*/
|
|
10
|
-
function organizeNameIndex(orderedBy, argLength, nameIndex = core_1.NAME_INDEX) {
|
|
11
|
-
const out = Object.assign({}, nameIndex);
|
|
12
|
-
if (orderedBy === 'firstname') {
|
|
13
|
-
switch (argLength) {
|
|
14
|
-
case 2: // first name + last name
|
|
15
|
-
out.firstname = 0;
|
|
16
|
-
out.lastname = 1;
|
|
17
|
-
break;
|
|
18
|
-
case 3: // first name + middle name + last name
|
|
19
|
-
out.firstname = 0;
|
|
20
|
-
out.middlename = 1;
|
|
21
|
-
out.lastname = 2;
|
|
22
|
-
break;
|
|
23
|
-
case 4: // prefix + first name + middle name + last name
|
|
24
|
-
out.prefix = 0;
|
|
25
|
-
out.firstname = 1;
|
|
26
|
-
out.middlename = 2;
|
|
27
|
-
out.lastname = 3;
|
|
28
|
-
break;
|
|
29
|
-
case 5: // prefix + first name + middle name + last name + suffix
|
|
30
|
-
out.prefix = 0;
|
|
31
|
-
out.firstname = 1;
|
|
32
|
-
out.middlename = 2;
|
|
33
|
-
out.lastname = 3;
|
|
34
|
-
out.suffix = 4;
|
|
35
|
-
break;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
switch (argLength) {
|
|
40
|
-
case 2: // last name + first name
|
|
41
|
-
out.lastname = 0;
|
|
42
|
-
out.firstname = 1;
|
|
43
|
-
break;
|
|
44
|
-
case 3: // last name + first name + middle name
|
|
45
|
-
out.lastname = 0;
|
|
46
|
-
out.firstname = 1;
|
|
47
|
-
out.middlename = 2;
|
|
48
|
-
break;
|
|
49
|
-
case 4: // prefix + last name + first name + middle name
|
|
50
|
-
out.prefix = 0;
|
|
51
|
-
out.lastname = 1;
|
|
52
|
-
out.firstname = 2;
|
|
53
|
-
out.middlename = 3;
|
|
54
|
-
break;
|
|
55
|
-
case 5: // prefix + last name + first name + middle name + suffix
|
|
56
|
-
out.prefix = 0;
|
|
57
|
-
out.lastname = 1;
|
|
58
|
-
out.firstname = 2;
|
|
59
|
-
out.middlename = 3;
|
|
60
|
-
out.suffix = 4;
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return out;
|
|
65
|
-
}
|
|
66
|
-
exports.organizeNameIndex = organizeNameIndex;
|
|
67
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/core/utils/utils.ts"],"names":[],"mappings":";;AAOA,qCAAwC;AAExC;;;;;GAKG;AACH,SAAgB,iBAAiB,CAC7B,SAAoB,EACpB,SAAiB,EACjB,YAAuB,iBAAU;IAEjC,MAAM,GAAG,qBAAmB,SAAS,CAAE,CAAC;IAExC,IAAI,SAAS,KAAK,WAAW,EAAE;QAC3B,QAAO,SAAS,EAAE;YACd,KAAK,CAAC,EAAE,yBAAyB;gBAC7B,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC;gBAClB,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACjB,MAAM;YACV,KAAK,CAAC,EAAE,uCAAuC;gBAC3C,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC;gBAClB,GAAG,CAAC,UAAU,GAAG,CAAC,CAAC;gBACnB,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACjB,MAAM;YACV,KAAK,CAAC,EAAE,gDAAgD;gBACpD,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;gBACf,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC;gBAClB,GAAG,CAAC,UAAU,GAAG,CAAC,CAAC;gBACnB,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACjB,MAAM;YACV,KAAK,CAAC,EAAE,yDAAyD;gBAC7D,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;gBACf,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC;gBAClB,GAAG,CAAC,UAAU,GAAG,CAAC,CAAC;gBACnB,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACjB,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;gBACf,MAAM;SACb;KACJ;SACI;QACD,QAAO,SAAS,EAAE;YACd,KAAK,CAAC,EAAE,yBAAyB;gBAC7B,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACjB,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC;gBAClB,MAAM;YACV,KAAK,CAAC,EAAE,uCAAuC;gBAC3C,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACjB,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC;gBAClB,GAAG,CAAC,UAAU,GAAG,CAAC,CAAC;gBACnB,MAAM;YACV,KAAK,CAAC,EAAE,gDAAgD;gBACpD,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;gBACf,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACjB,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC;gBAClB,GAAG,CAAC,UAAU,GAAG,CAAC,CAAC;gBACnB,MAAM;YACV,KAAK,CAAC,EAAE,yDAAyD;gBAC7D,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;gBACf,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACjB,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC;gBAClB,GAAG,CAAC,UAAU,GAAG,CAAC,CAAC;gBACnB,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;gBACf,MAAM;SACb;KACJ;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AA5DD,8CA4DC"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* All the enums are listed here
|
|
3
|
-
*
|
|
4
|
-
* Created on March 06, 2020
|
|
5
|
-
* @author Ralph Florent <ralflornt@gmail.com>
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Enum `Namon` contains the finite set of a representative piece of a name
|
|
9
|
-
* @readonly
|
|
10
|
-
* @enum {string}
|
|
11
|
-
* The word `Namon` is the singular form used to refer to a chunk|part|piece of
|
|
12
|
-
* a name. And the plural form is `Nama`. (Same idea as in criterion/criteria)
|
|
13
|
-
*/
|
|
14
|
-
export declare enum Namon {
|
|
15
|
-
PREFIX = "prefix",
|
|
16
|
-
LAST_NAME = "lastname",
|
|
17
|
-
MIDDLE_NAME = "middlename",
|
|
18
|
-
FIRST_NAME = "firstname",
|
|
19
|
-
SUFFIX = "suffix"
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Enum for the prefix values
|
|
23
|
-
* @readonly
|
|
24
|
-
* @enum {string}
|
|
25
|
-
* American and Canadian English follow slightly different rules for abbreviated
|
|
26
|
-
* titles than British and Australian English. In North American English, titles
|
|
27
|
-
* before a name require a period: `Mr., Mrs., Ms., Dr.` In British and Australian
|
|
28
|
-
* English, no full stops are used in these abbreviations.
|
|
29
|
-
*/
|
|
30
|
-
export declare enum Prefix {
|
|
31
|
-
FIRT_LIEUTENANT = "1st Lt",
|
|
32
|
-
ADMIRAL = "Adm",
|
|
33
|
-
ATTORNEY = "Atty",
|
|
34
|
-
BROTHER = "Brother",
|
|
35
|
-
CAPTAIN = "Capt",
|
|
36
|
-
CHIEF = "Chief",
|
|
37
|
-
COMMANDER = "Cmdr",
|
|
38
|
-
COLONEL = "Col",
|
|
39
|
-
UNI_DEAN = "Dean",
|
|
40
|
-
DOCTOR = "Dr",
|
|
41
|
-
ELDER = "Elder",
|
|
42
|
-
FATHER = "Father",
|
|
43
|
-
GENERAL = "Gen",
|
|
44
|
-
HONORABLE = "Hon",
|
|
45
|
-
LIEUTENANT_COLONEL = "Lt Col",
|
|
46
|
-
MAJOR = "Maj",
|
|
47
|
-
MASTER_SERGEANT = "MSgt",
|
|
48
|
-
MISTER = "Mr",
|
|
49
|
-
MARRIED_WOMAN = "Mrs",
|
|
50
|
-
SINGLE_WOMAN = "Ms",
|
|
51
|
-
PRINCE = "Prince",
|
|
52
|
-
PROFESSOR = "Prof",
|
|
53
|
-
RABBI = "Rabbi",
|
|
54
|
-
REVEREND = "Rev",
|
|
55
|
-
SISTER = "Sister"
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Enum for the suffix values
|
|
59
|
-
* @readonly
|
|
60
|
-
* @enum {string}
|
|
61
|
-
*/
|
|
62
|
-
export declare enum Suffix {
|
|
63
|
-
THE_SECOND = "II",
|
|
64
|
-
THE_THIRD = "III",
|
|
65
|
-
THE_FOURTH = "IV",
|
|
66
|
-
CERT_PUB_ACCOUNTANT = "CPA",
|
|
67
|
-
DOCTOR_DENTAL_MED = "DDS",
|
|
68
|
-
ESQUIRE = "Esq",
|
|
69
|
-
JURIST_DOCTOR = "JD",
|
|
70
|
-
JUNIOR = "Jr",
|
|
71
|
-
DOCTOR_OF_LAWS = "LLD",
|
|
72
|
-
DOCTORATE = "PhD",
|
|
73
|
-
RETIRED_ARMED_FORCES = "Ret",
|
|
74
|
-
REGISTERED_NURSE = "RN",
|
|
75
|
-
SENIOR = "Sr",
|
|
76
|
-
DOCTOR_OF_OSTEO = "DO"
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Enum for the separator values representing some of the ASCII characters
|
|
80
|
-
* @readonly
|
|
81
|
-
* @enum {string}
|
|
82
|
-
*/
|
|
83
|
-
export declare enum Separator {
|
|
84
|
-
COLON = ":",
|
|
85
|
-
COMMA = ",",
|
|
86
|
-
EMPTY = "",
|
|
87
|
-
HYPHEN = "-",
|
|
88
|
-
PERIOD = ".",
|
|
89
|
-
SPACE = " ",
|
|
90
|
-
UNDERSCORE = "_"
|
|
91
|
-
}
|
package/dist/lib/models/enums.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* All the enums are listed here
|
|
4
|
-
*
|
|
5
|
-
* Created on March 06, 2020
|
|
6
|
-
* @author Ralph Florent <ralflornt@gmail.com>
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
/**
|
|
10
|
-
* Enum `Namon` contains the finite set of a representative piece of a name
|
|
11
|
-
* @readonly
|
|
12
|
-
* @enum {string}
|
|
13
|
-
* The word `Namon` is the singular form used to refer to a chunk|part|piece of
|
|
14
|
-
* a name. And the plural form is `Nama`. (Same idea as in criterion/criteria)
|
|
15
|
-
*/
|
|
16
|
-
var Namon;
|
|
17
|
-
(function (Namon) {
|
|
18
|
-
Namon["PREFIX"] = "prefix";
|
|
19
|
-
Namon["LAST_NAME"] = "lastname";
|
|
20
|
-
Namon["MIDDLE_NAME"] = "middlename";
|
|
21
|
-
Namon["FIRST_NAME"] = "firstname";
|
|
22
|
-
Namon["SUFFIX"] = "suffix";
|
|
23
|
-
})(Namon = exports.Namon || (exports.Namon = {}));
|
|
24
|
-
/**
|
|
25
|
-
* Enum for the prefix values
|
|
26
|
-
* @readonly
|
|
27
|
-
* @enum {string}
|
|
28
|
-
* American and Canadian English follow slightly different rules for abbreviated
|
|
29
|
-
* titles than British and Australian English. In North American English, titles
|
|
30
|
-
* before a name require a period: `Mr., Mrs., Ms., Dr.` In British and Australian
|
|
31
|
-
* English, no full stops are used in these abbreviations.
|
|
32
|
-
*/
|
|
33
|
-
var Prefix;
|
|
34
|
-
(function (Prefix) {
|
|
35
|
-
Prefix["FIRT_LIEUTENANT"] = "1st Lt";
|
|
36
|
-
Prefix["ADMIRAL"] = "Adm";
|
|
37
|
-
Prefix["ATTORNEY"] = "Atty";
|
|
38
|
-
Prefix["BROTHER"] = "Brother";
|
|
39
|
-
Prefix["CAPTAIN"] = "Capt";
|
|
40
|
-
Prefix["CHIEF"] = "Chief";
|
|
41
|
-
Prefix["COMMANDER"] = "Cmdr";
|
|
42
|
-
Prefix["COLONEL"] = "Col";
|
|
43
|
-
Prefix["UNI_DEAN"] = "Dean";
|
|
44
|
-
Prefix["DOCTOR"] = "Dr";
|
|
45
|
-
Prefix["ELDER"] = "Elder";
|
|
46
|
-
Prefix["FATHER"] = "Father";
|
|
47
|
-
Prefix["GENERAL"] = "Gen";
|
|
48
|
-
Prefix["HONORABLE"] = "Hon";
|
|
49
|
-
Prefix["LIEUTENANT_COLONEL"] = "Lt Col";
|
|
50
|
-
Prefix["MAJOR"] = "Maj";
|
|
51
|
-
Prefix["MASTER_SERGEANT"] = "MSgt";
|
|
52
|
-
Prefix["MISTER"] = "Mr";
|
|
53
|
-
Prefix["MARRIED_WOMAN"] = "Mrs";
|
|
54
|
-
Prefix["SINGLE_WOMAN"] = "Ms";
|
|
55
|
-
Prefix["PRINCE"] = "Prince";
|
|
56
|
-
Prefix["PROFESSOR"] = "Prof";
|
|
57
|
-
Prefix["RABBI"] = "Rabbi";
|
|
58
|
-
Prefix["REVEREND"] = "Rev";
|
|
59
|
-
Prefix["SISTER"] = "Sister";
|
|
60
|
-
})(Prefix = exports.Prefix || (exports.Prefix = {}));
|
|
61
|
-
/**
|
|
62
|
-
* Enum for the suffix values
|
|
63
|
-
* @readonly
|
|
64
|
-
* @enum {string}
|
|
65
|
-
*/
|
|
66
|
-
var Suffix;
|
|
67
|
-
(function (Suffix) {
|
|
68
|
-
Suffix["THE_SECOND"] = "II";
|
|
69
|
-
Suffix["THE_THIRD"] = "III";
|
|
70
|
-
Suffix["THE_FOURTH"] = "IV";
|
|
71
|
-
Suffix["CERT_PUB_ACCOUNTANT"] = "CPA";
|
|
72
|
-
Suffix["DOCTOR_DENTAL_MED"] = "DDS";
|
|
73
|
-
Suffix["ESQUIRE"] = "Esq";
|
|
74
|
-
Suffix["JURIST_DOCTOR"] = "JD";
|
|
75
|
-
Suffix["JUNIOR"] = "Jr";
|
|
76
|
-
Suffix["DOCTOR_OF_LAWS"] = "LLD";
|
|
77
|
-
Suffix["DOCTORATE"] = "PhD";
|
|
78
|
-
Suffix["RETIRED_ARMED_FORCES"] = "Ret";
|
|
79
|
-
Suffix["REGISTERED_NURSE"] = "RN";
|
|
80
|
-
Suffix["SENIOR"] = "Sr";
|
|
81
|
-
Suffix["DOCTOR_OF_OSTEO"] = "DO";
|
|
82
|
-
})(Suffix = exports.Suffix || (exports.Suffix = {}));
|
|
83
|
-
/**
|
|
84
|
-
* Enum for the separator values representing some of the ASCII characters
|
|
85
|
-
* @readonly
|
|
86
|
-
* @enum {string}
|
|
87
|
-
*/
|
|
88
|
-
var Separator;
|
|
89
|
-
(function (Separator) {
|
|
90
|
-
Separator["COLON"] = ":";
|
|
91
|
-
Separator["COMMA"] = ",";
|
|
92
|
-
Separator["EMPTY"] = "";
|
|
93
|
-
Separator["HYPHEN"] = "-";
|
|
94
|
-
Separator["PERIOD"] = ".";
|
|
95
|
-
Separator["SPACE"] = " ";
|
|
96
|
-
Separator["UNDERSCORE"] = "_";
|
|
97
|
-
})(Separator = exports.Separator || (exports.Separator = {}));
|
|
98
|
-
//# sourceMappingURL=enums.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../src/models/enums.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH;;;;;;GAMG;AACH,IAAY,KAMX;AAND,WAAY,KAAK;IACb,0BAAiB,CAAA;IACjB,+BAAsB,CAAA;IACtB,mCAA0B,CAAA;IAC1B,iCAAwB,CAAA;IACxB,0BAAiB,CAAA;AACrB,CAAC,EANW,KAAK,GAAL,aAAK,KAAL,aAAK,QAMhB;AAED;;;;;;;;GAQG;AACH,IAAY,MA0BX;AA1BD,WAAY,MAAM;IACd,oCAA0B,CAAA;IAC1B,yBAAe,CAAA;IACf,2BAAiB,CAAA;IACjB,6BAAmB,CAAA;IACnB,0BAAgB,CAAA;IAChB,yBAAe,CAAA;IACf,4BAAkB,CAAA;IAClB,yBAAe,CAAA;IACf,2BAAiB,CAAA;IACjB,uBAAa,CAAA;IACb,yBAAe,CAAA;IACf,2BAAiB,CAAA;IACjB,yBAAe,CAAA;IACf,2BAAiB,CAAA;IACjB,uCAA6B,CAAA;IAC7B,uBAAa,CAAA;IACb,kCAAwB,CAAA;IACxB,uBAAa,CAAA;IACb,+BAAqB,CAAA;IACrB,6BAAmB,CAAA;IACnB,2BAAiB,CAAA;IACjB,4BAAkB,CAAA;IAClB,yBAAe,CAAA;IACf,0BAAgB,CAAA;IAChB,2BAAiB,CAAA;AACrB,CAAC,EA1BW,MAAM,GAAN,cAAM,KAAN,cAAM,QA0BjB;AAED;;;;GAIG;AACH,IAAY,MAeX;AAfD,WAAY,MAAM;IACd,2BAAiB,CAAA;IACjB,2BAAiB,CAAA;IACjB,2BAAiB,CAAA;IACjB,qCAA2B,CAAA;IAC3B,mCAAyB,CAAA;IACzB,yBAAe,CAAA;IACf,8BAAoB,CAAA;IACpB,uBAAa,CAAA;IACb,gCAAsB,CAAA;IACtB,2BAAiB,CAAA;IACjB,sCAA4B,CAAA;IAC5B,iCAAuB,CAAA;IACvB,uBAAa,CAAA;IACb,gCAAsB,CAAA;AAC1B,CAAC,EAfW,MAAM,GAAN,cAAM,KAAN,cAAM,QAejB;AAED;;;;GAIG;AACH,IAAY,SAQX;AARD,WAAY,SAAS;IACjB,wBAAW,CAAA;IACX,wBAAW,CAAA;IACX,uBAAU,CAAA;IACV,yBAAY,CAAA;IACZ,yBAAY,CAAA;IACZ,wBAAW,CAAA;IACX,6BAAgB,CAAA;AACpB,CAAC,EARW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAQpB"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* First name class definition
|
|
3
|
-
*
|
|
4
|
-
* Created on March 06, 2020
|
|
5
|
-
* @author Ralph Florent <ralflornt@gmail.com>
|
|
6
|
-
*/
|
|
7
|
-
import { Name, Summary } from './index';
|
|
8
|
-
/**
|
|
9
|
-
* Represents a first name with some extra functionalities
|
|
10
|
-
* @class
|
|
11
|
-
* @extends Name
|
|
12
|
-
*/
|
|
13
|
-
export declare class Firstname extends Name {
|
|
14
|
-
namon: string;
|
|
15
|
-
more?: string[];
|
|
16
|
-
/**
|
|
17
|
-
* Constructs a `Firstname`
|
|
18
|
-
* @param {string} namon a piece of string that will be defined as a namon
|
|
19
|
-
* @param {string[]} [more] additional pieces considered as a given name
|
|
20
|
-
*/
|
|
21
|
-
constructor(namon: string, more?: string[]);
|
|
22
|
-
/**
|
|
23
|
-
* Gives some descriptive statistics that summarize the central tendency,
|
|
24
|
-
* dispersion and shape of the characters' distribution.
|
|
25
|
-
* @param {boolean} includeAll whether to include other pieces of the first
|
|
26
|
-
* name in the summary
|
|
27
|
-
* @see {@link describe} in `Namefully` class for further information
|
|
28
|
-
*/
|
|
29
|
-
describe(includeAll?: boolean): Summary;
|
|
30
|
-
/**
|
|
31
|
-
* Returns a string representation of the first name
|
|
32
|
-
* @param {boolean} includeAll whether to include other pieces of the first
|
|
33
|
-
* name
|
|
34
|
-
*/
|
|
35
|
-
tostring(includeAll?: boolean): string;
|
|
36
|
-
/**
|
|
37
|
-
* Gets the initials of the first name
|
|
38
|
-
* @returns {Array<string>} the initials
|
|
39
|
-
*/
|
|
40
|
-
getInitials(includeAll?: boolean): string[];
|
|
41
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/**
|
|
4
|
-
* First name class definition
|
|
5
|
-
*
|
|
6
|
-
* Created on March 06, 2020
|
|
7
|
-
* @author Ralph Florent <ralflornt@gmail.com>
|
|
8
|
-
*/
|
|
9
|
-
const index_1 = require("./index");
|
|
10
|
-
/**
|
|
11
|
-
* Represents a first name with some extra functionalities
|
|
12
|
-
* @class
|
|
13
|
-
* @extends Name
|
|
14
|
-
*/
|
|
15
|
-
class Firstname extends index_1.Name {
|
|
16
|
-
/**
|
|
17
|
-
* Constructs a `Firstname`
|
|
18
|
-
* @param {string} namon a piece of string that will be defined as a namon
|
|
19
|
-
* @param {string[]} [more] additional pieces considered as a given name
|
|
20
|
-
*/
|
|
21
|
-
constructor(namon, more) {
|
|
22
|
-
super(namon, index_1.Namon.FIRST_NAME);
|
|
23
|
-
this.namon = namon;
|
|
24
|
-
this.more = more;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Gives some descriptive statistics that summarize the central tendency,
|
|
28
|
-
* dispersion and shape of the characters' distribution.
|
|
29
|
-
* @param {boolean} includeAll whether to include other pieces of the first
|
|
30
|
-
* name in the summary
|
|
31
|
-
* @see {@link describe} in `Namefully` class for further information
|
|
32
|
-
*/
|
|
33
|
-
describe(includeAll = false) {
|
|
34
|
-
return new index_1.Summary(this.tostring(includeAll));
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Returns a string representation of the first name
|
|
38
|
-
* @param {boolean} includeAll whether to include other pieces of the first
|
|
39
|
-
* name
|
|
40
|
-
*/
|
|
41
|
-
tostring(includeAll = false) {
|
|
42
|
-
return !includeAll ?
|
|
43
|
-
this.namon :
|
|
44
|
-
this.namon.concat(index_1.Separator.SPACE, this.more.join(index_1.Separator.SPACE));
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Gets the initials of the first name
|
|
48
|
-
* @returns {Array<string>} the initials
|
|
49
|
-
*/
|
|
50
|
-
getInitials(includeAll = false) {
|
|
51
|
-
const initials = [this.namon[0]];
|
|
52
|
-
if (includeAll && Array.isArray(this.more) && this.more.length) {
|
|
53
|
-
initials.push(...this.more.map(n => n[0]));
|
|
54
|
-
}
|
|
55
|
-
return initials;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.Firstname = Firstname;
|
|
59
|
-
//# sourceMappingURL=firstname.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firstname.js","sourceRoot":"","sources":["../../../src/models/firstname.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,mCAA0D;AAG1D;;;;GAIG;AACH,MAAa,SAAU,SAAQ,YAAI;IAE/B;;;;OAIG;IACH,YAAmB,KAAa,EAAS,IAAe;QACpD,KAAK,CAAC,KAAK,EAAE,aAAK,CAAC,UAAU,CAAC,CAAC;QADhB,UAAK,GAAL,KAAK,CAAQ;QAAS,SAAI,GAAJ,IAAI,CAAW;IAExD,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,aAAsB,KAAK;QAChC,OAAO,IAAI,eAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;IAClD,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,aAAsB,KAAK;QAChC,OAAO,CAAC,UAAU,CAAC,CAAC;YAChB,IAAI,CAAC,KAAK,CAAC,CAAC;YACZ,IAAI,CAAC,KAAK,CAAC,MAAM,CACb,iBAAS,CAAC,KAAK,EACf,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAS,CAAC,KAAK,CAAC,CAClC,CAAC;IACV,CAAC;IAED;;;OAGG;IACH,WAAW,CAAC,aAAsB,KAAK;QACnC,MAAM,QAAQ,GAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3C,IAAI,UAAU,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAC5D,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC9C;QACD,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ;AA/CD,8BA+CC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make all the locals available
|
|
3
|
-
*
|
|
4
|
-
* Created on March 06, 2020
|
|
5
|
-
* @author Ralph Florent <ralflornt@gmail.com>
|
|
6
|
-
*/
|
|
7
|
-
export * from './name';
|
|
8
|
-
export * from './firstname';
|
|
9
|
-
export * from './lastname';
|
|
10
|
-
export * from './enums';
|
|
11
|
-
export * from './summary';
|
|
12
|
-
export * from './misc';
|
package/dist/lib/models/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
/**
|
|
5
|
-
* Make all the locals available
|
|
6
|
-
*
|
|
7
|
-
* Created on March 06, 2020
|
|
8
|
-
* @author Ralph Florent <ralflornt@gmail.com>
|
|
9
|
-
*/
|
|
10
|
-
tslib_1.__exportStar(require("./name"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./firstname"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./lastname"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./enums"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./summary"), exports);
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,iDAAuB;AACvB,sDAA4B;AAC5B,qDAA2B;AAC3B,kDAAwB;AACxB,oDAA0B"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Last name class definition
|
|
3
|
-
*
|
|
4
|
-
* Created on March 06, 2020
|
|
5
|
-
* @author Ralph Florent <ralflornt@gmail.com>
|
|
6
|
-
*/
|
|
7
|
-
import { Name, Summary, LastnameFormat } from './index';
|
|
8
|
-
/**
|
|
9
|
-
* Represents a last name with some extra functionalities
|
|
10
|
-
* @class
|
|
11
|
-
* @extends Name
|
|
12
|
-
*/
|
|
13
|
-
export declare class Lastname extends Name {
|
|
14
|
-
father: string;
|
|
15
|
-
mother?: string;
|
|
16
|
-
private format;
|
|
17
|
-
/**
|
|
18
|
-
* Constructs a `Lastname`
|
|
19
|
-
* @param {string} father a piece of string that will be defined as a namon
|
|
20
|
-
* @param {string} [mother] additional pieces considered as a last name
|
|
21
|
-
* @param {LastnameFormat} [format] how to output a surname considering its
|
|
22
|
-
* subparts
|
|
23
|
-
*/
|
|
24
|
-
constructor(father: string, mother?: string, format?: LastnameFormat);
|
|
25
|
-
/**
|
|
26
|
-
* Gives some descriptive statistics that summarize the central tendency,
|
|
27
|
-
* dispersion and shape of the characters' distribution.
|
|
28
|
-
* @param {LastnameFormat} [format] overrides the how-to format of a surname
|
|
29
|
-
* output, considering its subparts.
|
|
30
|
-
* @see {@link describe} in `Namefully` class for further information
|
|
31
|
-
*/
|
|
32
|
-
describe(format?: LastnameFormat): Summary;
|
|
33
|
-
/**
|
|
34
|
-
* Returns a string representation of the last name
|
|
35
|
-
* @param {LastnameFormat} [format] overrides the how-to format of a surname
|
|
36
|
-
* output, considering its subparts.
|
|
37
|
-
*/
|
|
38
|
-
tostring(format?: LastnameFormat): string;
|
|
39
|
-
/**
|
|
40
|
-
* Gets the initials of the last name
|
|
41
|
-
* @returns {Array<string>} the initials
|
|
42
|
-
*/
|
|
43
|
-
getInitials(format?: LastnameFormat): string[];
|
|
44
|
-
}
|