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 🙏

© 2026 – Pkg Stats / Ryan Hefner

license-filter

v0.2.5

Published

Open-source licenses filter algorithm library written in TypeScript

Downloads

62

Readme

Open Source License filter

Open-source licenses filter algorithm library written in TypeScript

NPM Dependency CI & CD

NPM

Link

  • Design document: https://kaiyuanshe.feishu.cn/wiki/wikcnRn5pkE3BSvqFUMkJPymaG3
  • UI implement: https://oss-toolbox.kaiyuanshe.cn/license-filter

Usage

Installation

npm i license-filter

Evaluation

import {
    FeatureAttitude,
    InfectionRange,
    filterLicenses
} from 'license-filter';

const list = filterLicenses({
    popularity: FeatureAttitude.Negative,
    reuseCondition: FeatureAttitude.Positive,
    infectionIntensity: FeatureAttitude.Positive,
    infectionRange: InfectionRange.Module,
    jurisdiction: FeatureAttitude.Undefined,
    patentStatement: FeatureAttitude.Positive,
    patentRetaliation: FeatureAttitude.Positive,
    enhancedAttribution: FeatureAttitude.Positive,
    privacyLoophole: FeatureAttitude.Negative,
    marketingEndorsement: FeatureAttitude.Negative
});

console.log(list); // filtered licenses

Design

Evaluation Dimension

  1. Popularity
  2. Reuse Condition
  3. Infection Intensity
  4. Infection Range
  5. Jurisdiction
  6. Patent Statement
  7. Patent Retaliation
  8. Enhanced Attribution
  9. Privacy Loophole
  10. Marketing Endorsement

Filter Algorithm

  1. Mark the weight of various Open-source licenses according to the above Evaluation dimensions:

    1. Positive +1: clearly supports the feature of this dimension
    2. Undefined 0: no explicit mention of the dimension's feature
    3. Negative -1: clearly oppose the characteristics of this dimension
  2. Input the user's Attitude towards the above dimensional features:

    1. Positive +1: definitely need the feature of this dimension
    2. Undefined 0: insensitive to the feature of this dimension
    3. Negative -1: explicitly reject the feature of this dimension
  3. Calculate each license by the following formula:

    Total weight per license = Dimension weight item x Dimension user attitude value

  4. All licenses are ranked in reverse order of the total weight in this screening, which is the result

Project History

Original

http://oss-watch.ac.uk/apps/licdiff/

Old Chinese Edition

Entry

https://kaiyuanshe.cn/license-tool/

Code

  • Page: https://github.com/kaiyuanshe/kaiyuanshe.github.io/blob/hexo/themes/Electron/layout/license-tool.ejs
  • Logic: https://github.com/kaiyuanshe/kaiyuanshe.github.io/tree/hexo/themes%2FElectron%2Fsource%2FOSLS

New Chinese Edition

Pre-research

https://github.com/luojiyin1987/license-tool

Reference

Standard data

  1. https://opensource.org/licenses
  2. https://spdx.org/licenses/
  3. https://tldrlegal.com/licenses/browse

Theoretical research

https://mp.weixin.qq.com/s/ja_w-2NNSIKcO4vv7iN5vg

Open-source project

  1. https://github.com/ufal/public-license-selector/
  2. https://github.com/hernanmd/license-selector
  3. https://github.com/creativecommons/cc-license-chooser