validate-stringifiable.js 182 B

123456789
  1. 'use strict';
  2. module.exports = function (stringifiable) {
  3. try {
  4. return String(stringifiable);
  5. } catch (e) {
  6. throw new TypeError("Passed argument cannot be stringifed");
  7. }
  8. };