HEX
Server: nginx/1.24.0
System: Linux nowruzgan 6.8.0-57-generic #59-Ubuntu SMP PREEMPT_DYNAMIC Sat Mar 15 17:40:59 UTC 2025 x86_64
User: babak (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/dev/nowruzgan/rest/node_modules/machinepack-util/machines/hash.js
module.exports = {


  friendlyName: 'Hash',


  description: 'Generate unique string from the provided value.',


  extendedDescription: 'Useful for checksums (error-checking) and hash keys (caching, etc.) Uses the crypto module from Node core via `object-hash` on NPM (see http://npmjs.org/package/object-hash)',


  sync: true,


  cacheable: true,


  inputs: {

    value: {
      friendlyName: 'Value',
      example: '*',
      description: 'The value for which to calculate a unique hash string.',
      required: true
    }

  },


  exits: {

    success: {
      description: 'Done.',
      example: 'e003c89cdf35cdf46d8239b4692436364b7259f9'
    }

  },


  fn: function(inputs, exits) {

    var hashFn = require('object-hash');
    var hash = hashFn(inputs.value);
    return exits.success(hash);

  },

};