UNPKG

@hexancore/mocker

Version:

Simple and magical mocks for TypeScript, works with jest and vitest

10 lines (9 loc) 350 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getConstructorParams = void 0; function getConstructorParams(f) { const reg = /constructor\((.+)\)/; const params = reg.exec(f); return params ? params[1].split(',').map((p) => p.trimStart()) : []; } exports.getConstructorParams = getConstructorParams;