New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

yoga-wasm

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yoga-wasm

The Yoga layout engine, but in WebAssembly

  • 0.0.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

yoga-wasm

yoga-wasm is a build of Facebook's Yoga Flexbox layout engine, for JavaScript and WebAssembly.

It is a drop in replacement for the yoga-layout NPM package.

Installation

# npm
npm install --save yoga-wasm

# yarn
yarn add yoga-wasm

Usage

You should be able to use yoga-wasm in the same way you would normally use yoga-layout:

import * as yoga from "yoga-wasm";

const node = yoga.Node.create();

node.setMaxWidth(100);

node.computeLayout(100, 100, yoga.DIRECTION_LTR);

Prior Art

yoga-dom is another attempt to port Yoga to JS with WebAssembly. I leaned heavily on viankakrisna's embind bindings when porting the latest version of Yoga's bindings from nbind to embind.

Contributing

Open a PR or file an issue!

Keywords

FAQs

Package last updated on 20 Apr 2020

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