citrica-ui-toolkit 0.0.1
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-browser/index.js +27 -0
- package/dist-node/index.js +33 -0
- package/package.json +14 -0
- package/src/index.ts +29 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param a number
|
|
4
|
+
* @param b number
|
|
5
|
+
* @returns sum of a and b
|
|
6
|
+
*/
|
|
7
|
+
export var add = function (a, b) {
|
|
8
|
+
return a + b;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @param a number
|
|
13
|
+
* @param b number
|
|
14
|
+
* @returns difference of a and b
|
|
15
|
+
*/
|
|
16
|
+
export var subtract = function (a, b) {
|
|
17
|
+
return a - b;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @param a number
|
|
22
|
+
* @param b number
|
|
23
|
+
* @returns product of a and b
|
|
24
|
+
*/
|
|
25
|
+
export var multiply = function (a, b) {
|
|
26
|
+
return a * b;
|
|
27
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.multiply = exports.subtract = exports.add = void 0;
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param a number
|
|
7
|
+
* @param b number
|
|
8
|
+
* @returns sum of a and b
|
|
9
|
+
*/
|
|
10
|
+
var add = function (a, b) {
|
|
11
|
+
return a + b;
|
|
12
|
+
};
|
|
13
|
+
exports.add = add;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param a number
|
|
17
|
+
* @param b number
|
|
18
|
+
* @returns difference of a and b
|
|
19
|
+
*/
|
|
20
|
+
var subtract = function (a, b) {
|
|
21
|
+
return a - b;
|
|
22
|
+
};
|
|
23
|
+
exports.subtract = subtract;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param a number
|
|
27
|
+
* @param b number
|
|
28
|
+
* @returns product of a and b
|
|
29
|
+
*/
|
|
30
|
+
var multiply = function (a, b) {
|
|
31
|
+
return a * b;
|
|
32
|
+
};
|
|
33
|
+
exports.multiply = multiply;
|
package/package.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "citrica-ui-toolkit",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "dist-node/index.js",
|
|
5
|
+
"browser": "dist-browser/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build-browser": "tsc src/index.ts --outDir dist-browser --module ES6",
|
|
8
|
+
"build-node": "tsc src/index.ts --outDir dist-node",
|
|
9
|
+
"build": "npm run build-browser && npm run build-node"
|
|
10
|
+
},
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"typescript": "5.9.3"
|
|
13
|
+
}
|
|
14
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param a number
|
|
4
|
+
* @param b number
|
|
5
|
+
* @returns sum of a and b
|
|
6
|
+
*/
|
|
7
|
+
export const add = (a: number, b: number): number => {
|
|
8
|
+
return a + b;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param a number
|
|
14
|
+
* @param b number
|
|
15
|
+
* @returns difference of a and b
|
|
16
|
+
*/
|
|
17
|
+
export const subtract = (a: number, b: number): number => {
|
|
18
|
+
return a - b;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param a number
|
|
24
|
+
* @param b number
|
|
25
|
+
* @returns product of a and b
|
|
26
|
+
*/
|
|
27
|
+
export const multiply = (a: number, b: number): number => {
|
|
28
|
+
return a * b;
|
|
29
|
+
};
|