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

ng-pull

v1.0.0

Published

[![Build Status](https://travis-ci.org/FDIM/ng-pull.svg?branch=master)](https://travis-ci.org/FDIM/ng-pull) [![Coverage Status](https://coveralls.io/repos/github/FDIM/ng-pull/badge.svg?branch=master)](https://coveralls.io/github/FDIM/ng-pull?branch=maste

Downloads

4

Readme

ng-pull

Build Status Coverage Status

A set of directives allowing you to implement pull to action pattern, either vertically or horizontally.

Live Demo: http://fdim.github.io/ng-pull/example/

installation

As simple as "bower install ng-pull" :)

usage

To use this pull gesture, simply add on-pull-(down|up|left|right) attribute with an expression to execute when progress reaches 100%. If expression evaluates to false, item will remain pushed until $reset function is invoked.

<div class="container items-list" on-pull-down="loadNewItems()" pull-down-distance="60" pull-down-progress="$pullDownProgress" on-pull-up="loadMoreItems($reset)" pull-up-distance="60" pull-up-progress="$pullUpProgress">
      <div pull-down-container>
          <div>{{$pullDownProgress|number:2}}</div>
          <div>{{$pullDownProgress==100?'Release to request new items':'Pull down to refresh'}}</div>
      </div>
      <ul pull-target>
        <li ng-repeat="i in items" pull-left-disabled="i.disabled" on-pull-left="false" pull-left-distance="120" pull-left-reset="$cancelDelete" pull-left-progress="$pullLeftProgress" on-pull-right="archiveItem(i)" pull-right-distance="150" pull-right-disabled="i.disabled">
          <div pull-right-container>
            <p style="padding-top:20px; text-align:right;">{{$pullRightProgress|number:2}} archived</p>
          </div>
          <div pull-target>
            <div class="image"></div>
            <div class="content">
              <h3>{{i.title}}</h3>
              <p>{{i.intro}}</p>
            </div>
          </div>
          <div pull-left-container>
            <p style="padding-top:20px;" ng-if="$pullLeftProgress<100">{{$pullLeftProgress|number:2}} deleted</p>
            <p style="padding-top:20px;" ng-if="$pullLeftProgress==100">
              <button ng-click="$cancelDelete(i)">cancel</button>
              <button ng-click="removeItem(i)">delete</button>
            </p>
          </div>
        </li>
      </ul>
      <div pull-up-container style="text-align:center;">
          <div>{{$pullUpProgress|number:2}}</div>
          <div ng-if="!loadingMore">{{$pullUpProgress==100?'Release to begin loading':'Pull down to load more'}}</div>
          <div ng-if="loadingMore">Please wait, loading</div>
      </div>
    </div>
    

Have a look at the example for more details.

options

You can customise behavior by providing additional attributes:

  • pull-(down|up|left|right)-distance : number of pixels user has to move the element in order to trigger the expression. Default:100
  • pull-(down|up|left|right)-progress : scope variable name to store progress value. Default: $pull(Down|Up|Left|right)Progress
  • pull-(down|up|left|right)-threshold : progress value to cancel the gesture if it is not reached within timeout. Default: 5
  • pull-(down|up|left|right)-timeout : number of ms given for the user to reach threshold value or gesture will be cancelled. Default: 300
  • pull-(down|up|left|right)-disabled : an expression to watch to enable or disable gesture
  • pull-(down|up|left|right)-reset : scope variable name to expose reset function. Default: $pull(Down|Up|Left|right)Reset

Note that directives are not using isolated scope.