question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Divide the NSFW and SFW functions a bit more

See original GitHub issue

Describe new features you want Currently, all of the available endpoints are exposed via the NekoClient class as individual functions. It would be great if you could instantiate the module but say you only want the SFW functions at the moment.

Describe the solution you’d like The NekoClient class constructor would have one optional parameter contentType. If undefined, it would assign all functions as usual so it’s still backward compatible.

If contentType is SFW or NSFW, then only assign those functions to the class.

Describe alternatives you’ve considered At first, I thought it would be easier to just export a SFW and NSFW object in the NekoClient class that you could choose. After tinkering with it some more I realized this would break backward compatibility as any previous code relying on the function calls would then have to add a sfw or nsfw prefix to the function call.

Additional context I’ve created a working version of this on my fork, but I’m not entirely sure how to show this new conditional function stuff in TypeScript. So at the moment, when you install my fork it still shows all of the functions exported as usual no matter what.

However, if you do something like the following, you’ll get a function not found error:

const Neko = require('nekos.life')
const neko = new Neko('sfw')

neko.getNSFWBoobs()
  .then(res => console.log(res.url))
  .catch(err => console.error(err))

A Gif to describe how you feel when you made this request LWA

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
TheCyberRonincommented, Dec 6, 2018

Take a look at the npm page 😉

1reaction
TheCyberRonincommented, Dec 5, 2018

I’ll probably take a better look and update sometime in the next week. The only unfortunate thing about doing so is that it will be a breaking change. It’s okay that it’s a breaking change because with V3 of the API coming, it would have to be a breaking change either way.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ant on Twitter: "Main goal: A website for SFW and NSFW ...
It will allow SFW & NSFW, prohibit AI/NFTs/crypto/other crap & be solely funded by ... a lot of the code is done but...
Read more >
Who here has both a separate NSFW and SFW account. Why?
I like to keep NSFW Reddit usage separate from SFW Reddit usage in case people I know IRL find my account. If they...
Read more >
NSFW or SFW | MyFigureCollection.net
That's why it's called "Not Safe For Work" instead of "Adult Content" I guess. But maybe it needs to be clearer, because the...
Read more >
What does NSFW and SFW stand for? - Quora
NSFW - Not Safe for Work means do not open something someone sent you in your screen at work because it may jeopardize...
Read more >
Having a separate NSFW account? - Fur Affinity Forums
I think they do it in order to avoid alienating the people who watch them for SFW art, but risk losing watchers who...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found