<commit_before># socialcount.js

Easily get social share counts for a url.

[![browser support](https://ci.testling.com/olahol/socialcount.js.png)
](https://ci.testling.com/olahol/socialcount.js)

## Example

```js
Socialcount.get("twitter", "http://github.com", function (count) {
  console.log(count); // 1164
});
```

```js
Socialcount.all("http://github.com", function (counts) {
  console.log(counts); // { twitter: 1164, facebook: 11111, pinterest: 6 }
});
```

## Methods

### Socialcount.get(provider, url, cb(count))

Get share count for `url` from `provider` (currently twitter, facebook, pinterest and google.)

* * *

### Socialcount.all(url, cb(counts))

Get all share counts for `url` from available providers, counts is an
object with the providers as keys and the counts as values.

* * *

### Socialcount.get(provider, cb(count))

Get share count for `window.location` from `provider` (currently twitter, facebook, pinterest and google.)

* * *

### Socialcount.all(cb(counts))

Get all share counts for `window.location` from available providers, counts is an
object with the providers as keys and the counts as values.

## CHANGELOG

### v0.0.4

* If called without a url, use `window.location`

## License

MIT<commit_msg>fix changelog<commit_after># socialcount.js

Easily get social share counts for a url.

[![browser support](https://ci.testling.com/olahol/socialcount.js.png)
](https://ci.testling.com/olahol/socialcount.js)

## Example

```js
Socialcount.get("twitter", "http://github.com", function (count) {
  console.log(count); // 1164
});
```

```js
Socialcount.all("http://github.com", function (counts) {
  console.log(counts); // { twitter: 1164, facebook: 11111, pinterest: 6 }
});
```

## Methods

### Socialcount.get(provider, url, cb(count))

Get share count for `url` from `provider` (currently twitter, facebook, pinterest and google.)

* * *

### Socialcount.all(url, cb(counts))

Get all share counts for `url` from available providers, counts is an
object with the providers as keys and the counts as values.

* * *

### Socialcount.get(provider, cb(count))

Get share count for `window.location` from `provider` (currently twitter, facebook, pinterest and google.)

* * *

### Socialcount.all(cb(counts))

Get all share counts for `window.location` from available providers, counts is an
object with the providers as keys and the counts as values.

## CHANGELOG

### v0.1.0

* Add UMD so project can be used as AMD module.
* Add Google Plus as provider `google`.

### v0.0.4

* If called without a url, use `window.location`

## License

MIT
{'fraction_non_alphanumeric': 0.14893617021276595, 'fraction_numerical': 0.014313346228239845, 'mean_word_length': 4.478813559322034, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7160829', 'n_tokens_mistral': 880, 'n_tokens_neox': 827, 'n_words': 265}