Skip to content

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

@BigBlueHat

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... 😉

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions