@ibiliaze/stringman 3.3.0 → 3.4.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/dist/index.d.ts CHANGED
@@ -138,3 +138,8 @@ export declare const isVideoUrl: (url: string) => boolean;
138
138
  * @throws Error if no endpoint returns a valid IP.
139
139
  */
140
140
  export declare const getPublicIP: () => Promise<string>;
141
+ export declare const getTicketId: ({ fixtureId, sectionName, seatName, }: {
142
+ fixtureId: string;
143
+ sectionName: string;
144
+ seatName: string;
145
+ }) => string;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getPublicIP = exports.isVideoUrl = exports.getRandomString = exports.extractImageSrcs = exports.select = exports.query = exports.getCloudinaryPublicId = exports.dp = exports.megaTrim = exports.superTrim = void 0;
3
+ exports.getTicketId = exports.getPublicIP = exports.isVideoUrl = exports.getRandomString = exports.extractImageSrcs = exports.select = exports.query = exports.getCloudinaryPublicId = exports.dp = exports.megaTrim = exports.superTrim = void 0;
4
4
  /**
5
5
  * Clean up extra whitespace in a string.
6
6
  *
@@ -228,3 +228,5 @@ const getPublicIP = async () => {
228
228
  throw new Error('Public IP unavailable');
229
229
  };
230
230
  exports.getPublicIP = getPublicIP;
231
+ const getTicketId = ({ fixtureId, sectionName, seatName, }) => `${sectionName}-${seatName}-${fixtureId}`;
232
+ exports.getTicketId = getTicketId;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@ibiliaze/stringman",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "tsc",
9
9
  "pub": "npm publish --access public",
10
- "git": "git add .; git commit -m 'changes'; git tag -a v3.3.0 -m 'v3.3.0'; git push origin v3.3.0; git push",
10
+ "git": "git add .; git commit -m 'changes'; git tag -a v3.4.0 -m 'v3.4.0'; git push origin v3.4.0; git push",
11
11
  "push": "npm run build; npm run git; npm run pub"
12
12
  },
13
13
  "author": "Ibi Hasanli",
package/src/index.ts CHANGED
@@ -227,3 +227,13 @@ export const getPublicIP = async (): Promise<string> => {
227
227
  }
228
228
  throw new Error('Public IP unavailable');
229
229
  };
230
+
231
+ export const getTicketId = ({
232
+ fixtureId,
233
+ sectionName,
234
+ seatName,
235
+ }: {
236
+ fixtureId: string;
237
+ sectionName: string;
238
+ seatName: string;
239
+ }) => `${sectionName}-${seatName}-${fixtureId}`;