How to use link-preview-js - 1 common examples

To help you get started, we’ve selected a few link-preview-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github maherzaidoune / react-native-url-preview / index.js View on Github external
getPreview = text => {
    LinkPreview.getPreview(text)
      .then(data => {
        this.setState({
          isUri: true,
          linkTitle: data.title ? data.title : undefined,
          linkDesc: data.description ? data.description : undefined,
          linkImg:
            data.images && data.images.length > 0
              ? data.images.find(function(element) {
                  return (
                    element.includes(".png") ||
                    element.includes(".jpg") ||
                    element.includes(".jpeg")
                  );
                })
              : undefined,
          linkFavicon:

link-preview-js

Javascript module to extract and fetch HTTP link information from blocks of text.

MIT
Latest version published 13 days ago

Package Health Score

86 / 100
Full package analysis

Popular link-preview-js functions