restriction

Returns the value restriction of a thing as type str or nil when the thing is not value restricted.

This function does not generate a change.

Function

thing.restriction()

Arguments

None

Return value

Returns restriction of the thing or nil if not value restricted.

Example

Using restriction() on a non-restricted thing:

{}.restriction();

Return value in JSON format

null

Using restriction() on a restricted thing:

{}.restrict('str').restriction();

Return value in JSON format

"str"