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

chance-http-status

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

chance-http-status

[![npm](https://img.shields.io/npm/v/chance-http-status.svg?style=flat-square)](https://www.npmjs.com/package/chance-http-status) [![Build Status](https://github.com/jonathansamines/chance-http-status/workflows/Node.js%20CI/badge.svg)](https://github.com/

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

chance-http-status

npm Build Status

A simple chance mixin to generate random http status information

Installation

npm install --save chance-http-status

Usage

  const chance = require('chance');
  const httpStatus = require('chance-http-status');

  chance.mixin({ httpStatus });

  chance.httpStatus({ classType: 'success' });

  // => {
  //  "status": 200,
  //  "message": "successful",
  // }

API

chance.httpStatus(options) => httpStatusDefinition

  • options
    • options.classType: The type of http status code. Can be one of information, success, redirection, clientError or serverError.

httpStatusDefinition

An object with the following properties:

  • status A valid http status code
  • message The standard http status message associated with the code

Keywords

FAQs

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