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

identityfusion

v1.0.4

Published

Turns an HTML input into a Dynamic Identity Fusion Index (DIFI) widget

Downloads

12

Readme

npm version

Description

The identityfusion module turns an HTML input into an interactive widget that administers the Dynamic Identity Fusion Index (DIFI) [1], which assesses the degree to which the user's own identity fuses with a group identity. The widget consists of a circle labeled "Me" which can be dragged or moved using buttons to overlap a circle which represents the group.

demo

Two values are recorded:

  1. Distance
  2. Overlap

[1] Jimenez, J., Gomez, A., Buhrmester, M. D., Vázquez, A., Whitehouse, H., & Swann, W. B. (2016). The dynamic identity fusion index: A new continuous measure of identity fusion for web-based questionnaires. Social Science Computer Review, 34(2), 215-228.

Usage

To use the widget, create an HTML input with a name:

<input name="DIFI" id="DIFI" />

Then include the library and create a new DIFIInput instance:

<script src="identityfusion.js"></script>
<script>
  var el = document.getElementById('DIFI');
  new identityfusion.DIFIInput(el, {
    groupLabel: 'USA'
  });
</script>

Instantiating the DIFIInput will replace the original input with two hidden inputs named DIFI_distance and DIFI_overlap (with the original name as the prefix).

See dist/demo.html for an example.

Options

Several options can be specified in the second parameter when constructing a DIFIInput:

  • meLabel: The label for the circle representing the user. (Default: Me)
  • groupLabel: The label for the circle representing the group. (Default: Group)
  • groupImage: URL for an image to be shown as the background of the group circle. (Default: none)

Disclaimer

This project is sponsored by the Defense Advanced Research Projects Agency through the NGS2 program. The contents of this directory does not necessarily reflect the position or the policy of the Government and no official endorsement should be inferred.