npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

megalopolis

v1.0.0

Published

Generate random neighborhood, street, and other city infrastructure names

Downloads

13

Readme

megalopolis

GitHub release License: MIT

Generate random neighborhood, road, and other city infrastructure names

Example

import { NeighborhoodGenerator, RoadGenerator } from 'megalopolis';

const neighborhoodName: string = NeighborhoodGenerator.generate();
console.log(neighborhoodName);

const roadName: string = RoadGenerator.generate();
console.log(roadName);

Samples

Neighborhoods:

Hungry Bronze Atoll
North Orchid Turtle
Middle West Sandbank
Victory Opal Crag
Eastern Shadow
Wide Lilac Evergreen
Enchanted Western Falls
Western Orchid Manatee
Great Sunset Highlands
Crown Cliff

Roads:

W Fair Washington Jungle Road
N Middle Franklin Country Club Rodovia
Mount Bensen Burg Rd
Broad Emerald Waterfall Beltway
Black Elk Loop
Magnolia Bunker Cul-de-sac
Pleasant Ivory Fjord Cul-de-sac
Plaza East Court
Summit Rose Sunray Motorway
New Elk Court
Cottage Parkway
Apricot Warren Boulevard
Mount Busch Salmon Court
Broad Busch Willow Cul-de-sac
Naper Buffalo Plaza
Middle Harriet Woods Crescent
Sequoia Lion Way
Narrow Mahogany Elk North End
Col Highway
Wide Lincoln Cypress St

Installing

npm install megalopolis

API Options

Neighborhood Options

|Option | Type | Description | |-----------|--------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------| |seed | string | undefined | Seed to control random number generator, enabling predictable generation | |segments | Array<Array<string | undefined>> | undefined | Array of name segments, with each segment an array of permitted word library keys. Undefined keys will be skipped |

Road Options

|Option | Type | Description | |-----------|--------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------| |seed | string | undefined | Seed to control random number generator, enabling predictable generation | |segments | Array<Array<string | undefined>> | undefined | Array of name segments, with each segment an array of permitted word library keys. Undefined keys will be skipped | |excludeTypesStandard | boolean | undefined | Exclude standard street type suffixes; option ignored if segments provided | |excludeTypesEnd | boolean | undefined | Exclude ending-street type suffixes; option ignored if segments provided | |excludeTypesLarge | boolean | undefined | Exclude large street type suffixes; option ignored if segments provided |

Default Segment Templates

Neighborhood Template

[
  [
    undefined,
    undefined,
    undefined,
    'adjective.size',
    'adjective.location',
    'adjective.status',
    'noun.animal',
    'noun.color',
    'noun.direction',
  ],
  [
    undefined,
    undefined,
    undefined,
    undefined,
    undefined,
    undefined,
    'noun.familyName',
    'noun.lightDisplay',
    'noun.tree'
  ],
  [
    'noun.animal',
    'noun.building',
    'noun.familyName',
    'noun.geography',
    'noun.lightDisplay',
    'noun.tree'
  ]
]

Road Template

[
  [
    undefined,
    undefined,
    undefined,
    undefined,
    'noun.direction.route'
  ],
  [
    undefined,
    undefined,
    undefined,
    'adjective.size',
    'adjective.location',
    'adjective.status'
  ],
  [
    undefined,
    undefined,
    undefined,
    'noun.color',
    'noun.familyName',
    'noun.tree'
  ],
  [
    'noun.animal',
    'noun.building',
    'noun.familyName',
    'noun.geography',
    'noun.lightDisplay',
    'noun.tree'
  ],
  [
    undefined,
    undefined,
    undefined,
    undefined,
    undefined,
    undefined,
    undefined,
    undefined,
    undefined,
    'noun.direction'
  ],
  [
    'noun.road.street',
    'noun.road.street.end',
    'noun.road.street.large'
  ]
]

License

megalopolis is open-sourced software licensed under the MIT license