Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (22 sloc) 462 Bytes
title type order
Utilities
guide
120

Wordsmith includes some handy utility functions:

Utility methods

isStringy

Returns true if the provided parameter is string-like, i.e. if it is a string, number, or string-castable Object.

{% isStringy("foo") %}
# true

{% isStringy(42) %}
# true

{% isStringy(false) %}
# false

{% isStringy(null) %}
# false

{% isStringy(craft.users.one) %}
# true