mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-31 05:03:21 +08:00
10 lines
223 B
JavaScript
10 lines
223 B
JavaScript
import { decycle } from '../index';
|
|
|
|
export default function prepareArguments(arg, depth) {
|
|
try {
|
|
return JSON.stringify(decycle(arg, depth));
|
|
} catch (error) {
|
|
return error.toString(); // IE still cyclic.
|
|
}
|
|
}
|