JSPM

luasec-npm-api

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19
  • Score
    100M100P100Q21640F
  • License MIT

LuaSec NPM Package

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (luasec-npm-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    LuaSec NPM Package

    LuaSec is a powerful obfuscation tool for Lua scripts, designed to enhance security and protect your code from tampering and reverse engineering. This package provides an easy-to-use API for integrating LuaSec obfuscation into your Node.js projects.

    Installation

    Prerequisites

    • Node.js (version 18 or higher)
    • npm or yarn package manager

    Install via npm

    npm install luasec-npm-package

    Usage / Benutzung

    Example / Beispiel

    import { LuaSecAPI, Payload, Result } from 'luasec-npm-package';
    
    const apiKey = 'LUASEC-XXXX-XXXX-XXXX';
    const luaSec = new LuaSecAPI(apiKey);
    
    const payload: Payload = {
      script: 'print("evikookie and qnx say hello")',
      platformLock: 'lua',
      antiTamper: true,
      encryptStrings: true
    };
    
    try {
      const result: Result = await luaSec.obfuscate(payload);
      console.log('Obfuscation successful:', result);
    } catch (error) {
      console.error('Obfuscation error:', error.message);
    }

    Methods / Funktionen

    obfuscate(payload: Payload): Promise<Result>

    Obfuscates the given script.

    getApiKeyInfo(): Promise<ApiKeyInfo>

    Returns information about the API key.

    getObfuscations(): Promise<Obfuscation[]>

    Returns a list of obfuscations.

    License

    This project is licensed under the MIT License.