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

eye5

v0.1.1

Published

OpenUI5 control instance viewer

Downloads

9

Readme

eye5

Build Status

OpenUI5 control instance viewer.

Useful for getting references to OpenUI5 controls during console debugging.

Play with eye5: https://jonbri.github.io/eye5

Motivation

While developing OpenUI5 applications, I found myself frequently following this pattern while debugging in the browser:

  • inspect where I think the dom root of a control is
  • almost always miss and have to dig around in the "Elements" tab for the desired dom ref
  • copy the element's id to the clipboard
  • paste the id into the console
  • get a jQuery selector to the ref by wrapping with: jQuery('#pastedId')
  • finally, get the control reference with: .control()[0]

After doing this a couple hundred times I decided to streamline the process with a small tool, hence eye5.

An alternative to eye5 is the "UI5 Inspector" Chrome plugin.

Usage

Load node_modules/eye5/dist/eye5.min.js. The nature of this tool (on-the-fly debugging) means that it's often most convenient to simply copy-paste the distribution directly into the console. You can also integrate via NPM.

The search function will return an array of control references as well as highlight the targeted controls with a display label.

Controls with button in their id: eye5.search('button')

If you know an identifying part of an id, using a regular expression: var oButton = eye5.search(/toplevel.*-button0/)[0]

Searches and "all" will populate the "target" variables:

eye5.search('button');
// eye5.target -> first search result
// eye5.target1 -> second search result
// eye5.target2 -> third search result, etc

Get all controls with: eye5.all()

Configuration

config(object) is used to configure eye5.

Properties:

  • standoutDelay (default: 3000) -> search highlighting time
  • showLabel -> whether to show labels around search matches
  • labelStyle -> css object for search labels
  • controlHighlighting -> whether to alter search target visually
  • controlStyle -> css object control highlighting

Example:

eye5.config({
    standoutDelay: 1000 // one second
    controlStyle: { // change the highlight border
        border: '1px solid red'
    }
})

Build

npm install
npm test        # run test suite (qunit, phantomjs)
npm run lint    # eslint
npm run serve   # http://localhost:9000/index.html
npm run package # generates eye5.min.js

License

BSD-2-Clause