]> gerrit.simantics Code Review - simantics/district.git/blob - validate-stringifiable.js
eba7ce787cdfad3a446aa2a755070ff9420a2cc2
[simantics/district.git] / validate-stringifiable.js
1 'use strict';
2
3 module.exports = function (stringifiable) {
4         try {
5                 return String(stringifiable);
6         } catch (e) {
7                 throw new TypeError("Passed argument cannot be stringifed");
8         }
9 };