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

ndex-network-search

v0.0.6

Published

Find NDEx networks with ease.

Downloads

4

Readme

NDEX Valet

Browse and select NDEx networks through custom search queries

####Usage:

Parameters

  • style: Override default css styles for Valet container
  • onLoad: a function with a list of networks as a parameter. Called when load networks is clicked in the cart.

NDExValet

NDExValet is a smart network search CyComponent. NDExValet allows advanced queries against an NDEx database, and presents the results of a search in many vizualizations, including tables, images, cards, etc. These vizualizations allow the user to understand and compare networks, and select the networks that they wish to work on. NDEx can be styled and fitted into any web page.

CyComponent Library Name: NDExValet

Note: A CyComponent's library name appears in npm, and is the name used for importing the CyComponent as a library.

CyStore Registered Name: valet

Note: The CyComponents's registered name appears when it's initialized with the CyFramework in the CyFramework's data model.

Sample Usage

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
    <script src="http://code.jquery.com/jquery-2.1.3.min.js"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script src="NDExStore/build/NDExStore.js"></script>
<script src="NDExValet/build/NDExValet.js"></script>
  cyto.render(NDExValet, document.getElementById('valet'), {
    style: {
      height: '80%',
      width: '90%'
    },
    onLoad: function(networkList) {}
  })
</script>

lucene

The lucene store is an immutablejs map. The lucene store has a flag indicating whether the client is still searching fo networks (for displaying a spinner, etc). It also containers an error that is filled if the search fails, and a list of networks that contain the results of the previous search.

Data model

lucene: Map({ searching: false, networkSummaries: Set(), error: null })


### Action Creators

__Registed Name:__ luceneActions
> The object under which the action creators are exported under. 

#### searchBegin()
> Sets the searching flag to true, use before beginning a search with searchFor/3

#### searchError(error)
> Called from searchFor/3, not normally used elsewhere, sets the error field with the value of error.
>
> __Params__
> - error: An error object that can be inspected to see the error reason of a failed lucene search.

#### seachFor(server, query, resultSize)
> Begins a lucene search agains the server with a query string, this search will either update networkSummaries or error, depending on the outcome of the search. Either way, it will then flip the searching flag to false.
>
> __Params__
> - server: A string, usually taken from the server store to reflect the store's choice of server.
> - query: A string, the lucene query to search against NDEx. 
> - resultSize(OPTIONAL): Default of 50, setting this to a high value will incease the searchTime. This is the max number of results returned by the lucene search.

server
---
> The server store is an immutable map. It containers information about the NDEx server to be used, the username and password, and the log in state of the user. If loggedIn is false, th userName and userPass fields are considered garbage. Actions allow setting the server name and address, and logging the user in and out.

__Data model__
> ```javascript
  lucene: Map({
    serverName: "Public NDEx",
    serverAddress: "http://public.ndexbio.org",
    userName: "",
    userPass: "",
    loggedIn: false
  })

Action Creators

Registed Name: serverActions

The object under which the action creators are exported under.

setServer(name, address)

Set the server name and address.

Params

  • name: A string, a human readable identifier for the server.
  • address: The url of the NDEx server.

login(name, pass)

Sets loggedIn to true, and adds the users credentials (unencrypted).

Params

  • name: The user's NDEx username
  • pass: The user's NDEx password

logout()

Sets the loggedIn flag to false.