social-browser

A small library providing utility methods to find if a page is being viewed in a social browser.

Usage no npm install needed!

<script type="module">
  import socialBrowser from 'https://cdn.skypack.dev/social-browser';
</script>

README

social-browser

A node module providing utility methods to detect which social browser is a client using.

Installation

  npm install social-browser --save

Usage

  var socialbrowser = require('social-browser');
  var browser = socialbrowser.detect();
  if (browser.major === "facebook") {
    console.log('User is using Facebook client browser.');
  }

Tests

   npm test

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

Release History

  • 0.0.1 Initial release