Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

app-meta

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-meta

Access meta data about an application.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

app-meta

Access meta data about an application.

Travis build status Code Climate Test Coverage Dependency Status devDependency Status

A common feature that I include in my client side apps is meta information about the application itself. Three common values are:

  • the version of the app
  • the commit SHA that is deployed
  • the environment that the app is running in

This library provides a simple method to store and access those bits of data that you can use across all of your apps.

Getting Started

Set up your server to send over the meta data as data attributes on the html element. This might look like:

<html
  lang='en'
  data-version='<%= version %>'
  data-sha='<%= sha %>',
  data-env='<%= env %>'
  >

Then, require in this library.

import meta from 'path/to/app-meta';

console.log(
  'Got some data:', 
  meta.VERSION,
  meta.SHA,
  meta.ENV
);

Browser Support

Should work in IE6+

Module Support

It exports UMD, so it's compatible with AMD, CJS, and as a browser global (window.meta).

Keywords

FAQs

Package last updated on 07 Aug 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc