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

ngp-core

v0.0.67

Published

stock all observables, timeout and interval, kill all when component is destroying

Downloads

31

Readme

ngp-core

listener

stock all observables, timeout and interval, kill all when component is destroying

methods

| name | arguments | return | goal | |-----------------|----------------------------------------------------------------------------------|-------------------|-----------------------------------------------------------------------------------------------| | addSubscription | Subscription | void | add subscription in list will destroying when component destroy | | addObservable | Observable, Function next, Optional(Function error), Optional(Function complete) | void | create subscription with observable and add it in list will destroying when component destroy | | addTimeout | any (id timeout) | any (id timeout) | add timeout in list will clearing when component destroy | | addInterval | any (id interval) | any (id interval) | add interval in list will clearing when component destroy | | clearTimeout | any (id timeout) | void | clear and remove of list | | clearInterval | any (id timeout) | void | clear and remove of list | | appendTimeout | Timeout, Function execute | any (id timeout) | create timeout with time and execute your method | | appendInterval | Timeout, Function execute | any (id interval) | create interval with time and execute your method | | onDestroy | overrideable to execute on destroy | void | execute when component is destroying |

directive

builder template in component, please use readme in other library to know use it

  • ngp-body
  • ngp-event
  • ngp-header
  • ngp-footer
  • ngp-title

type

Color

enum of color bootstrap

  • DARK_BLUE: primary
  • BLUE: info
  • GREY: secondary
  • BLACK: dark
  • WHITE: white
  • GREEN: success
  • RED: danger
  • YELLOW: warning
  • BEIGE: light

TimeoutUnit

  • MILLISECOND
  • SECOND
  • MINUTE
  • HOUR

alias

  • ColorProperty: Color | 'dark_blue' | 'blue' | 'grey' | 'black' | 'white' | 'green' | 'red' | 'yellow' | RGB | string
  • EventType: keyof HTMLElementEventMap
  • BooleanProperty: boolean | 'true' | 'false'
  • NumberProperty: number | string
  • TimeoutUnitProperty: TimeoutUnit | 'ms' | 's' | 'm' | 'h'
  • TimeoutProperty: Timeout | number

model

ngp-event

| property | type | optional | contain | |----------|-----------|----------|--------------------| | name | string | true | id component | | type | EventType | false | type event receive | | event | Event | true | event catching |

RGB

| property | type | optional | contain | |----------|--------|----------|--------------------------| | red | number | false | ratio red | | blue | number | false | ratio blue | | green | number | false | ratio green | | alpha | number | true | default 1 opacity 0 -> 1 |

timeout

| property | type | optional | contain | |----------|-------------|----------|---------------------| | value | number | false | time | | unit | TimeoutUnit | true | default millisecond |

function

component

| name | arguments | return | goal | |-----------------------|---------------------------------|--------------------------------------------|--------------------------------------| | propertyToBoolean | BooleanProperty/undefined | boolean | convert multiple type to boolean | | propertyToNumber | NumberProperty/undefined | number/undefined | convert multiple type to number | | propertyToColor | ColorProperty/undefined | {color?: Color, custom?: string}/undefined | convert multiple type to Color | | rgbToColor | RGB/undefined | string/undefined | rgb to rgba syntax css | | propertyToTimeoutUnit | TimeoutUnitProperty | TimeoutUnit | convert multiple type to TimeoutUnit | | millisecondToUnit | time: number; unit: TimeoutUnit | number | convert millisecond to unit | | timeoutToMillisecond | Timeout | number | timeout to millisecond |

observable

| name | arguments | return | goal | |--------------------------|-------------------------------------------------------------------------------------------------------------------------|------------------------|-------------------------------------------------| | newEmitter | any | BehaviorSubject | | | newEmitterNullable | | BehaviorSubject | | | emitterToObservable | () -> BehaviorSubject | Observable | create observable with skip default value | | emitterToLimitObservable | () -> BehaviorSubject; limit: number | Observable | create obsservable skip default and take limit | | observableErrorComplete | Observable/undefined; ((error) -> Observable/undefined)/undefined; complete: (() ->void)/undefined | Observable/undefined | apply error and/or complete to observable | | subscribe | Observable/undefined; next: (any) => void, ((error) -> Observable/undefined)/undefined; complete: (() ->void)/undefined | Subscription/undefined | apply next, error and/or complete to observable |

enum

| name | arguments | return | goal | |-----------|---------------------------------|---------------|-----------------------| | enumKeyOf | {[s: string]: any}; key: string | any/undefined | find in enum by name | | valueOf | {[s: string]: any}; value: any | any/undefined | find in enum by value |