spee.ch/helpers/functions/isFreePublicClaim.js

14 lines
398 B
JavaScript
Raw Normal View History

2017-06-20 04:34:34 +02:00
const logger = require('winston');
module.exports = ({ value }) => {
2017-06-20 04:34:34 +02:00
logger.debug('checking isFreePublicClaim ?');
if (
(value.stream.metadata.license.indexOf('Public Domain') !== -1 || value.stream.metadata.license.indexOf('Creative Commons') !== -1) &&
(!value.stream.metadata.fee || value.stream.metadata.fee.amount === 0)
) {
return true;
} else {
return false;
}
};