@ibiliaze/stringman 1.0.1 → 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.
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ superTrim: (stringData: any) => any;
3
+ megaTrim: (stringData: any) => any;
4
+ dp: (int: any, i: any) => number;
5
+ };
6
+ export default _default;
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ superTrim: (stringData) => stringData.replace(/\s\s+/g, " ").trim(),
5
+ megaTrim: (stringData) => stringData.replace(/\s\s+/g, ""),
6
+ dp: (int, i) => (typeof int === "number" ? +int.toFixed(i) : 0),
7
+ };
package/package.json CHANGED
@@ -1,11 +1,17 @@
1
1
  {
2
2
  "name": "@ibiliaze/stringman",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
4
4
  "description": "",
5
- "main": "index.js",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
6
7
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
+ "build": "tsc",
9
+ "pub": "npm publish --access public",
10
+ "git": "git add .; git commit -m 'changes'; git tag -a v1.2.0 -m 'v1.2.0'; git push origin v1.2.0; git push"
8
11
  },
9
12
  "author": "Ibi Hasanli",
10
- "license": "ISC"
13
+ "license": "ISC",
14
+ "devDependencies": {
15
+ "typescript": "^5.0.0"
16
+ }
11
17
  }
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ export default {
2
+ superTrim: (stringData) => stringData.replace(/\s\s+/g, " ").trim(),
3
+ megaTrim: (stringData) => stringData.replace(/\s\s+/g, ""),
4
+ dp: (int, i) => (typeof int === "number" ? +int.toFixed(i) : 0),
5
+ };
package/tsconfig.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "compilerOptions": {
3
+ "outDir": "dist",
4
+ "declaration": true,
5
+ "module": "commonjs",
6
+ "target": "es6"
7
+ },
8
+ "include": ["src/**/*"]
9
+ }
package/index.js DELETED
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- superTrim: stringData => stringData.replace(/\s\s+/g, ' ').trim(),
3
- megaTrim: stringData => stringData.replace(/\s\s+/g, ''),
4
- };