New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

lsystem-generator

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

lsystem-generator

a library that lets you create l-system expansions

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

L-System Generator

an insanely simple and effecient generator of L-system expansions.

It has O(n) space complexity where n is the number of iterations, not result length.

We can achieve it by wrapping generators into each other, which barely consumes any memory, but lets us create very big sequences

const sequence = lsys(
  "A",
  {
    A: "A-B--B+A++AA+B-",
    B: "+A-BB--B-A++A+B",
  },
  5
);

for (let i of sequence) {
  // do stuff
  console.log(i);
}

FAQs

Package last updated on 17 Jun 2025

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