search-name

1.0.0 • Public • Published

search-npm-name

Find unused npm names.

search.js 放到node_modules外面,search-npm-name作为模块用

Usage

npm i search-npm-name
$ fsc vue vue-dom vue-router fsc

# output
fsc: Unused ✅
vue-dom: Used ❌
vue-router: Used ❌
vue: Used ❌

Use config files

// names.js
const pkgs = [];

const firstLetters = 'abcdefghigklmnopqrstuvwxyz'.split('');
const secondLetters = '0'.split('');

for (let i = 0; i < firstLetters.length; i ++) {
  for(let j = secondLetters.length - 1; j >= 0; j --) {
    pkgs.push(`${firstLetters[i]}${secondLetters[j]}`);
  }
}

console.log(pkgs); // [ 'a0','b0','c0','d0','e0','f0','g0','h0','i0','g0','k0','l0','m0','n0','o0','p0','q0','r0','s0','t0','u0','v0','w0','x0','y0','z0' ]

module.exports = pkgs;
fsc -c names.js

# output
f0: Used ❌
a0: Used ❌
b0: Used ❌
d0: Used ❌
g0: Used ❌
e0: Used ❌
n0: Used ❌
o0: Unused ✅
r0: Used ❌
p0: Used ❌
m0: Used ❌
h0: Used ❌
g0: Used ❌
y0: Used ❌
w0: Used ❌
s0: Used ❌
i0: Used ❌
u0: Used ❌
x0: Used ❌
v0: Used ❌
c0: Used ❌
k0: Used ❌
t0: Used ❌
q0: Used ❌
z0: Used ❌
l0: Used ❌

LICENSE

MIT © fssccf

/search-name/

    Package Sidebar

    Install

    npm i search-name

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    6.54 kB

    Total Files

    8

    Last publish

    Collaborators

    • fssccf