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

random_companies

v1.0.4

Published

Companies randomizer

Downloads

4

Readme

What is it?

Package for generating mock data of the companies.

Installation

Run npm i random_companies or yarn add random_companies

Use

import getRandomCompanies from "random_companies";

const data = getRandomCompanies(10, {})

The first argument is amunt of companies, that will be generated and given back in array. 10 by default;

The second argument is settings for data to be generated. {} by default, it means all parameters are on (true) and will be generated and added to array.

{
    id: true,
    companyName: true,
    country: true,
    city: true,
    street: true,
    houseNumber: true,
    postCode: true,
    phoneNumber: true,
    email: true,
    foundingDate: true,
    coords: true,
    ceo: true,
    webSite: true,
    numberOfWorkers: true,
    description: true,
    slogan: true,
    logo: true,
  }

getRandomCompanies(10, { logo: false, phoneNumber: false })

The output won't contain logo and phone number of the companies.

Parameters

The function accepts two parameters, amount (number) and settings (object).

By default getRandomCompanies() returns 10 companies (array) with all settings on.

id: true, return (string)
companyName: true, return (string)
country: true, return (strings)
city: true, return (string)
street: true, return (string)
houseNumber: true, return (number)
postCode: true, return (number)
phoneNumber: true, return (string)
email: true, return (string)
foundingDate: true, return (string)
coords: true, return (numbers)
ceo: true, return (string)
webSite: true, return (string)
numberOfWorkers: true, return (number)
description: true, return (string)
slogan: true, return (string)
logo: true, return (string/png:base64)

Output example

{
    id: 'n5gnd2m6wr6w12dn7yl99dqiok3w8j4o',
    companyName: 'Fadel, Hoeger and MacGyver',
    country: { name: 'Libyan Arab Jamahiriya', code: 'LY' },
    city: 'Lunness',
    street: 'Sycamore Lane',
    houseNumber: 502,
    postCode: 82604,
    phoneNumber: '+81(957) 584-1328',
    email: '[email protected]',
    foundingDate: 'Feb. 8, 2007',
    coords: { latitude: -21.64023445281, longitude: -112.47123129941 },
    ceo: 'Ann Kirby',
    webSite: 'https://some-random-website.com',
    numberOfWorkers: 913,
    description: "But, it's still a very strange, abnormally perky, and Tracy Flick-esque (not exactly out of character for the company) for company that's had a streak of bad news. It's hard to imagine another multi-billion dollar company acting this way.",
    slogan: 'Would You Give Someone Your Last Company?',
    logo: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6CAMAAAC/MqoPAAACxFBMVEUAAADv2c3v2c7v2c7v2c7v2M7v2c7v2c4pKSkqKiorKyssKyssLCstLCwuLS0vLi4vLy4wMC8xMDAyMTEzMjE0MzI1NDM2NDQ3NTU4NjU5NzY6ODc7OTg8Ojk9Ozo+PDs/PTtAPjxBPj1CPz5DQD9EQT9FQkBGQkFHQ0JIRENIRUNJRkRKR0VLR0ZMSEZNSUdOSkhPS0lQTElRTEpSTUtTTkxUT0xUUE1VUU5WUU9XUk9XUlBYU1BZVFFaVVJbVVNcVlNcVlRdV1ReWFVfWVZgWldhWldhW1hiXFljXVpkXlplXltlX1tmX1xnYF1oYV1pYl5qYl9qY19rY2BsZGBtZWFtZmJuZ2NvZ2RvaGRwaGRxaWVyamZza2d0bGd0bGh1bGh2bWl3bmp4b2t5cGt5cGx6cW17cm58c259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zod9qS/Ub9Ds+12219dTtD/XxFzaQt1+L2fKDpSxnmX5pNVm+MHRNrsVSaBo+2+df00GyJM355SwVW5JiY996JF7O4j2iLuqiLuqiLuqi7kvqf/7LI8rv5aXZgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIgiD4NP8DVIbNlKUhlkkAAAAASUVORK5CYII='
  }

DISCLAIMER: All data was randomly generated. Any resemblance to real data or information and people is coincidental.