# Utilities

import { utils } from '@datacamp/poser';

Poser exports the following helper utilities:


# utils.ref()

Return a Ref object for an instance.

ref(typeName, id);
// returns a Ref

# Arguments

Name Type Description
typeName string The type to find
id mixed The id of the instance

# utils.mockList()

Returns a array of undefined, to mock lists in Mocks.

mockList(length); 
// returns an array of length <length>

# Arguments

Name Type Description
length number The size of the list

# faker

Poser re-exports faker from @faker-js/faker:

import { faker } from '@datacamp/poser';

faker.random.words(4)