Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/microsoft/is-social
Validators for social media profiles.
https://github.com/microsoft/is-social
Last synced: about 1 month ago
JSON representation
Validators for social media profiles.
- Host: GitHub
- URL: https://github.com/microsoft/is-social
- Owner: microsoft
- License: mit
- Archived: true
- Created: 2015-05-08T19:20:01.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-08-15T21:16:44.000Z (over 2 years ago)
- Last Synced: 2024-09-21T07:03:48.286Z (5 months ago)
- Language: JavaScript
- Size: 190 KB
- Stars: 23
- Watchers: 42
- Forks: 13
- Open Issues: 7
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# is-social [](https://travis-ci.org/mixer/is-social) [](https://coveralls.io/r/MCProHosting/is-social)
This provides utilities for validating and parsing social media links, with lovely BDD-style assertions.
```js
var is = require('is-social').is;is.twitter.profile('https://twitter.com/ConnorPeet'); // => true
is.twitter.handle('@ConnorPeet'); // => true
// see more usage below
```## API
* `is` runs validations on the input. There are nested functions, which take the input as the first argument and an optional second `options` object.
* [twitter](https://twitter.com)
* profile (twitter profile URL)
* handle (twitter handle). Takes an option `at`, which is `true` to require the "@" symbol, `false` to disallow it, and undefined to not care either way. Defaults to undefined.
* [facebook](https://facebook.com)
* profile (validates URLs for both profiles and pages)
* name (validates names for both profiles and pages)
* [youtube](https://youtube.com)
* url (channel or user URL)
* name (channel or user name)
* [player](https://player.me)
* url (player.me url)
* name (player.me profile name)
* [steam](https://steamcommunity.com)
* name (steam user name)
* id (steam profile 64 bit ID)
* accountName (steam profile URL)
* accountId (steam ID URL)
* [instagram](https://instagram.com)
* name (instagram profile username)
* url (instagram url)
* [soundcloud](https://soundcloud.com)
* name (soundcloud profile name)
* url (soundcloud url)
* [spreadshirt](https://spreadshirt.com)
* name (spreadshirt profile name)
* url (spreadshirt url)
* [patreon](https://patreon.com)
* name (patreon profile name)
* url (patreon url)
* [twitch](https://twitch.tv)
* name (twitch channel name)
* url (twitch url)
* [medium](https://medium.com)
* profile (medium profile URL)
* handle (medium handle). Takes an option `at`, which is `true` to require the "@" symbol, `false` to disallow it, and undefined to not care either way. Defaults to undefined.