narou 1.2.0 → 2.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/LICENSE +21 -0
- package/README.md +73 -37
- package/dist/index.browser.cjs +90 -1360
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +14 -20
- package/dist/index.browser.d.mts +49 -0
- package/dist/index.browser.mjs +68 -0
- package/dist/index.browser.mjs.map +1 -0
- package/dist/index.cjs +147 -1410
- package/dist/index.cjs.map +1 -1
- package/dist/index.common-8lS2K_1Y.mjs +1166 -0
- package/dist/index.common-8lS2K_1Y.mjs.map +1 -0
- package/dist/index.common-CYj0n0aU.cjs +1346 -0
- package/dist/index.common-CYj0n0aU.cjs.map +1 -0
- package/dist/index.d.cts +28 -21
- package/dist/index.d.mts +63 -0
- package/dist/index.mjs +128 -0
- package/dist/index.mjs.map +1 -0
- package/dist/user-search-BY6FdEe7.d.cts +1394 -0
- package/dist/user-search-Besgk-Hx.d.mts +1394 -0
- package/package.json +28 -37
- package/pnpm-lock.yaml +1325 -1100
- package/src/index.browser.ts +5 -1
- package/src/index.ts +5 -1
- package/src/narou-fetch.ts +4 -3
- package/src/narou-jsonp.ts +4 -2
- package/src/narou.ts +50 -13
- package/src/params.ts +1 -1
- package/src/ranking.ts +20 -11
- package/src/search-builder-r18.ts +6 -2
- package/src/search-builder.ts +7 -3
- package/src/user-search.ts +9 -2
- package/dist/chunk-3A5MHPWL.js +0 -37
- package/dist/chunk-3A5MHPWL.js.map +0 -1
- package/dist/chunk-4ZP5YNWI.js +0 -1
- package/dist/chunk-4ZP5YNWI.js.map +0 -1
- package/dist/chunk-5UDKQCPJ.js +0 -407
- package/dist/chunk-5UDKQCPJ.js.map +0 -1
- package/dist/chunk-6BZWV4ZC.js +0 -75
- package/dist/chunk-6BZWV4ZC.js.map +0 -1
- package/dist/chunk-BQLSW236.js +0 -117
- package/dist/chunk-BQLSW236.js.map +0 -1
- package/dist/chunk-DEQICAN3.js +0 -94
- package/dist/chunk-DEQICAN3.js.map +0 -1
- package/dist/chunk-E2H3AJSQ.js +0 -57
- package/dist/chunk-E2H3AJSQ.js.map +0 -1
- package/dist/chunk-HOBLKBZ6.js +0 -452
- package/dist/chunk-HOBLKBZ6.js.map +0 -1
- package/dist/chunk-IPDEGCWU.js +0 -39
- package/dist/chunk-IPDEGCWU.js.map +0 -1
- package/dist/chunk-LQLNWSWV.js +0 -26
- package/dist/chunk-LQLNWSWV.js.map +0 -1
- package/dist/chunk-PLEM2AOH.js +0 -44
- package/dist/chunk-PLEM2AOH.js.map +0 -1
- package/dist/chunk-RNHRR56W.js +0 -25
- package/dist/chunk-RNHRR56W.js.map +0 -1
- package/dist/chunk-VUZIISP2.js +0 -23
- package/dist/chunk-VUZIISP2.js.map +0 -1
- package/dist/chunk-VZVUANDN.js +0 -17
- package/dist/chunk-VZVUANDN.js.map +0 -1
- package/dist/index.browser.d.ts +0 -55
- package/dist/index.browser.js +0 -126
- package/dist/index.browser.js.map +0 -1
- package/dist/index.common.cjs +0 -1187
- package/dist/index.common.cjs.map +0 -1
- package/dist/index.common.d.cts +0 -6
- package/dist/index.common.d.ts +0 -6
- package/dist/index.common.js +0 -76
- package/dist/index.common.js.map +0 -1
- package/dist/index.d.ts +0 -56
- package/dist/index.js +0 -131
- package/dist/index.js.map +0 -1
- package/dist/narou-DBa12V_l.d.ts +0 -404
- package/dist/narou-DCp4aGfA.d.cts +0 -404
- package/dist/narou-fetch.cjs +0 -164
- package/dist/narou-fetch.cjs.map +0 -1
- package/dist/narou-fetch.d.cts +0 -20
- package/dist/narou-fetch.d.ts +0 -20
- package/dist/narou-fetch.js +0 -10
- package/dist/narou-fetch.js.map +0 -1
- package/dist/narou-jsonp.cjs +0 -162
- package/dist/narou-jsonp.cjs.map +0 -1
- package/dist/narou-jsonp.d.cts +0 -13
- package/dist/narou-jsonp.d.ts +0 -13
- package/dist/narou-jsonp.js +0 -10
- package/dist/narou-jsonp.js.map +0 -1
- package/dist/narou-ranking-results.cjs +0 -19
- package/dist/narou-ranking-results.cjs.map +0 -1
- package/dist/narou-ranking-results.d.cts +0 -4
- package/dist/narou-ranking-results.d.ts +0 -4
- package/dist/narou-ranking-results.js +0 -1
- package/dist/narou-ranking-results.js.map +0 -1
- package/dist/narou-search-results-C21hWrnL.d.cts +0 -727
- package/dist/narou-search-results-DT0YdaBn.d.ts +0 -727
- package/dist/narou-search-results.cjs +0 -62
- package/dist/narou-search-results.cjs.map +0 -1
- package/dist/narou-search-results.d.cts +0 -2
- package/dist/narou-search-results.d.ts +0 -2
- package/dist/narou-search-results.js +0 -11
- package/dist/narou-search-results.js.map +0 -1
- package/dist/narou.cjs +0 -112
- package/dist/narou.cjs.map +0 -1
- package/dist/narou.d.cts +0 -4
- package/dist/narou.d.ts +0 -4
- package/dist/narou.js +0 -8
- package/dist/narou.js.map +0 -1
- package/dist/params.cjs +0 -448
- package/dist/params.cjs.map +0 -1
- package/dist/params.d.cts +0 -2
- package/dist/params.d.ts +0 -2
- package/dist/params.js +0 -41
- package/dist/params.js.map +0 -1
- package/dist/ranking-history.cjs +0 -47
- package/dist/ranking-history.cjs.map +0 -1
- package/dist/ranking-history.d.cts +0 -28
- package/dist/ranking-history.d.ts +0 -28
- package/dist/ranking-history.js +0 -8
- package/dist/ranking-history.js.map +0 -1
- package/dist/ranking.cjs +0 -783
- package/dist/ranking.cjs.map +0 -1
- package/dist/ranking.d.cts +0 -108
- package/dist/ranking.d.ts +0 -108
- package/dist/ranking.js +0 -10
- package/dist/ranking.js.map +0 -1
- package/dist/search-builder-r18.cjs +0 -547
- package/dist/search-builder-r18.cjs.map +0 -1
- package/dist/search-builder-r18.d.cts +0 -45
- package/dist/search-builder-r18.d.ts +0 -45
- package/dist/search-builder-r18.js +0 -9
- package/dist/search-builder-r18.js.map +0 -1
- package/dist/search-builder.cjs +0 -591
- package/dist/search-builder.cjs.map +0 -1
- package/dist/search-builder.d.cts +0 -4
- package/dist/search-builder.d.ts +0 -4
- package/dist/search-builder.js +0 -12
- package/dist/search-builder.js.map +0 -1
- package/dist/user-search.cjs +0 -325
- package/dist/user-search.cjs.map +0 -1
- package/dist/user-search.d.cts +0 -66
- package/dist/user-search.d.ts +0 -66
- package/dist/user-search.js +0 -9
- package/dist/user-search.js.map +0 -1
- package/dist/util/date.cjs +0 -51
- package/dist/util/date.cjs.map +0 -1
- package/dist/util/date.d.cts +0 -21
- package/dist/util/date.d.ts +0 -21
- package/dist/util/date.js +0 -11
- package/dist/util/date.js.map +0 -1
- package/dist/util/jsonp.cjs +0 -63
- package/dist/util/jsonp.cjs.map +0 -1
- package/dist/util/jsonp.d.cts +0 -49
- package/dist/util/jsonp.d.ts +0 -49
- package/dist/util/jsonp.js +0 -7
- package/dist/util/jsonp.js.map +0 -1
- package/dist/util/type.cjs +0 -19
- package/dist/util/type.cjs.map +0 -1
- package/dist/util/type.d.cts +0 -27
- package/dist/util/type.d.ts +0 -27
- package/dist/util/type.js +0 -1
- package/dist/util/type.js.map +0 -1
- package/dist/util/unzipp.cjs +0 -47
- package/dist/util/unzipp.cjs.map +0 -1
- package/dist/util/unzipp.d.cts +0 -12
- package/dist/util/unzipp.d.ts +0 -12
- package/dist/util/unzipp.js +0 -7
- package/dist/util/unzipp.js.map +0 -1
package/dist/user-search.d.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { s as UserSearchResult, U as UserSearchParams, p as UserOrder, f as UserFields, x as UserSearchResultFields, N as NarouSearchResults } from './narou-search-results-DT0YdaBn.js';
|
|
2
|
-
import { c as SearchBuilderBase } from './narou-DBa12V_l.js';
|
|
3
|
-
import './util/type.js';
|
|
4
|
-
import './ranking-history.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* なろうユーザ検索API
|
|
8
|
-
* @class UserSearch
|
|
9
|
-
*/
|
|
10
|
-
declare class UserSearchBuilder<TField extends keyof UserSearchResult = keyof UserSearchResult> extends SearchBuilderBase<UserSearchParams, UserOrder> {
|
|
11
|
-
/**
|
|
12
|
-
* 単語を指定できます。
|
|
13
|
-
* 半角または全角スペースで区切るとAND抽出になります。
|
|
14
|
-
* 部分一致でHITします。検索の対象はユーザ名とユーザ名のフリガナです。
|
|
15
|
-
*/
|
|
16
|
-
word(word: string): this;
|
|
17
|
-
/**
|
|
18
|
-
* 含みたくない単語を指定できます。
|
|
19
|
-
* スペースで区切ることにより含ませない単語を増やせます。部分一致で除外されます。
|
|
20
|
-
* 除外の対象はユーザ名とユーザ名のフリガナです。
|
|
21
|
-
*/
|
|
22
|
-
notWord(notword: string): this;
|
|
23
|
-
/**
|
|
24
|
-
* ユーザIDで抽出可能。
|
|
25
|
-
*/
|
|
26
|
-
userId(userid: number): this;
|
|
27
|
-
/**
|
|
28
|
-
* 抽出するユーザのユーザ名のフリガナの頭文字を指定できます。
|
|
29
|
-
* 頭文字はユーザ名のフリガナをひらがなに変換し、最初の1文字が「ぁ」~「ん」の場合に対象となります。
|
|
30
|
-
* 「ぱ」や「ば」等の半濁音や濁音は清音として扱われます。
|
|
31
|
-
* 漢字や英数字が頭文字のユーザは対象外です。
|
|
32
|
-
*/
|
|
33
|
-
name1st(name1st: string): this;
|
|
34
|
-
/**
|
|
35
|
-
* 抽出するユーザの小説投稿数の下限を指定できます。
|
|
36
|
-
* 小説投稿件数が指定された数値以上のユーザを抽出します。
|
|
37
|
-
*/
|
|
38
|
-
minNovel(minnovel: number): this;
|
|
39
|
-
/**
|
|
40
|
-
* 抽出するユーザの小説投稿数の上限を指定できます。
|
|
41
|
-
* 小説投稿件数が指定された数値以下のユーザを抽出します。
|
|
42
|
-
*/
|
|
43
|
-
maxNovel(maxnovel: number): this;
|
|
44
|
-
/**
|
|
45
|
-
* 抽出するユーザのレビュー投稿数の下限を指定できます。
|
|
46
|
-
* レビュー投稿件数が指定された数値以上のユーザを抽出します。
|
|
47
|
-
*/
|
|
48
|
-
minReview(minreview: number): this;
|
|
49
|
-
/**
|
|
50
|
-
* 抽出するユーザのレビュー投稿数の上限を指定できます。
|
|
51
|
-
* レビュー投稿件数が指定された数値以下のユーザを抽出します。
|
|
52
|
-
*/
|
|
53
|
-
maxReview(maxreview: number): this;
|
|
54
|
-
/**
|
|
55
|
-
* 出力する項目を個別に指定できます。未指定時は全項目出力されます。転送量軽減のため、このパラメータの使用が推奨されます。
|
|
56
|
-
* @return {SearchBuilder} this
|
|
57
|
-
*/
|
|
58
|
-
fields<TFields extends UserFields>(fields: TFields | readonly TFields[]): UserSearchBuilder<UserSearchResultFields<TFields>>;
|
|
59
|
-
/**
|
|
60
|
-
* なろう小説APIへのリクエストを実行する
|
|
61
|
-
* @returns ランキング
|
|
62
|
-
*/
|
|
63
|
-
execute(): Promise<NarouSearchResults<UserSearchResult, TField>>;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { UserSearchBuilder as default };
|
package/dist/user-search.js
DELETED
package/dist/user-search.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/util/date.cjs
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/util/date.ts
|
|
21
|
-
var date_exports = {};
|
|
22
|
-
__export(date_exports, {
|
|
23
|
-
addDays: () => addDays,
|
|
24
|
-
formatDate: () => formatDate,
|
|
25
|
-
parseDate: () => parseDate
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(date_exports);
|
|
28
|
-
function parseDate(dateStr) {
|
|
29
|
-
const year = parseInt(dateStr.substring(0, 4), 10);
|
|
30
|
-
const month = parseInt(dateStr.substring(4, 6), 10) - 1;
|
|
31
|
-
const day = parseInt(dateStr.substring(6, 8), 10);
|
|
32
|
-
return new Date(year, month, day, 0, 0, 0, 0);
|
|
33
|
-
}
|
|
34
|
-
function formatDate(date) {
|
|
35
|
-
const year = date.getFullYear();
|
|
36
|
-
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
37
|
-
const day = String(date.getDate()).padStart(2, "0");
|
|
38
|
-
return `${year}${month}${day}`;
|
|
39
|
-
}
|
|
40
|
-
function addDays(date, days) {
|
|
41
|
-
const result = new Date(date);
|
|
42
|
-
result.setDate(result.getDate() + days);
|
|
43
|
-
return result;
|
|
44
|
-
}
|
|
45
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
-
0 && (module.exports = {
|
|
47
|
-
addDays,
|
|
48
|
-
formatDate,
|
|
49
|
-
parseDate
|
|
50
|
-
});
|
|
51
|
-
//# sourceMappingURL=date.cjs.map
|
package/dist/util/date.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/date.ts"],"sourcesContent":["// 日付関連のユーティリティ関数\n\n/**\n * 文字列の日付(yyyyMMdd形式)をDateオブジェクトに変換する\n * @param dateStr yyyyMMdd形式の日付文字列\n * @returns Dateオブジェクト\n */\nexport function parseDate(dateStr: string): Date {\n const year = parseInt(dateStr.substring(0, 4), 10);\n const month = parseInt(dateStr.substring(4, 6), 10) - 1; // JavaScriptの月は0から始まる\n const day = parseInt(dateStr.substring(6, 8), 10);\n\n return new Date(year, month, day, 0, 0, 0, 0);\n}\n\n/**\n * 日付をyyyyMMdd形式の文字列に変換する\n * @param date 日付\n * @returns yyyyMMdd形式の文字列\n */\nexport function formatDate(date: Date): string {\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n return `${year}${month}${day}`;\n}\n\n/**\n * 指定された日数を加算した新しい日付を返す\n * @param date 元の日付\n * @param days 加算する日数\n * @returns 新しい日付\n */\nexport function addDays(date: Date, days: number): Date {\n const result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,SAAS,UAAU,SAAuB;AAC/C,QAAM,OAAO,SAAS,QAAQ,UAAU,GAAG,CAAC,GAAG,EAAE;AACjD,QAAM,QAAQ,SAAS,QAAQ,UAAU,GAAG,CAAC,GAAG,EAAE,IAAI;AACtD,QAAM,MAAM,SAAS,QAAQ,UAAU,GAAG,CAAC,GAAG,EAAE;AAEhD,SAAO,IAAI,KAAK,MAAM,OAAO,KAAK,GAAG,GAAG,GAAG,CAAC;AAC9C;AAOO,SAAS,WAAW,MAAoB;AAC7C,QAAM,OAAO,KAAK,YAAY;AAC9B,QAAM,QAAQ,OAAO,KAAK,SAAS,IAAI,CAAC,EAAE,SAAS,GAAG,GAAG;AACzD,QAAM,MAAM,OAAO,KAAK,QAAQ,CAAC,EAAE,SAAS,GAAG,GAAG;AAClD,SAAO,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG;AAC9B;AAQO,SAAS,QAAQ,MAAY,MAAoB;AACtD,QAAM,SAAS,IAAI,KAAK,IAAI;AAC5B,SAAO,QAAQ,OAAO,QAAQ,IAAI,IAAI;AACtC,SAAO;AACT;","names":[]}
|
package/dist/util/date.d.cts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 文字列の日付(yyyyMMdd形式)をDateオブジェクトに変換する
|
|
3
|
-
* @param dateStr yyyyMMdd形式の日付文字列
|
|
4
|
-
* @returns Dateオブジェクト
|
|
5
|
-
*/
|
|
6
|
-
declare function parseDate(dateStr: string): Date;
|
|
7
|
-
/**
|
|
8
|
-
* 日付をyyyyMMdd形式の文字列に変換する
|
|
9
|
-
* @param date 日付
|
|
10
|
-
* @returns yyyyMMdd形式の文字列
|
|
11
|
-
*/
|
|
12
|
-
declare function formatDate(date: Date): string;
|
|
13
|
-
/**
|
|
14
|
-
* 指定された日数を加算した新しい日付を返す
|
|
15
|
-
* @param date 元の日付
|
|
16
|
-
* @param days 加算する日数
|
|
17
|
-
* @returns 新しい日付
|
|
18
|
-
*/
|
|
19
|
-
declare function addDays(date: Date, days: number): Date;
|
|
20
|
-
|
|
21
|
-
export { addDays, formatDate, parseDate };
|
package/dist/util/date.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 文字列の日付(yyyyMMdd形式)をDateオブジェクトに変換する
|
|
3
|
-
* @param dateStr yyyyMMdd形式の日付文字列
|
|
4
|
-
* @returns Dateオブジェクト
|
|
5
|
-
*/
|
|
6
|
-
declare function parseDate(dateStr: string): Date;
|
|
7
|
-
/**
|
|
8
|
-
* 日付をyyyyMMdd形式の文字列に変換する
|
|
9
|
-
* @param date 日付
|
|
10
|
-
* @returns yyyyMMdd形式の文字列
|
|
11
|
-
*/
|
|
12
|
-
declare function formatDate(date: Date): string;
|
|
13
|
-
/**
|
|
14
|
-
* 指定された日数を加算した新しい日付を返す
|
|
15
|
-
* @param date 元の日付
|
|
16
|
-
* @param days 加算する日数
|
|
17
|
-
* @returns 新しい日付
|
|
18
|
-
*/
|
|
19
|
-
declare function addDays(date: Date, days: number): Date;
|
|
20
|
-
|
|
21
|
-
export { addDays, formatDate, parseDate };
|
package/dist/util/date.js
DELETED
package/dist/util/date.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/util/jsonp.cjs
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/util/jsonp.ts
|
|
21
|
-
var jsonp_exports = {};
|
|
22
|
-
__export(jsonp_exports, {
|
|
23
|
-
jsonp: () => jsonp
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(jsonp_exports);
|
|
26
|
-
var count = 0;
|
|
27
|
-
var noop = function() {
|
|
28
|
-
};
|
|
29
|
-
function jsonp(url, { prefix = "__jp", param = "callback", timeout = 15e3 } = {}) {
|
|
30
|
-
return new Promise(function(resolve, reject) {
|
|
31
|
-
const targetChild = document.getElementsByTagName("script").item(0);
|
|
32
|
-
const target = targetChild?.parentNode ?? document.head;
|
|
33
|
-
const id = `${prefix}${count++}`;
|
|
34
|
-
const cleanup = function() {
|
|
35
|
-
if (script && script.parentNode) {
|
|
36
|
-
script.parentNode.removeChild(script);
|
|
37
|
-
}
|
|
38
|
-
window[id] = noop;
|
|
39
|
-
if (timer) {
|
|
40
|
-
clearTimeout(timer);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const timer = timeout > 0 ? setTimeout(() => {
|
|
44
|
-
cleanup();
|
|
45
|
-
reject(new Error("Timeout"));
|
|
46
|
-
}, timeout) : void 0;
|
|
47
|
-
const callback = (data) => {
|
|
48
|
-
cleanup();
|
|
49
|
-
resolve(data);
|
|
50
|
-
};
|
|
51
|
-
window[id] = callback;
|
|
52
|
-
const script = document.createElement("script");
|
|
53
|
-
const urlObj = new URL(url);
|
|
54
|
-
urlObj.searchParams.set(param, id);
|
|
55
|
-
script.setAttribute("src", urlObj.toString());
|
|
56
|
-
target.insertBefore(script, targetChild);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
-
0 && (module.exports = {
|
|
61
|
-
jsonp
|
|
62
|
-
});
|
|
63
|
-
//# sourceMappingURL=jsonp.cjs.map
|
package/dist/util/jsonp.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/jsonp.ts"],"sourcesContent":["/**\n * MIT license\n */\n\n// Callback index.\nlet count = 0;\n\ntype CallbackId<Prefix extends string = string> = `${Prefix}${number}`;\n\ndeclare global {\n interface Window {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: CallbackId]: (data: any) => void;\n }\n}\n\n/**\n * JSONP呼び出しのオプション設定\n */\nexport type JsonpOption = {\n /**\n * コールバック関数名のプレフィックス\n * @default \"__jp\"\n */\n prefix?: string;\n \n /**\n * コールバック関数名を指定するURLパラメータ名\n * @default \"callback\"\n */\n param?: string;\n \n /**\n * タイムアウト時間(ミリ秒)\n * @default 15000\n */\n timeout?: number;\n};\n\nconst noop = function () { };\n\n/**\n * JSONPリクエストを実行してデータを取得します。\n * \n * @param url - リクエスト先のURL\n * @param options - JSONP呼び出しのオプション設定\n * @returns JSONPリクエストの結果をPromiseで返します\n * @throws {Error} タイムアウトが発生した場合、\"Timeout\"メッセージのエラーをスローします\n * \n * @example\n * ```typescript\n * // 基本的な使用方法\n * const data = await jsonp<ResponseType>('https://example.com/api');\n * \n * // オプション指定\n * const data = await jsonp<ResponseType>('https://example.com/api', {\n * prefix: 'customPrefix',\n * param: 'callbackParam',\n * timeout: 10000\n * });\n * ```\n */\nexport function jsonp<T>(\n url: string,\n { prefix = \"__jp\", param = \"callback\", timeout = 15000 }: JsonpOption = {}\n): Promise<T> {\n return new Promise(function (resolve, reject) {\n // 最初のscriptタグを取得し、そのタグの直前に新しいscriptタグを挿入するための参照を取得\n // これにより、ページの構造を大きく変えることなくscriptを追加できる\n const targetChild = document.getElementsByTagName(\"script\").item(0);\n const target = targetChild?.parentNode ?? document.head;\n\n // ユニークなコールバック関数名を生成\n const id: CallbackId = `${prefix}${count++}`;\n \n // リソース解放用の関数を定義\n // スクリプトタグの削除、コールバック関数のクリーンアップ、タイマーのクリアを行う\n const cleanup = function () {\n // Remove the script tag.\n if (script && script.parentNode) {\n script.parentNode.removeChild(script);\n }\n\n // コールバック関数を空の関数に置き換えてメモリリークを防止\n window[id] = noop;\n\n if (timer) {\n clearTimeout(timer);\n }\n };\n\n // タイムアウト処理の設定\n // 指定された時間内にレスポンスがない場合はエラーとして処理\n const timer =\n timeout > 0\n ? setTimeout(() => {\n cleanup();\n reject(new Error(\"Timeout\"));\n }, timeout)\n : undefined;\n\n // サーバーからのレスポンスを処理するコールバック関数\n const callback = (data: T) => {\n cleanup();\n resolve(data);\n };\n \n // グローバルスコープにコールバック関数を登録\n // これによりJSONPのレスポンスから関数が呼び出せるようになる\n window[id] = callback;\n\n // JSONPリクエスト用のscriptタグを作成\n const script = document.createElement(\"script\");\n const urlObj = new URL(url);\n \n // URLにコールバック関数名をパラメータとして追加\n urlObj.searchParams.set(param, id);\n script.setAttribute(\"src\", urlObj.toString());\n \n // DOMにscriptタグを挿入し、リクエストを開始\n target.insertBefore(script, targetChild);\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,IAAI,QAAQ;AAkCZ,IAAM,OAAO,WAAY;AAAE;AAuBpB,SAAS,MACd,KACA,EAAE,SAAS,QAAQ,QAAQ,YAAY,UAAU,KAAM,IAAiB,CAAC,GAC7D;AACZ,SAAO,IAAI,QAAQ,SAAU,SAAS,QAAQ;AAG5C,UAAM,cAAc,SAAS,qBAAqB,QAAQ,EAAE,KAAK,CAAC;AAClE,UAAM,SAAS,aAAa,cAAc,SAAS;AAGnD,UAAM,KAAiB,GAAG,MAAM,GAAG,OAAO;AAI1C,UAAM,UAAU,WAAY;AAE1B,UAAI,UAAU,OAAO,YAAY;AAC/B,eAAO,WAAW,YAAY,MAAM;AAAA,MACtC;AAGA,aAAO,EAAE,IAAI;AAEb,UAAI,OAAO;AACT,qBAAa,KAAK;AAAA,MACpB;AAAA,IACF;AAIA,UAAM,QACJ,UAAU,IACN,WAAW,MAAM;AACjB,cAAQ;AACR,aAAO,IAAI,MAAM,SAAS,CAAC;AAAA,IAC7B,GAAG,OAAO,IACR;AAGN,UAAM,WAAW,CAAC,SAAY;AAC5B,cAAQ;AACR,cAAQ,IAAI;AAAA,IACd;AAIA,WAAO,EAAE,IAAI;AAGb,UAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,UAAM,SAAS,IAAI,IAAI,GAAG;AAG1B,WAAO,aAAa,IAAI,OAAO,EAAE;AACjC,WAAO,aAAa,OAAO,OAAO,SAAS,CAAC;AAG5C,WAAO,aAAa,QAAQ,WAAW;AAAA,EACzC,CAAC;AACH;","names":[]}
|
package/dist/util/jsonp.d.cts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
interface Window {
|
|
3
|
-
[key: CallbackId]: (data: any) => void;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* JSONP呼び出しのオプション設定
|
|
8
|
-
*/
|
|
9
|
-
type JsonpOption = {
|
|
10
|
-
/**
|
|
11
|
-
* コールバック関数名のプレフィックス
|
|
12
|
-
* @default "__jp"
|
|
13
|
-
*/
|
|
14
|
-
prefix?: string;
|
|
15
|
-
/**
|
|
16
|
-
* コールバック関数名を指定するURLパラメータ名
|
|
17
|
-
* @default "callback"
|
|
18
|
-
*/
|
|
19
|
-
param?: string;
|
|
20
|
-
/**
|
|
21
|
-
* タイムアウト時間(ミリ秒)
|
|
22
|
-
* @default 15000
|
|
23
|
-
*/
|
|
24
|
-
timeout?: number;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* JSONPリクエストを実行してデータを取得します。
|
|
28
|
-
*
|
|
29
|
-
* @param url - リクエスト先のURL
|
|
30
|
-
* @param options - JSONP呼び出しのオプション設定
|
|
31
|
-
* @returns JSONPリクエストの結果をPromiseで返します
|
|
32
|
-
* @throws {Error} タイムアウトが発生した場合、"Timeout"メッセージのエラーをスローします
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```typescript
|
|
36
|
-
* // 基本的な使用方法
|
|
37
|
-
* const data = await jsonp<ResponseType>('https://example.com/api');
|
|
38
|
-
*
|
|
39
|
-
* // オプション指定
|
|
40
|
-
* const data = await jsonp<ResponseType>('https://example.com/api', {
|
|
41
|
-
* prefix: 'customPrefix',
|
|
42
|
-
* param: 'callbackParam',
|
|
43
|
-
* timeout: 10000
|
|
44
|
-
* });
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
declare function jsonp<T>(url: string, { prefix, param, timeout }?: JsonpOption): Promise<T>;
|
|
48
|
-
|
|
49
|
-
export { type JsonpOption, jsonp };
|
package/dist/util/jsonp.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
interface Window {
|
|
3
|
-
[key: CallbackId]: (data: any) => void;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* JSONP呼び出しのオプション設定
|
|
8
|
-
*/
|
|
9
|
-
type JsonpOption = {
|
|
10
|
-
/**
|
|
11
|
-
* コールバック関数名のプレフィックス
|
|
12
|
-
* @default "__jp"
|
|
13
|
-
*/
|
|
14
|
-
prefix?: string;
|
|
15
|
-
/**
|
|
16
|
-
* コールバック関数名を指定するURLパラメータ名
|
|
17
|
-
* @default "callback"
|
|
18
|
-
*/
|
|
19
|
-
param?: string;
|
|
20
|
-
/**
|
|
21
|
-
* タイムアウト時間(ミリ秒)
|
|
22
|
-
* @default 15000
|
|
23
|
-
*/
|
|
24
|
-
timeout?: number;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* JSONPリクエストを実行してデータを取得します。
|
|
28
|
-
*
|
|
29
|
-
* @param url - リクエスト先のURL
|
|
30
|
-
* @param options - JSONP呼び出しのオプション設定
|
|
31
|
-
* @returns JSONPリクエストの結果をPromiseで返します
|
|
32
|
-
* @throws {Error} タイムアウトが発生した場合、"Timeout"メッセージのエラーをスローします
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```typescript
|
|
36
|
-
* // 基本的な使用方法
|
|
37
|
-
* const data = await jsonp<ResponseType>('https://example.com/api');
|
|
38
|
-
*
|
|
39
|
-
* // オプション指定
|
|
40
|
-
* const data = await jsonp<ResponseType>('https://example.com/api', {
|
|
41
|
-
* prefix: 'customPrefix',
|
|
42
|
-
* param: 'callbackParam',
|
|
43
|
-
* timeout: 10000
|
|
44
|
-
* });
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
declare function jsonp<T>(url: string, { prefix, param, timeout }?: JsonpOption): Promise<T>;
|
|
48
|
-
|
|
49
|
-
export { type JsonpOption, jsonp };
|
package/dist/util/jsonp.js
DELETED
package/dist/util/jsonp.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/util/type.cjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/util/type.ts
|
|
17
|
-
var type_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(type_exports);
|
|
19
|
-
//# sourceMappingURL=type.cjs.map
|
package/dist/util/type.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/type.ts"],"sourcesContent":["/**\n * 文字列に変換可能な型を表します。\n * \n * このタイプには以下が含まれます:\n * - `string`: 文字列プリミティブ\n * - `number`: 数値\n * - `bigint`: 任意精度の整数\n * - `boolean`: 真/偽の値\n * - `null`: null値\n * - `undefined`: undefined値\n * \n * これらの型はすべて、文字列連結や文字列変換可能な値を期待する関数で安全に使用できます。\n */\ntype Stringable = string | number | bigint | boolean | null | undefined;\n\n/**\n * ハイフンで結合された2つの文字列変換可能な値、または単一の値を表すユーティリティタイプ。\n * \n * @template T - 文字列に変換可能な型\n * @returns `${T}-${T}` (ハイフンで結合された2つの値) または `${T}` (単一の値)\n * \n * @example\n * type Numbers = 1 | 2 | 3;\n * type JoinedNumbers = Join<Numbers>; // '1' | '2' | '3' | '1-1' | '1-2' | '1-3' | '2-1' | '2-2' | '2-3' | '3-1' | '3-2' | '3-3'\n */\nexport type Join<T extends Stringable> = `${T}-${T}` | `${T}`;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/util/type.d.cts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 文字列に変換可能な型を表します。
|
|
3
|
-
*
|
|
4
|
-
* このタイプには以下が含まれます:
|
|
5
|
-
* - `string`: 文字列プリミティブ
|
|
6
|
-
* - `number`: 数値
|
|
7
|
-
* - `bigint`: 任意精度の整数
|
|
8
|
-
* - `boolean`: 真/偽の値
|
|
9
|
-
* - `null`: null値
|
|
10
|
-
* - `undefined`: undefined値
|
|
11
|
-
*
|
|
12
|
-
* これらの型はすべて、文字列連結や文字列変換可能な値を期待する関数で安全に使用できます。
|
|
13
|
-
*/
|
|
14
|
-
type Stringable = string | number | bigint | boolean | null | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* ハイフンで結合された2つの文字列変換可能な値、または単一の値を表すユーティリティタイプ。
|
|
17
|
-
*
|
|
18
|
-
* @template T - 文字列に変換可能な型
|
|
19
|
-
* @returns `${T}-${T}` (ハイフンで結合された2つの値) または `${T}` (単一の値)
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* type Numbers = 1 | 2 | 3;
|
|
23
|
-
* type JoinedNumbers = Join<Numbers>; // '1' | '2' | '3' | '1-1' | '1-2' | '1-3' | '2-1' | '2-2' | '2-3' | '3-1' | '3-2' | '3-3'
|
|
24
|
-
*/
|
|
25
|
-
type Join<T extends Stringable> = `${T}-${T}` | `${T}`;
|
|
26
|
-
|
|
27
|
-
export type { Join };
|
package/dist/util/type.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 文字列に変換可能な型を表します。
|
|
3
|
-
*
|
|
4
|
-
* このタイプには以下が含まれます:
|
|
5
|
-
* - `string`: 文字列プリミティブ
|
|
6
|
-
* - `number`: 数値
|
|
7
|
-
* - `bigint`: 任意精度の整数
|
|
8
|
-
* - `boolean`: 真/偽の値
|
|
9
|
-
* - `null`: null値
|
|
10
|
-
* - `undefined`: undefined値
|
|
11
|
-
*
|
|
12
|
-
* これらの型はすべて、文字列連結や文字列変換可能な値を期待する関数で安全に使用できます。
|
|
13
|
-
*/
|
|
14
|
-
type Stringable = string | number | bigint | boolean | null | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* ハイフンで結合された2つの文字列変換可能な値、または単一の値を表すユーティリティタイプ。
|
|
17
|
-
*
|
|
18
|
-
* @template T - 文字列に変換可能な型
|
|
19
|
-
* @returns `${T}-${T}` (ハイフンで結合された2つの値) または `${T}` (単一の値)
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* type Numbers = 1 | 2 | 3;
|
|
23
|
-
* type JoinedNumbers = Join<Numbers>; // '1' | '2' | '3' | '1-1' | '1-2' | '1-3' | '2-1' | '2-2' | '2-3' | '3-1' | '3-2' | '3-3'
|
|
24
|
-
*/
|
|
25
|
-
type Join<T extends Stringable> = `${T}-${T}` | `${T}`;
|
|
26
|
-
|
|
27
|
-
export type { Join };
|
package/dist/util/type.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=type.js.map
|
package/dist/util/type.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/util/unzipp.cjs
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/util/unzipp.ts
|
|
21
|
-
var unzipp_exports = {};
|
|
22
|
-
__export(unzipp_exports, {
|
|
23
|
-
unzipp: () => unzipp
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(unzipp_exports);
|
|
26
|
-
var import_zlib = require("zlib");
|
|
27
|
-
var import_util = require("util");
|
|
28
|
-
var gunzipAsync = (0, import_util.promisify)(import_zlib.gunzip);
|
|
29
|
-
var decoder = new TextDecoder();
|
|
30
|
-
async function unzipp(data) {
|
|
31
|
-
try {
|
|
32
|
-
const buffer = await gunzipAsync(data);
|
|
33
|
-
try {
|
|
34
|
-
return JSON.parse(decoder.decode(buffer));
|
|
35
|
-
} catch {
|
|
36
|
-
throw decoder.decode(buffer);
|
|
37
|
-
}
|
|
38
|
-
} catch (e) {
|
|
39
|
-
if (typeof e === "string") throw e;
|
|
40
|
-
throw decoder.decode(data);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
-
0 && (module.exports = {
|
|
45
|
-
unzipp
|
|
46
|
-
});
|
|
47
|
-
//# sourceMappingURL=unzipp.cjs.map
|
package/dist/util/unzipp.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/unzipp.ts"],"sourcesContent":["import { gunzip, InputType } from \"zlib\";\nimport { promisify } from \"util\";\n\nconst gunzipAsync = promisify<InputType, Buffer>(gunzip);\n\nconst decoder = new TextDecoder()\n/**\n * 圧縮されたJSONデータを解凍して解析します。\n * \n * @param data - ArrayBuffer形式の圧縮データ\n * @returns 解凍されたデータからパースされたJSONオブジェクト\n * @throws {string} データが解凍できない、または解凍されたデータが有効なJSONでない場合、\n * 解凍されたデータの文字列表現をスローします。\n * @throws {string} 解凍中にエラーが発生した場合、元のデータの文字列表現をスローします。\n */\nexport async function unzipp(data: ArrayBuffer) {\n try {\n const buffer = await gunzipAsync(data);\n try {\n return JSON.parse(decoder.decode(buffer));\n } catch {\n throw decoder.decode(buffer);\n }\n } catch (e) {\n if (typeof e === \"string\") throw e;\n throw decoder.decode(data);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAkC;AAClC,kBAA0B;AAE1B,IAAM,kBAAc,uBAA6B,kBAAM;AAEvD,IAAM,UAAU,IAAI,YAAY;AAUhC,eAAsB,OAAO,MAAmB;AAC9C,MAAI;AACF,UAAM,SAAS,MAAM,YAAY,IAAI;AACrC,QAAI;AACF,aAAO,KAAK,MAAM,QAAQ,OAAO,MAAM,CAAC;AAAA,IAC1C,QAAQ;AACN,YAAM,QAAQ,OAAO,MAAM;AAAA,IAC7B;AAAA,EACF,SAAS,GAAG;AACV,QAAI,OAAO,MAAM,SAAU,OAAM;AACjC,UAAM,QAAQ,OAAO,IAAI;AAAA,EAC3B;AACF;","names":[]}
|
package/dist/util/unzipp.d.cts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 圧縮されたJSONデータを解凍して解析します。
|
|
3
|
-
*
|
|
4
|
-
* @param data - ArrayBuffer形式の圧縮データ
|
|
5
|
-
* @returns 解凍されたデータからパースされたJSONオブジェクト
|
|
6
|
-
* @throws {string} データが解凍できない、または解凍されたデータが有効なJSONでない場合、
|
|
7
|
-
* 解凍されたデータの文字列表現をスローします。
|
|
8
|
-
* @throws {string} 解凍中にエラーが発生した場合、元のデータの文字列表現をスローします。
|
|
9
|
-
*/
|
|
10
|
-
declare function unzipp(data: ArrayBuffer): Promise<any>;
|
|
11
|
-
|
|
12
|
-
export { unzipp };
|
package/dist/util/unzipp.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 圧縮されたJSONデータを解凍して解析します。
|
|
3
|
-
*
|
|
4
|
-
* @param data - ArrayBuffer形式の圧縮データ
|
|
5
|
-
* @returns 解凍されたデータからパースされたJSONオブジェクト
|
|
6
|
-
* @throws {string} データが解凍できない、または解凍されたデータが有効なJSONでない場合、
|
|
7
|
-
* 解凍されたデータの文字列表現をスローします。
|
|
8
|
-
* @throws {string} 解凍中にエラーが発生した場合、元のデータの文字列表現をスローします。
|
|
9
|
-
*/
|
|
10
|
-
declare function unzipp(data: ArrayBuffer): Promise<any>;
|
|
11
|
-
|
|
12
|
-
export { unzipp };
|
package/dist/util/unzipp.js
DELETED
package/dist/util/unzipp.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|