New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

web-manifest-reader

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-manifest-reader

A reader for reading web manifest file data.

1.2.3
latest
Source
npm
Version published
Weekly downloads
43
16.22%
Maintainers
1
Weekly downloads
 
Created
Source

web-manifest-reader

npm GitHub file size in bytes npm

This package reads manifest referenced in the current web page.

Your web manifest

<link rel="manifest" href="manifest.json">

{
  "name": "Google I/O 2015",
  "short_name": "I/O 2015",
  "start_url": "./?utm_source=web_app_manifest",
  "display": "standalone"
  "icons": [{
    "src": "images/touch/homescreen48.png",
    "sizes": "48x48",
    "type": "image/png"
  }]
}

Get started

With npm
npm install web-manifest-reader
Otherwise
<script async src="https://cdn.jsdelivr.net/npm/web-manifest-reader@VERSION/lib.js"

Then, you can use it easly.

With ES6 module
import Manifest from 'web-manifest-reader';

Manifest.read().then(manifestData => {
    console.log('I want the name: '+manifestData.name);
}).catch(error => {
    console.log('an error occured', error.message);
});
Without ES6 module
WebManifestReader.readCallback(function(manifestData, error) {
    if (error) {
        console.log('An error occurred', error.message);
        return;
    }

    console.log('I want the name: '+manifestData.name);
});

Keywords

pwa

FAQs

Package last updated on 27 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts