@8ms/helpers 1.2.1 → 1.2.3
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/api/ApiResponse.d.ts +1 -1
- package/api/isError.d.ts +1 -1
- package/api/isSuccess.d.ts +1 -1
- package/api/response.d.ts +1 -1
- package/api/states.d.ts +1 -1
- package/atInternet/request.d.ts +1 -1
- package/aws/athenaExpress/initClient.d.ts +1 -1
- package/aws/athenaExpress/query.d.ts +1 -1
- package/aws/getConfig.d.ts +1 -1
- package/aws/glue/initClient.d.ts +1 -1
- package/aws/glue/invoke.d.ts +1 -1
- package/aws/lambda/getHandlerPath.d.ts +1 -1
- package/aws/lambda/initClient.d.ts +1 -1
- package/aws/lambda/invoke.d.ts +1 -1
- package/aws/s3/copyFile.d.ts +2 -2
- package/aws/s3/deleteFile.d.ts +1 -1
- package/aws/s3/deleteFiles.d.ts +1 -1
- package/aws/s3/deleteFolder.d.ts +1 -1
- package/aws/s3/getGlueJson.d.ts +1 -1
- package/aws/s3/getPresignedPost.d.ts +2 -2
- package/aws/s3/getSignedUrl.d.ts +1 -1
- package/aws/s3/initClient.d.ts +1 -1
- package/aws/s3/isFileExists.d.ts +1 -1
- package/aws/s3/listFiles.d.ts +1 -1
- package/aws/s3/listFolders.d.ts +1 -1
- package/aws/s3/moveFile.d.ts +1 -1
- package/aws/s3/readBuffer.d.ts +2 -2
- package/aws/s3/readFile.d.ts +3 -3
- package/aws/s3/writeFile.d.ts +1 -1
- package/aws/s3/writePresignedPost.d.ts +1 -1
- package/aws/s3/writeUrlContents.d.ts +1 -1
- package/aws/s3cache/cache.d.ts +1 -1
- package/aws/s3cache/getCache.d.ts +1 -1
- package/aws/s3cache/getKey.d.ts +1 -1
- package/aws/s3cache/saveCache.d.ts +1 -1
- package/aws/s3cache/updateCache.d.ts +1 -1
- package/aws/ses/SimpleEmail.d.ts +1 -1
- package/aws/ses/initClient.d.ts +1 -1
- package/aws/sqs/addToQueue.d.ts +2 -2
- package/aws/sqs/deleteFromQueue.d.ts +1 -1
- package/aws/sqs/initClient.d.ts +1 -1
- package/aws/ssm/getParameter.d.ts +1 -1
- package/aws/ssm/initClient.d.ts +1 -1
- package/axios/get.d.ts +1 -1
- package/axios/post.d.ts +1 -1
- package/crud/actions.d.ts +1 -1
- package/date/date.d.ts +1 -1
- package/date/duration.d.ts +1 -1
- package/date/financialYear.d.ts +1 -1
- package/date/financialYearWeek.d.ts +1 -1
- package/date/format.d.ts +1 -1
- package/date/getDate.d.ts +1 -1
- package/date/getFinancialYear.d.ts +1 -1
- package/date/getFinancialYearWeeks.d.ts +1 -1
- package/date/getLastWeek.d.ts +1 -1
- package/date/getMax.d.ts +1 -1
- package/date/getMidnight.d.ts +1 -1
- package/date/getMin.d.ts +1 -1
- package/date/getMonday.d.ts +1 -1
- package/date/getNumber.d.ts +1 -1
- package/date/getSunday.d.ts +1 -1
- package/date/getThisWeek.d.ts +1 -1
- package/date/getTimeZoned.d.ts +1 -1
- package/date/getToday.d.ts +1 -1
- package/date/getTwoWeeksAgo.d.ts +1 -1
- package/date/getWeeksAgo.d.ts +1 -1
- package/date/getYesterday.d.ts +1 -1
- package/date/predefinedTimeframes.d.ts +1 -1
- package/date/timeframe.d.ts +1 -1
- package/deepcrawl/api/buildRequest.d.ts +1 -1
- package/deepcrawl/api/filter.d.ts +1 -1
- package/deepcrawl/api/getData.d.ts +1 -1
- package/deepcrawl/api/initClient.d.ts +1 -1
- package/deepcrawl/api/orders.d.ts +1 -1
- package/deepcrawl/graphql/getData.d.ts +1 -1
- package/deepcrawl/graphql/initClient.d.ts +1 -1
- package/environment/environments.d.ts +1 -1
- package/environment/platforms.d.ts +1 -1
- package/eskimi/campaign.d.ts +1 -1
- package/eskimi/getAccessToken.d.ts +1 -1
- package/global/forceUpdate.d.ts +1 -1
- package/global/init.d.ts +1 -1
- package/global/read.d.ts +1 -1
- package/google/bigQuery/IsTableExists.d.ts +1 -1
- package/google/bigQuery/createTable.d.ts +1 -1
- package/google/bigQuery/initClient.d.ts +1 -1
- package/google/bigQuery/loadData.d.ts +1 -1
- package/google/bigQuery/query.d.ts +1 -1
- package/google/getConfig.d.ts +2 -2
- package/google/keywordPlanner/countries.d.ts +1 -1
- package/google/keywordPlanner/months.d.ts +1 -1
- package/google/keywordPlanner/networks.d.ts +1 -1
- package/google/keywordPlanner/request.d.ts +1 -1
- package/google/keywordPlanner/response.d.ts +3 -3
- package/google/sheets/getAssociatedData.d.ts +1 -1
- package/google/sheets/getBatchData.d.ts +2 -2
- package/google/sheets/initClient.d.ts +1 -1
- package/google/storage/copyToCloud.d.ts +1 -1
- package/google/storage/initClient.d.ts +1 -1
- package/google/storage/writeFile.d.ts +1 -1
- package/googleAds/getCustomer.d.ts +1 -1
- package/googleAds/initClient.d.ts +2 -2
- package/initClients.d.ts +1 -1
- package/littleWarden/getUrlStatus.d.ts +1 -1
- package/littleWarden/states.d.ts +1 -1
- package/myTarget/getAccessToken.d.ts +1 -1
- package/nextAuth/states.d.ts +1 -1
- package/number/getRounded.d.ts +1 -1
- package/object/replaceKeys.d.ts +1 -1
- package/package.json +45 -50
- package/snapchat/getAccessToken.d.ts +1 -1
- package/string/getStrippedTags.d.ts +9 -0
- package/string/getStrippedTags.js +18 -0
- package/string/getUnescaped.d.ts +10 -0
- package/string/getUnescaped.js +13 -0
- package/url/buildUrl.d.ts +1 -1
- package/url/url.d.ts +1 -1
- package/util/defaultTo.d.ts +1 -1
- package/util/isUndefined.d.ts +1 -1
- package/webWorker/states.d.ts +1 -1
|
@@ -3,5 +3,5 @@ declare const environments: {
|
|
|
3
3
|
STAGING: string;
|
|
4
4
|
PRODUCTION: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type Environment = typeof environments.DEVELOPMENT | typeof environments.STAGING | typeof environments.PRODUCTION;
|
|
7
7
|
export default environments;
|
package/eskimi/campaign.d.ts
CHANGED
package/global/forceUpdate.d.ts
CHANGED
package/global/init.d.ts
CHANGED
package/global/read.d.ts
CHANGED
package/google/getConfig.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Config = {
|
|
2
2
|
type: string;
|
|
3
3
|
project_id: string;
|
|
4
4
|
private_key_id: string;
|
|
@@ -10,7 +10,7 @@ export declare type Config = {
|
|
|
10
10
|
auth_provider_x509_cert_url: string;
|
|
11
11
|
client_x509_cert_url: string;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type GetConfig = {
|
|
14
14
|
parameter: Config;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
@@ -218,5 +218,5 @@ declare const countries: {
|
|
|
218
218
|
YEMEN: number;
|
|
219
219
|
ZAMBIA: number;
|
|
220
220
|
};
|
|
221
|
-
export
|
|
221
|
+
export type Country = typeof countries.AFGHANISTAN | typeof countries.ALBANIA | typeof countries.ANTARCTICA | typeof countries.ALGERIA | typeof countries.AMERICAN_SAMOA | typeof countries.ANDORRA | typeof countries.ANGOLA | typeof countries.ANTIGUA_AND_BARBUDA | typeof countries.AZERBAIJAN | typeof countries.ARGENTINA | typeof countries.AUSTRALIA | typeof countries.AUSTRIA | typeof countries.THE_BAHAMAS | typeof countries.BAHRAIN | typeof countries.BANGLADESH | typeof countries.ARMENIA | typeof countries.BARBADOS | typeof countries.BELGIUM | typeof countries.BHUTAN | typeof countries.BOLIVIA | typeof countries.BOSNIA_AND_HERZEGOVINA | typeof countries.BOTSWANA | typeof countries.BRAZIL | typeof countries.BELIZE | typeof countries.SOLOMON_ISLANDS | typeof countries.BRUNEI | typeof countries.BULGARIA | typeof countries.MYANMAR_BURMA | typeof countries.BURUNDI | typeof countries.BELARUS | typeof countries.CAMBODIA | typeof countries.CAMEROON | typeof countries.CANADA | typeof countries.CAPE_VERDE | typeof countries.CENTRAL_AFRICAN_REPUBLIC | typeof countries.SRI_LANKA | typeof countries.CHAD | typeof countries.CHILE | typeof countries.CHINA | typeof countries.CHRISTMAS_ISLAND | typeof countries.COCOS_KEELING_ISLANDS | typeof countries.COLOMBIA | typeof countries.COMOROS | typeof countries.REPUBLIC_OF_THE_CONGO | typeof countries.DEMOCRATIC_REPUBLIC_OF_THE_CONGO | typeof countries.COOK_ISLANDS | typeof countries.COSTA_RICA | typeof countries.CROATIA | typeof countries.CYPRUS | typeof countries.CZECHIA | typeof countries.BENIN | typeof countries.DENMARK | typeof countries.DOMINICA | typeof countries.DOMINICAN_REPUBLIC | typeof countries.ECUADOR | typeof countries.EL_SALVADOR | typeof countries.EQUATORIAL_GUINEA | typeof countries.ETHIOPIA | typeof countries.ERITREA | typeof countries.ESTONIA | typeof countries.SOUTH_GEORGIA_AND_THE_SOUTH_SANDWICH_ISLANDS | typeof countries.FIJI | typeof countries.FINLAND | typeof countries.FRANCE | typeof countries.FRENCH_POLYNESIA | typeof countries.FRENCH_SOUTHERN_AND_ANTARCTIC_LANDS | typeof countries.DJIBOUTI | typeof countries.GABON | typeof countries.GEORGIA | typeof countries.THE_GAMBIA | typeof countries.GERMANY | typeof countries.GHANA | typeof countries.KIRIBATI | typeof countries.GREECE | typeof countries.GRENADA | typeof countries.GUAM | typeof countries.GUATEMALA | typeof countries.GUINEA | typeof countries.GUYANA | typeof countries.HAITI | typeof countries.HEARD_ISLAND_AND_MCDONALD_ISLANDS | typeof countries.VATICAN_CITY | typeof countries.HONDURAS | typeof countries.HUNGARY | typeof countries.ICELAND | typeof countries.INDIA | typeof countries.INDONESIA | typeof countries.IRAQ | typeof countries.IRELAND | typeof countries.ISRAEL | typeof countries.ITALY | typeof countries.COTE_DIVOIRE | typeof countries.JAMAICA | typeof countries.JAPAN | typeof countries.KAZAKHSTAN | typeof countries.JORDAN | typeof countries.KENYA | typeof countries.SOUTH_KOREA | typeof countries.KUWAIT | typeof countries.KYRGYZSTAN | typeof countries.LAOS | typeof countries.LEBANON | typeof countries.LESOTHO | typeof countries.LATVIA | typeof countries.LIBERIA | typeof countries.LIBYA | typeof countries.LIECHTENSTEIN | typeof countries.LITHUANIA | typeof countries.LUXEMBOURG | typeof countries.MADAGASCAR | typeof countries.MALAWI | typeof countries.MALAYSIA | typeof countries.MALDIVES | typeof countries.MALI | typeof countries.MALTA | typeof countries.MAURITANIA | typeof countries.MAURITIUS | typeof countries.MEXICO | typeof countries.MONACO | typeof countries.MONGOLIA | typeof countries.MOLDOVA | typeof countries.MONTENEGRO | typeof countries.MOROCCO | typeof countries.MOZAMBIQUE | typeof countries.OMAN | typeof countries.NAMIBIA | typeof countries.NAURU | typeof countries.NEPAL | typeof countries.NETHERLANDS | typeof countries.CURACAO | typeof countries.SINT_MAARTEN | typeof countries.CARIBBEAN_NETHERLANDS | typeof countries.NEW_CALEDONIA | typeof countries.VANUATU | typeof countries.NEW_ZEALAND | typeof countries.NICARAGUA | typeof countries.NIGER | typeof countries.NIGERIA | typeof countries.NIUE | typeof countries.NORFOLK_ISLAND | typeof countries.NORWAY | typeof countries.NORTHERN_MARIANA_ISLANDS | typeof countries.UNITED_STATES_MINOR_OUTLYING_ISLANDS | typeof countries.FEDERATED_STATES_OF_MICRONESIA | typeof countries.MARSHALL_ISLANDS | typeof countries.PALAU | typeof countries.PAKISTAN | typeof countries.PANAMA | typeof countries.PAPUA_NEW_GUINEA | typeof countries.PARAGUAY | typeof countries.PERU | typeof countries.PHILIPPINES | typeof countries.PITCAIRN_ISLANDS | typeof countries.POLAND | typeof countries.PORTUGAL | typeof countries.GUINEA_BISSAU | typeof countries.TIMOR_LESTE | typeof countries.QATAR | typeof countries.ROMANIA | typeof countries.RUSSIA | typeof countries.RWANDA | typeof countries.SAINT_HELENA__ASCENSION_AND_TRISTAN_DA_CUNHA | typeof countries.SAINT_KITTS_AND_NEVIS | typeof countries.SAINT_LUCIA | typeof countries.SAINT_PIERRE_AND_MIQUELON | typeof countries.SAINT_VINCENT_AND_THE_GRENADINES | typeof countries.SAN_MARINO | typeof countries.SAO_TOME_AND_PRINCIPE | typeof countries.SAUDI_ARABIA | typeof countries.SENEGAL | typeof countries.SERBIA | typeof countries.SEYCHELLES | typeof countries.SIERRA_LEONE | typeof countries.SINGAPORE | typeof countries.SLOVAKIA | typeof countries.VIETNAM | typeof countries.SLOVENIA | typeof countries.SOMALIA | typeof countries.SOUTH_AFRICA | typeof countries.ZIMBABWE | typeof countries.SPAIN | typeof countries.SUDAN | typeof countries.SURINAME | typeof countries.ESWATINI | typeof countries.SWEDEN | typeof countries.SWITZERLAND | typeof countries.TAJIKISTAN | typeof countries.THAILAND | typeof countries.TOGO | typeof countries.TOKELAU | typeof countries.TONGA | typeof countries.TRINIDAD_AND_TOBAGO | typeof countries.UNITED_ARAB_EMIRATES | typeof countries.TUNISIA | typeof countries.TURKEY | typeof countries.TURKMENISTAN | typeof countries.TUVALU | typeof countries.UGANDA | typeof countries.UKRAINE | typeof countries.NORTH_MACEDONIA | typeof countries.EGYPT | typeof countries.UNITED_KINGDOM | typeof countries.GUERNSEY | typeof countries.JERSEY | typeof countries.TANZANIA | typeof countries.UNITED_STATES | typeof countries.BURKINA_FASO | typeof countries.URUGUAY | typeof countries.UZBEKISTAN | typeof countries.VENEZUELA | typeof countries.WALLIS_AND_FUTUNA | typeof countries.SAMOA | typeof countries.YEMEN | typeof countries.ZAMBIA;
|
|
222
222
|
export default countries;
|
|
@@ -12,5 +12,5 @@ declare const months: {
|
|
|
12
12
|
NOVEMBER: string;
|
|
13
13
|
DECEMBER: string;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type Month = typeof months.JANUARY | typeof months.FEBRUARY | typeof months.MARCH | typeof months.APRIL | typeof months.MAY | typeof months.JUNE | typeof months.JULY | typeof months.AUGUST | typeof months.SEPTEMBER | typeof months.OCTOBER | typeof months.NOVEMBER | typeof months.DECEMBER;
|
|
16
16
|
export default months;
|
|
@@ -2,5 +2,5 @@ declare const networks: {
|
|
|
2
2
|
GOOGLE_SEARCH_ONLY: number;
|
|
3
3
|
GOOGLE_SEARCH_AND_PARTNERS: number;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export type Network = typeof networks.GOOGLE_SEARCH_ONLY | typeof networks.GOOGLE_SEARCH_AND_PARTNERS;
|
|
6
6
|
export default networks;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { State } from '../../api/states';
|
|
2
|
-
|
|
2
|
+
type Month = {
|
|
3
3
|
date: string;
|
|
4
4
|
month: number;
|
|
5
5
|
searchVolume: number;
|
|
6
6
|
year: number;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type Keyword = {
|
|
9
9
|
keyword: string;
|
|
10
10
|
avgCpc: number;
|
|
11
11
|
avgSearchVolume: number;
|
|
@@ -16,7 +16,7 @@ declare type Keyword = {
|
|
|
16
16
|
topOfPageBidLow: number;
|
|
17
17
|
totalSearchVolume: number;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type Response = {
|
|
20
20
|
body: Keyword[];
|
|
21
21
|
error: null | string;
|
|
22
22
|
state: State;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type BatchData = {
|
|
2
2
|
spreadsheetId: string;
|
|
3
3
|
valueRanges: {
|
|
4
4
|
range: string;
|
|
@@ -8,7 +8,7 @@ declare type BatchData = {
|
|
|
8
8
|
];
|
|
9
9
|
}[];
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type GetBatchData = {
|
|
12
12
|
spreadsheetId: string;
|
|
13
13
|
ranges: string[];
|
|
14
14
|
dateTimeRender?: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type GoogleAdsParameter = {
|
|
2
2
|
clientId: string;
|
|
3
3
|
clientSecret: string;
|
|
4
4
|
developerToken: string;
|
|
5
5
|
mccAccountId: string;
|
|
6
6
|
refreshToken: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type InitClient = {
|
|
9
9
|
parameter: GoogleAdsParameter;
|
|
10
10
|
};
|
|
11
11
|
/**
|
package/initClients.d.ts
CHANGED
package/littleWarden/states.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ declare const states: {
|
|
|
3
3
|
DANGER: string;
|
|
4
4
|
WARNING: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type State = typeof states.ALL_GOOD | typeof states.DANGER | typeof states.WARNING;
|
|
7
7
|
export default states;
|
package/nextAuth/states.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ declare const states: {
|
|
|
3
3
|
PENDING: string;
|
|
4
4
|
UNAUTHENTICATED: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type State = typeof states.AUTHENTICATED | typeof states.PENDING | typeof states.UNAUTHENTICATED;
|
|
7
7
|
export default states;
|
package/number/getRounded.d.ts
CHANGED
package/object/replaceKeys.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,52 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"timezone-mock": "1.3.4",
|
|
48
|
-
"ts-node": "10.9.1",
|
|
49
|
-
"tslib": "2.4.0",
|
|
50
|
-
"typescript": "4.8.3"
|
|
51
|
-
}
|
|
2
|
+
"name": "@8ms/helpers",
|
|
3
|
+
"license": "UNLICENSED",
|
|
4
|
+
"version": "1.2.3",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"
|
|
8
|
+
},
|
|
9
|
+
"main": "index.js",
|
|
10
|
+
"types": "index.d.ts",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"jest": "jest --watch"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"axios": "1.1.3",
|
|
17
|
+
"crypto-js": "4.1.1",
|
|
18
|
+
"date-fns": "2.29.3",
|
|
19
|
+
"date-fns-tz": "1.3.7",
|
|
20
|
+
"lodash": "4.17.21"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@aws-sdk/client-s3": "3.211.0",
|
|
24
|
+
"@aws-sdk/client-ses": "3.211.0",
|
|
25
|
+
"@aws-sdk/client-sqs": "3.211.0",
|
|
26
|
+
"@aws-sdk/client-ssm": "3.211.0",
|
|
27
|
+
"@aws-sdk/s3-request-presigner": "3.211.0",
|
|
28
|
+
"@babel/preset-env": "7.20.2",
|
|
29
|
+
"@babel/preset-flow": "7.18.6",
|
|
30
|
+
"@babel/preset-typescript": "7.18.6",
|
|
31
|
+
"@google-cloud/bigquery": "6.0.3",
|
|
32
|
+
"@google-cloud/storage": "6.7.0",
|
|
33
|
+
"@prisma/client": "4.6.1",
|
|
34
|
+
"@types/jest": "29.2.3",
|
|
35
|
+
"@types/lodash": "4.14.189",
|
|
36
|
+
"@types/node": "18.11.9",
|
|
37
|
+
"babel-jest": "29.3.1",
|
|
38
|
+
"jest": "29.3.1",
|
|
39
|
+
"node-fetch": "3.3.0",
|
|
40
|
+
"numbro": "2.3.6",
|
|
41
|
+
"prisma-query-log": "3.2.0",
|
|
42
|
+
"timezone-mock": "1.3.4",
|
|
43
|
+
"ts-node": "10.9.1",
|
|
44
|
+
"tslib": "2.4.1",
|
|
45
|
+
"typescript": "4.9.3"
|
|
46
|
+
}
|
|
52
47
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type GetStrippedTags = {
|
|
2
|
+
input: any;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* Removes all HTML tags from an input.
|
|
6
|
+
* https://css-tricks.com/snippets/javascript/strip-html-tags-in-javascript/
|
|
7
|
+
*/
|
|
8
|
+
declare const getStrippedTags: ({ input }: GetStrippedTags) => string;
|
|
9
|
+
export default getStrippedTags;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const getString_1 = __importDefault(require("./getString"));
|
|
7
|
+
/**
|
|
8
|
+
* Removes all HTML tags from an input.
|
|
9
|
+
* https://css-tricks.com/snippets/javascript/strip-html-tags-in-javascript/
|
|
10
|
+
*/
|
|
11
|
+
const getStrippedTags = ({ input }) => {
|
|
12
|
+
const regexPattern = /(<([^>]+)>)/gi;
|
|
13
|
+
const inputString = (0, getString_1.default)({
|
|
14
|
+
input,
|
|
15
|
+
});
|
|
16
|
+
return inputString.replace(regexPattern, '');
|
|
17
|
+
};
|
|
18
|
+
exports.default = getStrippedTags;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type GetUnescaped = {
|
|
2
|
+
input: any;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* Convert escaped copy into unescaped.
|
|
6
|
+
* E.g. there's => there's
|
|
7
|
+
* https://stackoverflow.com/a/42182294/2664955
|
|
8
|
+
*/
|
|
9
|
+
declare const getUnescaped: ({ input }: GetUnescaped) => string;
|
|
10
|
+
export default getUnescaped;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Convert escaped copy into unescaped.
|
|
5
|
+
* E.g. there's => there's
|
|
6
|
+
* https://stackoverflow.com/a/42182294/2664955
|
|
7
|
+
*/
|
|
8
|
+
const getUnescaped = ({ input }) => {
|
|
9
|
+
let el = document.createElement("textarea");
|
|
10
|
+
el.innerHTML = input;
|
|
11
|
+
return el.value;
|
|
12
|
+
};
|
|
13
|
+
exports.default = getUnescaped;
|
package/url/buildUrl.d.ts
CHANGED
package/url/url.d.ts
CHANGED
package/util/defaultTo.d.ts
CHANGED
package/util/isUndefined.d.ts
CHANGED
package/webWorker/states.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ declare const states: {
|
|
|
3
3
|
SUCCESS: string;
|
|
4
4
|
PROGRESS: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type State = typeof states.SUCCESS | typeof states.ERROR | typeof states.PROGRESS;
|
|
7
7
|
export default states;
|