@capaj/prisma-typegraphql-types-generator
Version:
Prisma generator for generating TypeGraphQL class types and enums, It works like a copilot where the generated output is very human readable and can be edited
14 lines • 436 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.removeDuplicates = void 0;
const removeDuplicates = (arr, key) => arr.reduce((acc, current) => {
const x = acc.find((item) => item[key] === current[key]);
if (!x) {
return acc.concat([current]);
}
else {
return acc;
}
}, []);
exports.removeDuplicates = removeDuplicates;
//# sourceMappingURL=removeDublicates.js.map