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

ahau-fixtures

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ahau-fixtures

a generator of mock ahau databases

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

ahau-fixtures

A generator of mock ahau databases

API

fixtures.createWhakapapaTree(ssb, groupId, N, cb)

This script is designed to make a large whakapapa tree, it builds: - a whakapapaView - a tree with N profiles

  • ssb : scuttlebutt instanace with ssb-whakapapa, ssb-profile, ssb-tribes installed
  • groupId : group to publish the records to
  • N : how many profiles should be in the whakapapa tree
  • cb : a callback for when done

If cb is ommitted, returns a Promise

Algorithm

  • setup

    1. create one profile, increment profileCount
    2. make it the focus of a whakapapaView
    3. push the profileId into a "queue"
  • while profileCount < N

    1. pull a profileId from "queue"
    2. create some random number of children (profile + link to parent)
      • NOTE: if there are no more profiles in queue, and profileCount < N, we must create at least 1 child.
      • create profile, increment profileCounter
      • create childLink to parent
    3. push the childrens profileIds into the queue

This graph does not have partners, nor importantLinks

Keywords

FAQs

Package last updated on 10 Jun 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