spoclip-kit 1.0.3 → 1.0.6
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 +15 -51
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/libs/cost.d.ts +1 -1
- package/dist/libs/cost.d.ts.map +1 -1
- package/dist/libs/index.d.ts +2 -2
- package/dist/libs/index.esm.js +2 -2
- package/dist/libs/index.esm.js.map +1 -1
- package/dist/libs/index.js +2 -2
- package/dist/libs/index.js.map +1 -1
- package/dist/libs/libs/cost.d.ts +1 -1
- package/dist/libs/libs/cost.d.ts.map +1 -1
- package/dist/libs/libs/index.d.ts +1 -1
- package/dist/libs/libs/index.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,38 +13,17 @@ npm install spoclip-kit
|
|
|
13
13
|
### Import specific modules
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import {
|
|
17
|
-
import { add, multiply } from '@spoclip-kit/math';
|
|
16
|
+
import { getVideoDownloadCost } from 'spoclip-kit/libs';
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
const { cost, isPlusFree } = getVideoDownloadCost({
|
|
19
|
+
ticketCode: 'PLUS',
|
|
20
|
+
duration: 1000, // in milli seconds
|
|
21
|
+
isFullTime: false,
|
|
22
|
+
quality: '4K',
|
|
23
|
+
remainingFreeDownloads: 20,
|
|
24
|
+
});
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
### Import everything
|
|
28
|
-
|
|
29
|
-
```typescript
|
|
30
|
-
import { test, add, multiply } from 'spoclip-kit';
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Available Modules
|
|
34
|
-
|
|
35
|
-
### Utils (`@spoclip-kit/utils`)
|
|
36
|
-
|
|
37
|
-
- `test()` - Logs 'test' to console
|
|
38
|
-
|
|
39
|
-
### Math (`@spoclip-kit/math`)
|
|
40
|
-
|
|
41
|
-
- `add(a, b)` - Add two numbers
|
|
42
|
-
- `subtract(a, b)` - Subtract two numbers
|
|
43
|
-
- `multiply(a, b)` - Multiply two numbers
|
|
44
|
-
- `divide(a, b)` - Divide two numbers
|
|
45
|
-
- `PI` - Math.PI constant
|
|
46
|
-
- `E` - Math.E constant
|
|
47
|
-
|
|
48
27
|
## Development
|
|
49
28
|
|
|
50
29
|
### Setup
|
|
@@ -53,37 +32,22 @@ import { test, add, multiply } from 'spoclip-kit';
|
|
|
53
32
|
npm install
|
|
54
33
|
```
|
|
55
34
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
npm run build
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### Test
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
npm run test
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Lint
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
npm run lint
|
|
72
|
-
```
|
|
35
|
+
## Publishing
|
|
73
36
|
|
|
74
|
-
|
|
37
|
+
spoclip 계정으로 로그인 후
|
|
75
38
|
|
|
76
39
|
```bash
|
|
77
|
-
npm
|
|
40
|
+
npm login
|
|
78
41
|
```
|
|
79
42
|
|
|
80
|
-
## Publishing
|
|
81
|
-
|
|
82
43
|
```bash
|
|
83
|
-
npm
|
|
44
|
+
npm release:patch
|
|
45
|
+
npm release:minor
|
|
46
|
+
npm release:major
|
|
84
47
|
```
|
|
85
48
|
|
|
86
49
|
## License
|
|
87
50
|
|
|
88
51
|
MIT
|
|
52
|
+
|
|
89
53
|
# spoclip-kit
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { TicketCode } from '@/types/membership';
|
|
|
13
13
|
*
|
|
14
14
|
* @returns - 다운로드 비용
|
|
15
15
|
*/
|
|
16
|
-
declare function
|
|
16
|
+
declare function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remainingFreeDownloads, }: {
|
|
17
17
|
duration: number;
|
|
18
18
|
isFullTime: boolean;
|
|
19
19
|
quality: '2K' | '4K';
|
|
@@ -24,4 +24,4 @@ declare function getDownloadCost({ duration, isFullTime, quality, ticketCode, re
|
|
|
24
24
|
isPlusFree: boolean;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
export {
|
|
27
|
+
export { getVideoDownloadCost };
|
package/dist/index.esm.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* @returns - 다운로드 비용
|
|
13
13
|
*/
|
|
14
|
-
function
|
|
14
|
+
function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remainingFreeDownloads, }) {
|
|
15
15
|
if (isFullTime && quality === '4K') {
|
|
16
16
|
return { cost: 20, isPlusFree: false };
|
|
17
17
|
}
|
|
@@ -26,5 +26,5 @@ function getDownloadCost({ duration, isFullTime, quality, ticketCode, remainingF
|
|
|
26
26
|
return { cost, isPlusFree: false };
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export {
|
|
29
|
+
export { getVideoDownloadCost };
|
|
30
30
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEA;;;;;;;;;;;;AAYG;AACG,SAAU,
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEA;;;;;;;;;;;;AAYG;AACG,SAAU,oBAAoB,CAAC,EACnC,QAAQ,EACR,UAAU,EACV,OAAO,EACP,UAAU,EACV,sBAAsB,GAOvB,EAAA;AACC,IAAA,IAAI,UAAU,IAAI,OAAO,KAAK,IAAI,EAAE;QAClC,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;IACxC;AAEA,IAAA,MAAM,iBAAiB,GAAG,QAAQ,GAAG,IAAI;AACzC,IAAA,MAAM,SAAS,GAAG,iBAAiB,GAAG,EAAE;AACxC,IAAA,MAAM,MAAM,GAAG,UAAU,KAAK,MAAM;IAEpC,IAAI,MAAM,IAAI,sBAAsB,GAAG,CAAC,IAAI,SAAS,EAAE;QACrD,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE;IACtC;AAEA,IAAA,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE;AAC5B,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,GAAG,aAAa,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;AACxE,IAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;AACpC;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @returns - 다운로드 비용
|
|
15
15
|
*/
|
|
16
|
-
function
|
|
16
|
+
function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remainingFreeDownloads, }) {
|
|
17
17
|
if (isFullTime && quality === '4K') {
|
|
18
18
|
return { cost: 20, isPlusFree: false };
|
|
19
19
|
}
|
|
@@ -28,5 +28,5 @@ function getDownloadCost({ duration, isFullTime, quality, ticketCode, remainingF
|
|
|
28
28
|
return { cost, isPlusFree: false };
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
exports.
|
|
31
|
+
exports.getVideoDownloadCost = getVideoDownloadCost;
|
|
32
32
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;;;;;;;;AAYG;AACG,SAAU,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;;;;;;;;AAYG;AACG,SAAU,oBAAoB,CAAC,EACnC,QAAQ,EACR,UAAU,EACV,OAAO,EACP,UAAU,EACV,sBAAsB,GAOvB,EAAA;AACC,IAAA,IAAI,UAAU,IAAI,OAAO,KAAK,IAAI,EAAE;QAClC,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;IACxC;AAEA,IAAA,MAAM,iBAAiB,GAAG,QAAQ,GAAG,IAAI;AACzC,IAAA,MAAM,SAAS,GAAG,iBAAiB,GAAG,EAAE;AACxC,IAAA,MAAM,MAAM,GAAG,UAAU,KAAK,MAAM;IAEpC,IAAI,MAAM,IAAI,sBAAsB,GAAG,CAAC,IAAI,SAAS,EAAE;QACrD,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE;IACtC;AAEA,IAAA,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE;AAC5B,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,GAAG,aAAa,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;AACxE,IAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;AACpC;;;;"}
|
package/dist/libs/cost.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import type { TicketCode } from '@/types/membership';
|
|
|
12
12
|
*
|
|
13
13
|
* @returns - 다운로드 비용
|
|
14
14
|
*/
|
|
15
|
-
export declare function
|
|
15
|
+
export declare function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remainingFreeDownloads, }: {
|
|
16
16
|
duration: number;
|
|
17
17
|
isFullTime: boolean;
|
|
18
18
|
quality: '2K' | '4K';
|
package/dist/libs/cost.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/libs/cost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,wBAAgB,
|
|
1
|
+
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/libs/cost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,UAAU,EACV,OAAO,EACP,UAAU,EACV,sBAAsB,GACvB,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;CAChC;;;EAgBA"}
|
package/dist/libs/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { TicketCode } from '@/types/membership';
|
|
|
13
13
|
*
|
|
14
14
|
* @returns - 다운로드 비용
|
|
15
15
|
*/
|
|
16
|
-
declare function
|
|
16
|
+
declare function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remainingFreeDownloads, }: {
|
|
17
17
|
duration: number;
|
|
18
18
|
isFullTime: boolean;
|
|
19
19
|
quality: '2K' | '4K';
|
|
@@ -24,4 +24,4 @@ declare function getDownloadCost({ duration, isFullTime, quality, ticketCode, re
|
|
|
24
24
|
isPlusFree: boolean;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
export {
|
|
27
|
+
export { getVideoDownloadCost };
|
package/dist/libs/index.esm.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* @returns - 다운로드 비용
|
|
13
13
|
*/
|
|
14
|
-
function
|
|
14
|
+
function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remainingFreeDownloads, }) {
|
|
15
15
|
if (isFullTime && quality === '4K') {
|
|
16
16
|
return { cost: 20, isPlusFree: false };
|
|
17
17
|
}
|
|
@@ -26,5 +26,5 @@ function getDownloadCost({ duration, isFullTime, quality, ticketCode, remainingF
|
|
|
26
26
|
return { cost, isPlusFree: false };
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export {
|
|
29
|
+
export { getVideoDownloadCost };
|
|
30
30
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEA;;;;;;;;;;;;AAYG;AACG,SAAU,
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEA;;;;;;;;;;;;AAYG;AACG,SAAU,oBAAoB,CAAC,EACnC,QAAQ,EACR,UAAU,EACV,OAAO,EACP,UAAU,EACV,sBAAsB,GAOvB,EAAA;AACC,IAAA,IAAI,UAAU,IAAI,OAAO,KAAK,IAAI,EAAE;QAClC,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;IACxC;AAEA,IAAA,MAAM,iBAAiB,GAAG,QAAQ,GAAG,IAAI;AACzC,IAAA,MAAM,SAAS,GAAG,iBAAiB,GAAG,EAAE;AACxC,IAAA,MAAM,MAAM,GAAG,UAAU,KAAK,MAAM;IAEpC,IAAI,MAAM,IAAI,sBAAsB,GAAG,CAAC,IAAI,SAAS,EAAE;QACrD,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE;IACtC;AAEA,IAAA,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE;AAC5B,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,GAAG,aAAa,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;AACxE,IAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;AACpC;;;;"}
|
package/dist/libs/index.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @returns - 다운로드 비용
|
|
15
15
|
*/
|
|
16
|
-
function
|
|
16
|
+
function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remainingFreeDownloads, }) {
|
|
17
17
|
if (isFullTime && quality === '4K') {
|
|
18
18
|
return { cost: 20, isPlusFree: false };
|
|
19
19
|
}
|
|
@@ -28,5 +28,5 @@ function getDownloadCost({ duration, isFullTime, quality, ticketCode, remainingF
|
|
|
28
28
|
return { cost, isPlusFree: false };
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
exports.
|
|
31
|
+
exports.getVideoDownloadCost = getVideoDownloadCost;
|
|
32
32
|
//# sourceMappingURL=index.js.map
|
package/dist/libs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;;;;;;;;AAYG;AACG,SAAU,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;;;;;;;;;AAYG;AACG,SAAU,oBAAoB,CAAC,EACnC,QAAQ,EACR,UAAU,EACV,OAAO,EACP,UAAU,EACV,sBAAsB,GAOvB,EAAA;AACC,IAAA,IAAI,UAAU,IAAI,OAAO,KAAK,IAAI,EAAE;QAClC,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;IACxC;AAEA,IAAA,MAAM,iBAAiB,GAAG,QAAQ,GAAG,IAAI;AACzC,IAAA,MAAM,SAAS,GAAG,iBAAiB,GAAG,EAAE;AACxC,IAAA,MAAM,MAAM,GAAG,UAAU,KAAK,MAAM;IAEpC,IAAI,MAAM,IAAI,sBAAsB,GAAG,CAAC,IAAI,SAAS,EAAE;QACrD,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE;IACtC;AAEA,IAAA,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE;AAC5B,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,GAAG,aAAa,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;AACxE,IAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;AACpC;;;;"}
|
package/dist/libs/libs/cost.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import type { TicketCode } from '@/types/membership';
|
|
|
12
12
|
*
|
|
13
13
|
* @returns - 다운로드 비용
|
|
14
14
|
*/
|
|
15
|
-
export declare function
|
|
15
|
+
export declare function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remainingFreeDownloads, }: {
|
|
16
16
|
duration: number;
|
|
17
17
|
isFullTime: boolean;
|
|
18
18
|
quality: '2K' | '4K';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/libs/cost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,wBAAgB,
|
|
1
|
+
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/libs/cost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,UAAU,EACV,OAAO,EACP,UAAU,EACV,sBAAsB,GACvB,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;CAChC;;;EAgBA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { getVideoDownloadCost } from './cost';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/libs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/libs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC"}
|