Sha256: a1e5f9bcbb505d3caf22b8919a8a8b3cf70e39eb8e76c6aa2857127815f3ff2c

Contents?: true

Size: 491 Bytes

Versions: 9

Compression:

Stored size: 491 Bytes

Contents

const yaml = require('js-yaml');
const fs = require('fs');
const crypto = require('crypto');
const THIS_FILE = fs.readFileSync(__filename);

module.exports = {
    process(src, path) {
        const obj = yaml.safeLoad(src);
        return `module.exports = ${JSON.stringify(obj)}`;
    },

    getCacheKey(fileData) {
        return crypto.createHash('md5')
            .update(fileData)
            .update('\0', 'utf8')
            .update(THIS_FILE)
            .digest('hex');
    },
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hippo-fw-0.9.9 config/jest/yaml-transform.js
hippo-fw-0.9.8 config/jest/yaml-transform.js
hippo-fw-0.9.7 config/jest/yaml-transform.js
hippo-fw-0.9.6 config/jest/yaml-transform.js
hippo-fw-0.9.5 config/jest/yaml-transform.js
hippo-fw-0.9.4 config/jest/yaml-transform.js
hippo-fw-0.9.3 config/jest/yaml-transform.js
hippo-fw-0.9.2 config/jest/yaml-transform.js
hippo-fw-0.9.1 config/jest/yaml-transform.js