Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hermes-engine

Package Overview
Dependencies
Maintainers
6
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hermes-engine

A JavaScript engine optimized for running React Native on Android

  • 0.11.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
369K
increased by10.59%
Maintainers
6
Weekly downloads
 
Created

What is hermes-engine?

The hermes-engine npm package provides a JavaScript engine optimized for running React Native applications. It is designed to improve performance and reduce memory usage, making it ideal for mobile applications.

What are hermes-engine's main functionalities?

Running JavaScript Code

Hermes-engine allows you to run JavaScript code snippets and get the results. This is useful for executing scripts within a controlled environment.

const { Hermes } = require('hermes-engine');
const hermes = new Hermes();
const result = hermes.evaluate('1 + 1');
console.log(result); // Outputs: 2

Bytecode Compilation

Hermes-engine can compile JavaScript code to bytecode, which can then be executed more efficiently. This is particularly useful for performance-critical applications.

const { compileToBytecode } = require('hermes-engine');
const bytecode = compileToBytecode('function add(a, b) { return a + b; }');
console.log(bytecode);

Memory Management

Hermes-engine provides manual control over garbage collection, allowing developers to manage memory usage more effectively.

const { Hermes } = require('hermes-engine');
const hermes = new Hermes();
hermes.gc();
console.log('Garbage collection completed');

Other packages similar to hermes-engine

FAQs

Package last updated on 27 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc