
Product
A New Overview in our Dashboard
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.
social-profile-url-parser
Advanced tools
A Node.js library for extracting social media profile URLs from a block of text
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.
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.
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.
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. Your pull request will be reviewed by the project maintainers and, if accepted, will be merged into the main codebase.
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.
Array.<ParseResult>
Kind: global function
Returns: Array.<ParseResult>
- an array with all the found social links
Param | Type | Description |
---|---|---|
inputText | string | the input text that will be parsed. |
Example
import { parser } from 'social-profile-url-parser';
const result = parser(`
slack facebook https://www.facebook.com/slackhq/
SlackHQ twitter https://twitter.com/SlackHQ
`)
result === [
{
type: 'facebook',
name: 'Facebook',
username: 'slack',
url: 'https://www.facebook.com/slackhq/'
},
{
type: 'twitter',
name: 'Twitter',
username: 'SlackHQ',
url: 'https://twitter.com/SlackHQ'
}
];
FAQs
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.