File: /var/dev/nowruzgan/rest/node_modules/machinepack-strings/machines/trim.js
module.exports = {
friendlyName: 'Trim whitespace',
description: 'Trim trailing and leading whitespace from a string.',
inputs: {
string: {
friendlyName: 'String',
example: ' I went to the store to get some more milk. ',
description: 'The string to trim.',
required: true
}
},
exits: {
success: {
example: 'I went to the store to get some more milk.'
},
},
fn: function (inputs,exits) {
var _ = require('lodash');
var trimmed = _.trim(inputs.string);
return exits.success(trimmed);
},
};