npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vigour-env

v2.0.7

Published

Provides info about the device, platform and build

Downloads

73

Readme

js-standard-style npm version Build Status

env

Provides info about the device, platform and build

Install

Add "env": "git+ssh://[email protected]:vigour-io/env.git#master" to the dependencies in your app's pakage.json, then run npm update env Coming soon: npm i vigour-env

Updates via upstream remote

Usage

The plugin will be used to access device properties and will listen for changes of those. It will also used to catch device events like pause, resume and button.

Properties expected (-- those can change based on their availability on different platforms --): bundleId, country, language, region, timezone, model, os, osVersion, appVersion and network.

If a property change on the device this can be communicated using the change event passing always the same object format as in init but with just the properties changed

The plugin expects to receive feedbacks about button press on: volume up (volup), volume down (voldown) and back (back)

// plugin on init will expect to receive back the values for its own properties
// passed as an object, eg: {network: 'wifi', model: 'iPhone 6s'}
var env = require('vigour-env')

// listening for the plugin to be ready
env.ready.is(true, () {
  // we have properties filled in here!
})

// listening for properties changes
env.network.on(() => {
 // network is changed! 
})


// listening of pause and resume events
env.paused.on(() => {
  if (env.paused.val) {
    console.log('we went in background!')
  } else {
    console.log('we resumed!')
  }
})

env.button.on((data) => {
  console.log('Button pressed', data)
})

See for more use cases tests

Plugin results

Values of the plugin properties on different devices/simulators

Android Simulator
  • os: Android
  • osVersion: 23
  • appVersion: 1.0.0
  • model: Android SDK built for x86
  • bundleId: io.vigour.env
  • network: mobile
  • language: en
  • region: US
  • country: us
  • timezone: Europe/Amsterdam
  • platform: android
  • browser: true
  • device: tablet
iOS Simulator
  • os: iPhone OS
  • osVersion: 9.2
  • appVersion: 1.0
  • model: Simulator
  • bundleId: io.vigour.env
  • network: WiFi
  • language: en
  • region: US
  • country: US
  • timezone: 2016-01-06T00:18:39+0100
  • platform: ios
  • browser: true
  • device: phone