@teambit/toolbox.string.strip-trailing-char 0.0.498 → 0.0.499
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.js +18 -4
- package/dist/index.js.map +1 -1
- package/dist/strip-trailing-char.js +11 -7
- package/dist/strip-trailing-char.js.map +1 -1
- package/package.json +4 -4
- package/types/asset.d.ts +15 -3
- package/dist/preview-1736711473672.js +0 -7
package/dist/index.js
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "stripTrailingChar", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _stripTrailingChar().stripTrailingChar;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
function _stripTrailingChar() {
|
|
13
|
+
const data = require("./strip-trailing-char");
|
|
14
|
+
_stripTrailingChar = function () {
|
|
15
|
+
return data;
|
|
16
|
+
};
|
|
17
|
+
return data;
|
|
18
|
+
}
|
|
19
|
+
|
|
6
20
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_stripTrailingChar","data","require"],"sources":["index.ts"],"sourcesContent":["export { stripTrailingChar } from './strip-trailing-char';\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,mBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,kBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.stripTrailingChar = stripTrailingChar;
|
|
4
7
|
/**
|
|
5
8
|
* strip a trailing from a string.
|
|
@@ -7,12 +10,13 @@ exports.stripTrailingChar = stripTrailingChar;
|
|
|
7
10
|
* @param char char to strip.
|
|
8
11
|
*/
|
|
9
12
|
function stripTrailingChar(str, char) {
|
|
10
|
-
|
|
11
|
-
return str;
|
|
12
|
-
}
|
|
13
|
-
if (str[str.length - 1] === char) {
|
|
14
|
-
return str.slice(0, -1);
|
|
15
|
-
}
|
|
13
|
+
if (!str || !char) {
|
|
16
14
|
return str;
|
|
15
|
+
}
|
|
16
|
+
if (str[str.length - 1] === char) {
|
|
17
|
+
return str.slice(0, -1);
|
|
18
|
+
}
|
|
19
|
+
return str;
|
|
17
20
|
}
|
|
21
|
+
|
|
18
22
|
//# sourceMappingURL=strip-trailing-char.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["stripTrailingChar","str","char","length","slice"],"sources":["strip-trailing-char.ts"],"sourcesContent":["/**\n * strip a trailing from a string.\n * @param str string to apply on.\n * @param char char to strip.\n */\nexport function stripTrailingChar(str: string, char: string): string {\n if (!str || !char) {\n return str;\n }\n if (str[str.length - 1] === char) {\n return str.slice(0, -1);\n }\n return str;\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACO,SAASA,iBAAiBA,CAACC,GAAW,EAAEC,IAAY,EAAU;EACnE,IAAI,CAACD,GAAG,IAAI,CAACC,IAAI,EAAE;IACjB,OAAOD,GAAG;EACZ;EACA,IAAIA,GAAG,CAACA,GAAG,CAACE,MAAM,GAAG,CAAC,CAAC,KAAKD,IAAI,EAAE;IAChC,OAAOD,GAAG,CAACG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EACzB;EACA,OAAOH,GAAG;AACZ","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/toolbox.string.strip-trailing-char",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.499",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/toolbox/string/strip-trailing-char",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.toolbox",
|
|
8
8
|
"name": "string/strip-trailing-char",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.499"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@types/mocha": "9.1.0",
|
|
14
|
-
"
|
|
15
|
-
"@
|
|
14
|
+
"chai": "4.3.0",
|
|
15
|
+
"@teambit/node.envs.node-babel-mocha": "0.1.4"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {},
|
|
18
18
|
"license": "Apache-2.0",
|
package/types/asset.d.ts
CHANGED
|
@@ -5,12 +5,12 @@ declare module '*.png' {
|
|
|
5
5
|
declare module '*.svg' {
|
|
6
6
|
import type { FunctionComponent, SVGProps } from 'react';
|
|
7
7
|
|
|
8
|
-
export const ReactComponent: FunctionComponent<
|
|
8
|
+
export const ReactComponent: FunctionComponent<
|
|
9
|
+
SVGProps<SVGSVGElement> & { title?: string }
|
|
10
|
+
>;
|
|
9
11
|
const src: string;
|
|
10
12
|
export default src;
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
// @TODO Gilad
|
|
14
14
|
declare module '*.jpg' {
|
|
15
15
|
const value: any;
|
|
16
16
|
export = value;
|
|
@@ -27,3 +27,15 @@ declare module '*.bmp' {
|
|
|
27
27
|
const value: any;
|
|
28
28
|
export = value;
|
|
29
29
|
}
|
|
30
|
+
declare module '*.otf' {
|
|
31
|
+
const value: any;
|
|
32
|
+
export = value;
|
|
33
|
+
}
|
|
34
|
+
declare module '*.woff' {
|
|
35
|
+
const value: any;
|
|
36
|
+
export = value;
|
|
37
|
+
}
|
|
38
|
+
declare module '*.woff2' {
|
|
39
|
+
const value: any;
|
|
40
|
+
export = value;
|
|
41
|
+
}
|