Uname: Linux webm016.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 7.4.33 [ PHP INFO ] PHP os: Linux
Server Ip: 54.36.31.145
Your Ip: 216.73.216.182
User: homesquasz (91404) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : index.js
'use strict';

const crypto = require('crypto');
const moduleRequire = require('eslint-module-utils/module-require').default;
const hashObject = require('eslint-module-utils/hash').hashObject;

const cache = new Map();

// must match ESLint default options or we'll miss the cache every time
const parserOptions = {
  loc: true,
  range: true,
  raw: true,
  tokens: true,
  comment: true,
  attachComment: true,
};

exports.parse = function parse(content, options) {
  options = Object.assign({}, options, parserOptions);

  if (!options.filePath) {
    throw new Error('no file path provided!');
  }

  const keyHash = crypto.createHash('sha256');
  keyHash.update(content);
  hashObject(options, keyHash);

  const key = keyHash.digest('hex');

  let ast = cache.get(key);
  if (ast != null) return ast;

  const realParser = moduleRequire(options.parser);

  ast = realParser.parse(content, options);
  cache.set(key, ast);

  return ast;
};
© 2026 GrazzMean