PHP 8.2.30
Preview: index.js Size: 1.18 KB
/home/byroehnu/easepay.easetack.com/node_modules/@rollup/plugin-json/dist/cjs/index.js

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var pluginutils = require('@rollup/pluginutils');

function json(options) {
  if ( options === void 0 ) options = {};

  var filter = pluginutils.createFilter(options.include, options.exclude);
  var indent = 'indent' in options ? options.indent : '\t';

  return {
    name: 'json',

    // eslint-disable-next-line no-shadow
    transform: function transform(code, id) {
      if (id.slice(-5) !== '.json' || !filter(id)) { return null; }

      try {
        var parsed = JSON.parse(code);
        return {
          code: pluginutils.dataToEsm(parsed, {
            preferConst: options.preferConst,
            compact: options.compact,
            namedExports: options.namedExports,
            includeArbitraryNames: options.includeArbitraryNames,
            indent: indent
          }),
          map: { mappings: '' }
        };
      } catch (err) {
        var message = 'Could not parse JSON file';
        this.error({ message: message, id: id, cause: err });
        return null;
      }
    }
  };
}

exports.default = json;
module.exports = Object.assign(exports.default, exports);
//# sourceMappingURL=index.js.map

Directory Contents

Dirs: 0 × Files: 2

Name Size Perms Modified Actions
127 B lr--r--r-- 2026-03-14 01:49:21
Edit Download
1.18 KB lrw-r--r-- 2026-02-28 00:26:54
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).