// Copyright (c) 2016, Kaelig Deloumeau-Prigent // All rights reserved. // BSD 2-Clause License // https://tldrlegal.com/license/bsd-2-clause-license-(freebsd) /// Safe get-function($name) /// /// @param {String} $name - Name of the function @function safe-get-function($name) { @if (type-of($name) != 'string') { @error 'The parameter passed to safe-get-function() must be a String. Good: safe-get-function(\'foo\') / Bad: safe-get-function(5).'; } @if function-exists('get-function') { @return get-function($name); } @return $name; }