# solink

> Small module for creating share urls

Latest version **1.0.0** (published 2015-04-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install solink
pnpm add solink
yarn add solink
bun add solink
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-04-19 |
| First published | 2015-04-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Besart Hoxhaj |
| Maintainers | bes |

## Links

- npm: https://www.npmjs.com/package/solink
- Repository: https://github.com/besarthoxhaj/solink
- Issues: https://github.com/besarthoxhaj/solink/issues
- npm.io page: https://npm.io/package/solink

## Dependencies (1)

- [torf](https://npm.io/package/torf.md) ^1.0.2

## Recent versions

- 1.0.0 (latest) — 2015-04-19

## README

# solink

Simple utility which creates link for sharing content on social media.

	npm install solink --save

Use it with **[perma](https://github.com/nelsonic/perma)** in order to create powerful tracking tool for your content on social media.

##share.fb(), share.twitter()

```js
var share = require('solink');

var opts = {
	url: 'http://foo.bar/hello-world/this_is_a_path',
	via: 'besart_hoxhaj'
	related: 'founderscoders'
	hashtags: 'code free javascript'
	text: 'Learn how to program for free'
};

var urlFb = share.fb(opts);

/**
	Returns:

	https://www.facebook.com/share.php?
	u=http%3A%2F%foo.bar%2Fhello-world%2Fthis_is_a_path
*/

var urlTwitter = share.twitter(opts);

/**
	Returns:

	https://twitter.com/share?
	url=http%3A%2F%foo.bar%2Fhello-world%2Fthis_is_a_path&
	via=besart_hoxhaj&
	related=founderscoders&
	hashtags=coding%20london&
	text=Hello%20world!
*/

```

##share.email()

```js
var optsMail = {
	to:      'someone@foo.bar',
	cc:      'sometwo@bar.foo',
	bcc:     'anotherone@bar.foo',
	subject: 'Some "subject" text here',
	body:    "Some body 'message' here"
};

var urlEmail = share.email(optsMail);

/**
	Returns:

	mailto:someone@foo.bar?
	cc=sometwo@bar.foo&
	bcc=anotherone@bar.foo&
	subject=Some%20%22subject%22%20text%20here&
	body=Some%20body%20'message'%20here
*/

```

---
_Source: https://npm.io/package/solink · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
