Skip to content
Snippets Groups Projects
Commit b3455bf1 authored by syuilo's avatar syuilo
Browse files

Extract hasDuplicates function

parent 17c8969f
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
* Module dependencies
*/
import validate from '../../validator';
import hasDuplicates from '../../../common/has-duplicates';
import parse from '../../../common/text';
import { Post, isValidText } from '../../models/post';
import User from '../../models/user';
......@@ -15,10 +16,6 @@ import notify from '../../common/notify';
import event from '../../event';
import config from '../../../conf';
function hasDuplicates(array) {
return (new Set(array)).size !== array.length;
}
/**
* Create a post
*
......
export default (array: any[]) => (new Set(array)).size !== array.length;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment