The package referred to in the clickbait title is `is-promise`
declare function isPromise<T, S>(obj: Promise<T> | S): obj is Promise<T>;
This is, indeed, the only line of exported code in the entire package.I genuinely don't understand the NPM world.
You're right, you don't. What you posted is just the function declaration, not the implementation.
God help you, if you import a JavaScript (or Rust) package today. Lest you fall in a gaping chasm of endless cascading dependencies.
I would never in my right mind publish a one-line package, Python, Javascript, whatever.
And I would never add a one line package as dependency