r/node • • Aug 02 '20

Ideas for NPM packages.

Can anyone suggest some cool ideas for NPM packages? Need to publish a package for my final year project. Any kind of help is appreciated.

Thanks!

1 Upvotes

48 comments sorted by

20

u/[deleted] Aug 02 '20

Why not just copy an idea that's already been done? I wouldn't expect your professor to expect that you make a package that people use in projects, they probably just want you to show that you know how to publish one. And you can always take it down afterwards

3

u/[deleted] Aug 02 '20

I don’t think you can take down non packages.

3

u/alpha-037 Aug 02 '20

We can unpublish them within 72 hours, I guess.

3

u/alpha-037 Aug 02 '20

That's actually not bad. But which packages should I copy? There's hundreds of packages just for one idea.

Kinda confused!

6

u/MONSER1001 Aug 02 '20

Well, there is a nice tutorial how to build express js. Maybe start with that, or make a package that handles some kind of json responses, or something like that

1

u/alpha-037 Aug 02 '20

Okay, thanks. Could you share the link of that tutorial?

5

u/m9dhatter Aug 02 '20

Left-pad

0

u/[deleted] Aug 02 '20

[deleted]

-12

u/alpha-037 Aug 02 '20

What does this package do?

0

u/[deleted] Aug 02 '20

[deleted]

-1

u/alpha-037 Aug 02 '20

I read the README. Didn't understand what exactly it does.

0

u/[deleted] Aug 02 '20

[deleted]

1

u/[deleted] Aug 02 '20

I think it's just a way for the students to prove to the professor that they know what npm is since it's the central package registry for Node.js. So if I were doing this I'd write up whatever basic crap can be used as a library (like a calculator with add, subtract, multiply and divide) and then publishing it successfully will be the focus.

As for polluting the registry, you make a good point and it would be wise and responsible of the prof to ask students to remove their packages afterwards. But then again npm does get a lot of waste added to it constantly.

36

u/Lakitna Aug 02 '20

I have this idea laying around that you could use. It's a cli command to add some... Suspense to running a command.

It's basically cli Russian roulette. There is a 5/6 chance that your command executes like normal, and a 1/6 chance that it removes all files in the current folder instead.

5

u/alpha-037 Aug 02 '20

Well, it certainly sounds interesting. Where do I find the resources to build one like that?

Also, thanks for the idea!

5

u/Lakitna Aug 02 '20

You'd probably need something like commander for the cli interface (or do it yourself with process.argv). And then look into spawning child commands. The Node docs should be enough for this.

Also don't forget to look into creating a cli program with npm.

3

u/alpha-037 Aug 02 '20

Okay, thank you so much. It means a lot!

9

u/broofa Aug 02 '20

if [ $(( RANDOM % 6 )) -eq 0 ]; then sudo rm -fr . ; fi

7

u/SoInsightful Aug 02 '20

A simple CLI-powered key–value store:

> vault set message "Hello world!"
Property "message" set to "Hello world!".

> vault get message
Hello world!

> vault set apiKey 5f26ae94194c237bdc0d19e8
Property "apiKey" set to "5f26ae94194c237bdc0d19e8".

> vault get apiKey
5f26ae94194c237bdc0d19e8

> vault dump
{
  "message": "Hello world!",
  "apiKey": "5f26ae94194c237bdc0d19e8"
}

> vault delete apiKey
Property "apiKey" deleted.

4

u/gollyrancher Aug 02 '20

It would be cool to have a more open source, cli based EnvKey alternative

1

u/gingerlime Aug 02 '20

There is one. Check out envwarden https://github.com/envwarden/envwarden

1

u/alpha-037 Aug 02 '20

Okay, will take a look. Thank you so much!

2

u/alpha-037 Aug 02 '20

So, it's basically like Redis working locally?

Great idea!

2

u/SoInsightful Aug 02 '20

Good way of putting it! Bonus points if encryption is included.

3

u/alpha-037 Aug 02 '20

This sounds promising actually. Thank you so much for this!

1

u/TheRealAstroOrbis Oct 21 '22 edited Feb 23 '26

This post was mass deleted and anonymized with Redact

sheet office repeat bag selective plough cable license wakeful cheerful

1

u/SoInsightful Oct 22 '22

Awesome! Go for it, and feel free to ping me if you have something to show (if you want)!

1

u/TheRealAstroOrbis Oct 26 '22 edited Feb 23 '26

This post was mass deleted and anonymized with Redact

correct cause screw important growth attraction sense frame crawl degree

1

u/SoInsightful Oct 26 '22

Awesome! :)

1

u/TheRealAstroOrbis Oct 26 '22 edited Feb 23 '26

This post was mass deleted and anonymized with Redact

dazzling smart makeshift languid rain offer boast provide file birds

4

u/KonkenBonken Aug 02 '20

Make one to control google home gadgets; Like cast a video on a chromecast, make the google home to say something or turn on a lamp.

2

u/alpha-037 Aug 02 '20

This is such a great idea but I don't think I'm qualified enough to build something like this. I mean, I don't even know where to start with this one.

I'd like to try though. How do you suggest I get started?

2

u/KonkenBonken Aug 02 '20

The only two I've found that do similar things is this one and this one

1

u/alpha-037 Aug 02 '20

Okay, will do. Thank you so much!

10

u/Snoo_1015 Aug 02 '20

Fork and modernize https://github.com/typekit/webfontloader

This is a package with hundreds of thousands of monthly downloads and is now totally inactive. I think some simple changes (moving to es6, fixing the dev environment) and releasing as an alternative to wfl would turn some heads.

8

u/StoneCypher Aug 02 '20

god this is such a bad idea

there's a million complicated subtle details around font loading that this kid shouldn't have to face

-1

u/alpha-037 Aug 02 '20

Okay, it's surely worth a shot. Are you sure I won't need any other changes?

5

u/kNif68 Aug 02 '20

How about a boilerplate generator?

A cli that you run to generate boilerplate code (express, react, ...).

It's not too difficult to make and really helpful.

1

u/alpha-037 Aug 02 '20

I do have a boilerplate for puppeteer though. Okay, I'll certainly look into it.

2

u/KonkenBonken Aug 02 '20

Make a country to coordinates converter, and the other way around. Maybe add cities, streets, adresses...

1

u/alpha-037 Aug 02 '20

Okay, so basically Geocoding?

2

u/victhroway1234532 Aug 02 '20

a bitcoin wallet and address generator.

bonus- create partially signed transaction that can be broadcasted

1

u/alpha-037 Aug 02 '20

Sounds cool! Any resources to get started with?

Also, thank you so much!

1

u/[deleted] Aug 02 '20

Go for a package for tree shaking

1

u/alpha-037 Aug 02 '20

What's that?

1

u/rudidude86 Aug 02 '20

2

u/[deleted] Aug 02 '20

Lol That’s a project for mechanical engineers. But you could write a npm package to remove unused dependency (tree shaking but not the code but dependencies)

1

u/alpha-037 Aug 02 '20

Okay, that actually makes sense. Thank you!