by danielsamuels · 5y ago · 0 comments
There are certainly npm authors doing this already, feross[1] is a good example. That means you get packages like is-buffer[2].
[1]: https://www.npmjs.com/~feross [2]: https://github.com/feross/is-buffer/blob/master/index.js
export function isBuffer (obj) {
return obj != null && obj.constructor != null &&
typeof obj.constructor.isBuffer === 'function' &&
obj.constructor.isBuffer(obj)
}
Imho, there is no need to pull 10 files into my project to use one function. # Fork by TekMol of https://github.com/feross/is-buffer
# Which is MIT licensed by Feross Aboukhadijeh
I am actually never completely sure how to properly do this. Would the next forker write the following then? # Fork by Joe of https://github.com/tekmol/isBuffer
# Which is a fork by TekMol of https://github.com/feross/is-buffer
# Which is MIT licensed by Feross AboukhadijehOf course it's only appropriate to credit the author anyway, and one way to do that nicely is by following the license requirements. I just think "violation of the license" is a bit of an unnecessarily strong statement, given the triviality and the likely non-copyrightability of the code.
Your lawyer's opinion may vary.