Skip to content

Rewrite StackOverflow sourced function to avoid CC-BY-SA license claim #1001

Open

Description

@BigBlueHat

The following bit of JavaScript isn't likely even copyrightable. However, license robots choke on it because it's found on StackOverflow--and therefore under the CC-BY-SA 4.0 (per their current Terms and Conditions):

forge/lib/util.js

Lines 2261 to 2276 in 2bb97af

/**
* Check if an object is empty.
*
* Taken from:
* http://stackoverflow.com/questions/679915/how-do-i-test-for-an-empty-javascript-object-from-json/679937#679937
*
* @param object the object to check.
*/
util.isEmpty = function(obj) {
for(var prop in obj) {
if(obj.hasOwnProperty(prop)) {
return false;
}
}
return true;
};

Not sure if you'd care to replace it with a rewritten variation, but that might help the robots... 😉

Activity

  1. davidlehn commented on Sep 19, 2022

    @davidlehn
    Member

    I'm not sure what to do with this. This code is too trivial to change and it already references the source SO comment. Any non-trivial robot would easily detect simple changes like whitespace, label renames, semantically identical refactorings, and probably semantically similar ones too. And of course the history is there to make it easy to know where the code came from. So what do the robot overlords suggest us squishy humans do? Just improve some licensing docs? Can the robot just simply submit a PR with suggested changes? Or would that make the problem worse by inheriting the license of whatever it was trained on?

  2. ghost added a commit that references this issue on Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions