grm-shared-library 1.0.15 → 1.0.17
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/README.md
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grm-shared-library",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -8,10 +8,7 @@
|
|
|
8
8
|
],
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsc",
|
|
11
|
-
"
|
|
12
|
-
"prepare": "npm run build",
|
|
13
|
-
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
|
14
|
-
"type-check": "tsc --noEmit"
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
15
12
|
},
|
|
16
13
|
"keywords": [],
|
|
17
14
|
"author": "",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SentenceCase = SentenceCase;
|
|
4
|
-
exports.UpperCase = UpperCase;
|
|
5
|
-
exports.LowerCase = LowerCase;
|
|
6
|
-
const class_transformer_1 = require("class-transformer");
|
|
7
|
-
function SentenceCase() {
|
|
8
|
-
return (0, class_transformer_1.Transform)(({ value }) => {
|
|
9
|
-
if (typeof value !== 'string') {
|
|
10
|
-
return value;
|
|
11
|
-
}
|
|
12
|
-
return value
|
|
13
|
-
.split(' ')
|
|
14
|
-
.map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
15
|
-
.join(' ');
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function UpperCase() {
|
|
19
|
-
return (0, class_transformer_1.Transform)(({ value }) => {
|
|
20
|
-
if (typeof value !== 'string') {
|
|
21
|
-
return value;
|
|
22
|
-
}
|
|
23
|
-
return value.toUpperCase();
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
function LowerCase() {
|
|
27
|
-
return (0, class_transformer_1.Transform)(({ value }) => typeof value === "string" ? value.toLowerCase() : value);
|
|
28
|
-
}
|