social-profile-url-parser 0.1.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.hbs +18 -0
- package/README.md +29 -0
- package/lib/index.d.ts +47 -0
- package/lib/index.js +155 -0
- package/lib/index.js.map +1 -0
- package/package.json +67 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 wvdp
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.hbs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Social Profile URL Parser
|
|
2
|
+
|
|
3
|
+
The `Social Profile URL Parser` is a Node.js library that allows you to extract social media profile URLs from a block of text. It is useful for situations where you have a large amount of text that contains multiple social media profile links and you want to extract and organize them in a structured way.
|
|
4
|
+
|
|
5
|
+
To use the library, you can simply pass in a string of text and the library will return an array of objects containing the social media platform name, profile URL, and username for each link found. You can also specify which platforms you want to extract links for by passing in an array of platform names.
|
|
6
|
+
|
|
7
|
+
The library supports a wide range of popular social media platforms, including Facebook, Twitter, Instagram, LinkedIn, and more. It is easy to use and can save you a lot of time and effort when working with large amounts of text containing social media profile links.
|
|
8
|
+
|
|
9
|
+
## Support the project
|
|
10
|
+
|
|
11
|
+
There are many ways you can contribute to the development and improvement of the Social Profile URL Parser library. One way is by submitting code changes and bug fixes through pull requests.
|
|
12
|
+
Your pull request will be reviewed by the project maintainers and, if accepted, will be merged into the main codebase.
|
|
13
|
+
|
|
14
|
+
Another way you can support the project is by providing feedback and suggestions. You can do this by opening an issue in the repository and describing your suggestion or problem. This allows the maintainers to track and address your feedback in a structured way.
|
|
15
|
+
|
|
16
|
+
## Documentation
|
|
17
|
+
|
|
18
|
+
{{>main~}}
|
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Social Profile URL Parser
|
|
2
|
+
|
|
3
|
+
The `Social Profile URL Parser` is a Node.js library that allows you to extract social media profile URLs from a block of text. It is useful for situations where you have a large amount of text that contains multiple social media profile links and you want to extract and organize them in a structured way.
|
|
4
|
+
|
|
5
|
+
To use the library, you can simply pass in a string of text and the library will return an array of objects containing the social media platform name, profile URL, and username for each link found. You can also specify which platforms you want to extract links for by passing in an array of platform names.
|
|
6
|
+
|
|
7
|
+
The library supports a wide range of popular social media platforms, including Facebook, Twitter, Instagram, LinkedIn, and more. It is easy to use and can save you a lot of time and effort when working with large amounts of text containing social media profile links.
|
|
8
|
+
|
|
9
|
+
## Support the project
|
|
10
|
+
|
|
11
|
+
There are many ways you can contribute to the development and improvement of the Social Profile URL Parser library. One way is by submitting code changes and bug fixes through pull requests.
|
|
12
|
+
Your pull request will be reviewed by the project maintainers and, if accepted, will be merged into the main codebase.
|
|
13
|
+
|
|
14
|
+
Another way you can support the project is by providing feedback and suggestions. You can do this by opening an issue in the repository and describing your suggestion or problem. This allows the maintainers to track and address your feedback in a structured way.
|
|
15
|
+
|
|
16
|
+
## Documentation
|
|
17
|
+
|
|
18
|
+
<a name="parser"></a>
|
|
19
|
+
|
|
20
|
+
## parser(inputText) ⇒ <code>Array.<ParseResult></code>
|
|
21
|
+
**Kind**: global function
|
|
22
|
+
**Returns**: <code>Array.<ParseResult></code> - an array with all the found social links
|
|
23
|
+
|
|
24
|
+
| Param | Type | Description |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| inputText | <code>string</code> | the input text that will be parsed. |
|
|
27
|
+
|
|
28
|
+
**Example**
|
|
29
|
+
```js
|
|
30
|
slack facebook https://www.facebook.com/slackhq/
|
|
1
31
|
SlackHQ twitter https://twitter.com/SlackHQ
|
|
2
32
|
{
|
|
3
33
|
type: 'facebook',
|
|
4
34
|
name: 'Facebook',
|
|
5
35
|
username: 'slack',
|
|
6
36
|
url: 'https://www.facebook.com/slackhq/'
|
|
7
37
|
},
|
|
8
38
|
{
|
|
9
39
|
type: 'twitter',
|
|
10
40
|
name: 'Twitter',
|
|
11
41
|
username: 'SlackHQ',
|
|
12
42
|
url: 'https://twitter.com/SlackHQ'
|
|
13
43
|
}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare const regexes: {
|
|
2
|
+
type: string;
|
|
3
|
+
name: string;
|
|
4
|
+
regex: RegExp;
|
|
5
|
+
}[];
|
|
6
|
+
/**
|
|
7
|
+
* return format for the parser.
|
|
8
|
+
*/
|
|
9
|
+
export interface ParseResult {
|
|
10
|
+
/** which social media site was selected */
|
|
11
|
+
type: string;
|
|
12
|
+
/** the formatted name of the site */
|
|
13
|
+
name: string;
|
|
14
|
+
/** the username found in the url */
|
|
15
|
+
username: string;
|
|
16
|
+
/** the url in which the username was found */
|
|
17
|
+
url: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @param {string} inputText the input text that will be parsed.
|
|
21
|
+
* @returns {Array<ParseResult>} an array with all the found social links
|
|
22
|
+
* @example
|
|
23
|
+
* ```js
|
|
24
|
+
* import { parser } from 'social-profile-url-parser';
|
|
25
|
+
*
|
|
26
|
+
* const result = parser(`
|
|
27
|
+
* slack facebook https://www.facebook.com/slackhq/
|
|
28
|
+
* SlackHQ twitter https://twitter.com/SlackHQ
|
|
29
|
+
* `)
|
|
30
|
+
*
|
|
31
|
+
* result === [
|
|
32
|
+
* {
|
|
33
|
+
* type: 'facebook',
|
|
34
|
+
* name: 'Facebook',
|
|
35
|
+
* username: 'slack',
|
|
36
|
+
* url: 'https://www.facebook.com/slackhq/'
|
|
37
|
+
* },
|
|
38
|
+
* {
|
|
39
|
+
* type: 'twitter',
|
|
40
|
+
* name: 'Twitter',
|
|
41
|
+
* username: 'SlackHQ',
|
|
42
|
+
* url: 'https://twitter.com/SlackHQ'
|
|
43
|
+
* }
|
|
44
|
+
* ];
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare function parser(inputText: string): ParseResult[];
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.parser = exports.regexes = void 0;
|
|
4
|
+
exports.regexes = [
|
|
5
|
+
{ type: 'aboutme', name: 'About.me', regex: /https?:\/\/(www\.)?about\.me\/([^\n /]+)/gi },
|
|
6
|
+
{ type: 'angellist', name: 'AngelList', regex: /https?:\/\/(www\.)?angel\.co\/([^\n /]+)/gi },
|
|
7
|
+
{ type: 'behance', name: 'Behance', regex: /https?:\/\/(www\.)?behance\.(com|net)\/([^\n /]+)/gi },
|
|
8
|
+
{ type: 'blogger', name: 'Blogger', regex: /https?:\/\/(www\.)?blogger\.com\/profile\/([^\n /]+)/gi },
|
|
9
|
+
{ type: 'crunchbase', name: 'CrunchBase', regex: /https?:\/\/(www\.)?crunchbase\.com\/(person|company|organization)\/([^\n /]+)/gi },
|
|
10
|
+
{ type: 'digg', name: 'Digg', regex: /https?:\/\/(www\.)?digg\.com\/users\/([^\n /]+)/gi },
|
|
11
|
+
{ type: 'dribbble', name: 'Dribbble', regex: /https?:\/\/(www\.)?dribbble\.com\/([^\n /]+)/gi },
|
|
12
|
+
{ type: 'flickr', name: 'Flickr', regex: /https?:\/\/(www\.)?flickr\.com\/(people|photos|groups)\/([^\n /]+)/gi },
|
|
13
|
+
{ type: 'foursquare', name: 'Foursquare', regex: /https?:\/\/(www\.)?foursquare\.com\/(?!user)([^\n /]+)/gi },
|
|
14
|
+
// github
|
|
15
|
+
{ type: 'github', name: 'GitHub', regex: /https?:\/\/(www\.)?github\.com\/([^\n /]+)/gi },
|
|
16
|
+
// google
|
|
17
|
+
{ type: 'googleplus', name: 'Google Plus', regex: /https?:\/\/plus\.google\.com\/\+?([^\n /]+)/gi },
|
|
18
|
+
{ type: 'youtube', name: 'YouTube', regex: /https?:\/\/([_a-z]{0,3}\.)?youtube\.com\/(user\/|channel\/|c\/)?([^\n /]+)/gi },
|
|
19
|
+
// facebook
|
|
20
|
+
{ type: 'instagram', name: 'Instagram', regex: /https?:\/\/(www\.)?instagram\.com\/([^\n /]+)/gi },
|
|
21
|
+
{ type: 'facebook', name: 'Facebook', regex: /https?:\/\/([_a-z]{0,3}\.|[_a-z]{2}-[_a-z]{2}\.)?(facebook|fb)\.com\/(groups\/)?([^\n /]+)/gi },
|
|
22
|
+
// whatsapp
|
|
23
|
+
// https://faq.whatsapp.com/5913398998672934/?locale=nl_NL
|
|
24
|
+
{ type: 'whatsapp', name: 'WhatsApp', regex: /(?:https?:\/\/)?(?:www\.)?wa\.me\/(\d+)/gi },
|
|
25
|
+
{ type: 'gravatar', name: 'Gravatar', regex: /https?:\/\/([_a-z]{0,3}\.)?gravatar\.com\/([^\n /]+)/gi },
|
|
26
|
+
{ type: 'keybase', name: 'Keybase', regex: /https?:\/\/(www\.)?keybase\.io\/([^\n /]+)/gi },
|
|
27
|
+
{ type: 'klout', name: 'Klout', regex: /https?:\/\/(www\.)?klout\.com\/([^\n /]+)/gi },
|
|
28
|
+
{ type: 'lastfm', name: 'Last.FM', regex: /https?:\/\/(www\.)?(last\.fm|lastfm\.com)\/user\/([^\n /]+)/gi },
|
|
29
|
+
{ type: 'linkedin', name: 'LinkedIn', regex: /https?:\/\/([_a-z]{0,3}\.)?linkedin\.com\/(((sales\/)?(in|pub|people|company|companies|organization|edu|school|groups)\/)|(profile\/view\?id=[a-z]))([^\n ]+)/gi },
|
|
30
|
+
{ type: 'medium', name: 'Medium', regex: /https?:\/\/(www\.)?medium\.com\/@?([^\n /]+)/gi },
|
|
31
|
+
{ type: 'myspace', name: 'MySpace', regex: /https?:\/\/(www\.)?myspace\.com\/([^\n /]+)/gi },
|
|
32
|
+
{ type: 'ok', name: 'Odnoklassniki', regex: /https?:\/\/(www\.)?ok\.ru\/(profile\/)?([^\n /]+)/gi },
|
|
33
|
+
// TODO: Find real life example
|
|
34
|
+
{ type: 'pandora', name: 'Pandora', regex: /https?:\/\/(www\.)?pandora\.com\/people\/([^\n /]+)/gi },
|
|
35
|
+
{ type: 'pinterest', name: 'Pinterest', regex: /https?:\/\/([_a-z]{0,3}\.)?pinterest\.[.a-z]+\/([^\n +/]+)/gi },
|
|
36
|
+
{ type: 'quora', name: 'Quora', regex: /https?:\/\/(www\.)?quora\.com\/(profile\/)?([^\n /]+)/gi },
|
|
37
|
+
// reddit
|
|
38
|
+
{ type: 'reddit', name: 'Reddit', regex: /https?:\/\/(www\.)?reddit\.com\/(user)?(u)?\/([^\n /]+)/gi },
|
|
39
|
+
{ type: 'subreddit', name: 'subreddit', regex: /https?:\/\/www\.?reddit\.com\/r\/?([a-z]+)\/?/gi },
|
|
40
|
+
{ type: 'slideshare', name: 'Slideshare', regex: /https?:\/\/(www\.)?slideshare\.net\/([^\n /]+)/gi },
|
|
41
|
+
{ type: 'tiktok', name: 'Tiktok', regex: /https?:\/\/(www\.)?tiktok.com\/@([^\n /]+)/gi },
|
|
42
|
+
{ type: 'tumblr', name: 'Tumblr', regex: /https?:\/\/([\da-z]+)\.tumblr\.com/gi },
|
|
43
|
+
{ type: 'twitter', name: 'Twitter', regex: /https?:\/\/((www|mobile)\.)?twitter\.com\/([^\n /]+)/gi },
|
|
44
|
+
{ type: 'vimeo', name: 'Vimeo', regex: /https?:\/\/(www\.)?vimeo\.com\/([^\n /]+)/gi },
|
|
45
|
+
{ type: 'vk', name: 'VK', regex: /https?:\/\/(www\.)?vk\.com\/([^\n /]+)/gi },
|
|
46
|
+
{ type: 'wordpress', name: 'Wordpress', regex: /https?:\/\/(?!subscribe)([\da-z]+)\.wordpress\.com/gi },
|
|
47
|
+
{ type: 'xing', name: 'Xing', regex: /https?:\/\/(www\.)?xing\.com\/(profile\/)([^\n /]+)/gi },
|
|
48
|
+
{ type: 'yahoo', name: 'Yahoo', regex: /https?:\/\/((profile|me|local)\.)?yahoo\.com\/([^\n /]+)/gi },
|
|
49
|
+
// yelp
|
|
50
|
+
{ type: 'yelpUser', name: 'Yelp User', regex: /https?:\/\/(www\.)?yelp\.[a-z]+\/user_details\?userid=([\da-z-]+)/gi },
|
|
51
|
+
{ type: 'yelpBusiness', name: 'Yelp Business', regex: /https?:\/\/www\.?yelp\.[a-z]+\/biz\/([\da-z-]+)/gi },
|
|
52
|
+
// amazon (not a social media site, but it's a profile)
|
|
53
|
+
{ type: 'amazonWishlist', name: 'Amazon wishlist', regex: /https?:\/\/www\.?amazon\.[a-z]+\/gp\/?registry\/?wishlist\/?([^\n /]+)/gi },
|
|
54
|
+
// weibo
|
|
55
|
+
{ type: 'weibo', name: 'Weibo', regex: /https?:\/\/(?:www\.)?weibo\.com\/([\da-z]{1,20}|\d+|u\/\d+)/gi },
|
|
56
|
+
// Trakt
|
|
57
|
+
// Twitch
|
|
58
|
+
// Shopify
|
|
59
|
+
// Ebay
|
|
60
|
+
// Slack
|
|
61
|
+
// Basecamp
|
|
62
|
+
// ProductHunt
|
|
63
|
+
// Steam
|
|
64
|
+
// SoundCloud
|
|
65
|
+
// BitBucket
|
|
66
|
+
// CashMe
|
|
67
|
+
// DailyMotion
|
|
68
|
+
// Disqus
|
|
69
|
+
// Photobucket
|
|
70
|
+
// Fanpop
|
|
71
|
+
// deviantART
|
|
72
|
+
// Instructables
|
|
73
|
+
// Kongregate
|
|
74
|
+
// LiveJournal
|
|
75
|
+
// Mix
|
|
76
|
+
// Tripit
|
|
77
|
+
// PayPal
|
|
78
|
+
// Flipboard
|
|
79
|
+
// Kik
|
|
80
|
+
// Codecademy
|
|
81
|
+
// Roblox
|
|
82
|
+
// Pastebin
|
|
83
|
+
// Ello
|
|
84
|
+
// IFTTT
|
|
85
|
+
// Fiverr
|
|
86
|
+
// Hackernews
|
|
87
|
+
// Spotify
|
|
88
|
+
// Houzz
|
|
89
|
+
// Contently
|
|
90
|
+
// BuzzFeed
|
|
91
|
+
// HubPages
|
|
92
|
+
// Venmo
|
|
93
|
+
// Bandcamp
|
|
94
|
+
// Wikia
|
|
95
|
+
// ReverbNation
|
|
96
|
+
// Wattpad
|
|
97
|
+
// Designspiration
|
|
98
|
+
// EyeEm
|
|
99
|
+
// Kano World
|
|
100
|
+
// Ask FM
|
|
101
|
+
// Newgrounds
|
|
102
|
+
// Younow
|
|
103
|
+
// Patreon
|
|
104
|
+
// Telegram
|
|
105
|
+
// Minecraft
|
|
106
|
+
];
|
|
107
|
+
/**
|
|
108
|
+
* @param {string} inputText the input text that will be parsed.
|
|
109
|
+
* @returns {Array<ParseResult>} an array with all the found social links
|
|
110
|
+
* @example
|
|
111
|
+
* ```js
|
|
112
|
+
* import { parser } from 'social-profile-url-parser';
|
|
113
|
+
*
|
|
114
|
+
* const result = parser(`
|
|
115
|
+
* slack facebook https://www.facebook.com/slackhq/
|
|
116
|
+
* SlackHQ twitter https://twitter.com/SlackHQ
|
|
117
|
+
* `)
|
|
118
|
+
*
|
|
119
|
+
* result === [
|
|
120
|
+
* {
|
|
121
|
+
* type: 'facebook',
|
|
122
|
+
* name: 'Facebook',
|
|
123
|
+
* username: 'slack',
|
|
124
|
+
* url: 'https://www.facebook.com/slackhq/'
|
|
125
|
+
* },
|
|
126
|
+
* {
|
|
127
|
+
* type: 'twitter',
|
|
128
|
+
* name: 'Twitter',
|
|
129
|
+
* username: 'SlackHQ',
|
|
130
|
+
* url: 'https://twitter.com/SlackHQ'
|
|
131
|
+
* }
|
|
132
|
+
* ];
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
function parser(inputText) {
|
|
136
|
+
var resultsMap = [];
|
|
137
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
138
|
+
for (var _i = 0, regexes_1 = exports.regexes; _i < regexes_1.length; _i++) {
|
|
139
|
+
var regex = regexes_1[_i];
|
|
140
|
+
var result = void 0;
|
|
141
|
+
// eslint-disable-next-line no-cond-assign
|
|
142
|
+
while ((result = regex.regex.exec(inputText)) !== null) {
|
|
143
|
+
var username = result[result.length - 1];
|
|
144
|
+
resultsMap.push({
|
|
145
|
+
type: regex.type,
|
|
146
|
+
name: regex.name,
|
|
147
|
+
url: result[0],
|
|
148
|
+
username: username
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return resultsMap;
|
|
153
|
+
}
|
|
154
|
+
exports.parser = parser;
|
|
155
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAkD;IACpE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,4CAA4C,EAAE;IAC1F,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,4CAA4C,EAAE;IAC7F,EAAE,IAAI,EAAE,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a;IACb,gBAAgB;IAChB,aAAa;IACb,cAAc;IACd,MAAM;IACN,SAAS;IACT,SAAS;IACT,YAAY;IACZ,MAAM;IACN,aAAa;IACb,SAAS;IACT,WAAW;IACX,OAAO;IACP,QAAQ;IACR,SAAS;IACT,aAAa;IACb,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,WAAW;IACX,WAAW;IACX,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,eAAe;IACf,UAAU;IACV,kBAAkB;IAClB,QAAQ;IACR,aAAa;IACb,SAAS;IACT,aAAa;IACb,SAAS;IACT,UAAU;IACV,WAAW;IACX,YAAY;CACb,CAAC;AAgBF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,SAAgB,MAAM,CAAC,SAAiB;IACtC,IAAM,UAAU,GAAuB,EAAE,CAAC;IAE1C,gDAAgD;IAChD,KAAoB,UAAO,EAAP,YAAA,eAAO,EAAP,qBAAO,EAAP,IAAO,EAAE;QAAxB,IAAM,KAAK,gBAAA;QACd,IAAI,MAAM,SAAA,CAAC;QACX,0CAA0C;QAC1C,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,IAAI,EAAE;YACtD,IAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAE3C,UAAU,CAAC,IAAI,CAAC;gBACd,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;gBACd,QAAQ,UAAA;aACT,CAAC,CAAC;SACJ;KACF;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AApBD,wBAoBC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "social-profile-url-parser",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "A Node.js library for extracting social media profile URLs from a block of text",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"node",
|
|
7
|
+
"social",
|
|
8
|
+
"social media",
|
|
9
|
+
"profile",
|
|
10
|
+
"link",
|
|
11
|
+
"url",
|
|
12
|
+
"parser",
|
|
13
|
+
"username"
|
|
14
|
+
],
|
|
15
|
+
"author": "wvdp",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"homepage": "https://github.com/wvanderp/social-profile-url-parser",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/wvanderp/social-profile-url-parser.git"
|
|
21
|
+
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/wvanderp/social-profile-url-parser/issues"
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
"main": "./lib/index.js",
|
|
28
|
+
"types": "./lib",
|
|
29
|
+
"files": [
|
|
30
|
+
"lib/**/*"
|
|
31
|
+
],
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "rimraf lib && tsc && npm run buildDocs",
|
|
36
|
+
"coverage": "npm run build && nyc --reporter=lcov --all -- npm run test",
|
|
37
|
+
"lint": "tsc --noEmit && eslint --ext ts,tsx,json,js src/",
|
|
38
|
+
"test": "mocha -r ts-node/register test/index.ts",
|
|
39
|
+
"buildDocs": "jsdoc2md --template README.hbs --files lib/index.js > README.md"
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/chai": "^4.3.4",
|
|
45
|
+
"@types/mocha": "^10.0.1",
|
|
46
|
+
"@types/node": "^18.11.18",
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^5.47.1",
|
|
48
|
+
"@typescript-eslint/parser": "^5.47.1",
|
|
49
|
+
"chai": "^4.3.7",
|
|
50
|
+
"eslint": "^8.30.0",
|
|
51
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
52
|
+
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
53
|
+
"eslint-import-resolver-typescript": "^3.5.2",
|
|
54
|
+
"eslint-plugin-compat": "^4.0.2",
|
|
55
|
+
"eslint-plugin-import": "^2.26.0",
|
|
56
|
+
"eslint-plugin-jsdoc": "^39.6.4",
|
|
57
|
+
"eslint-plugin-ramda": "^2.5.1",
|
|
58
|
+
"eslint-plugin-sonarjs": "^0.17.0",
|
|
59
|
+
"eslint-plugin-unicorn": "^45.0.2",
|
|
60
|
+
"jsdoc-to-markdown": "^8.0.0",
|
|
61
|
+
"mocha": "^10.2.0",
|
|
62
|
+
"nyc": "^15.1.0",
|
|
63
|
+
"rimraf": "^3.0.2",
|
|
64
|
+
"ts-node": "^10.9.1",
|
|
65
|
+
"typescript": "^4.9.4"
|
|
66
|
+
}
|
|
67
|
+
}
|