'use strict';
var filenameReservedRegex = require('filename-reserved-regex');

module.exports = function (str) {
	return str.length <= 255 && !filenameReservedRegex().test(str);
};

'use strict';
var filenameReservedRegex = require('filename-reserved-regex');

module.exports = function (str) {
	return str && (str.length <= 255 && !filenameReservedRegex().test(str));
};

Fix bug that throws error for empty string
Fix bug that throws error for empty string

Prevents function from throwing an error when `str` is null/undefined