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

@sinonjs/commons

Package Overview
Dependencies
Maintainers
5
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sinonjs/commons

Simple functions shared among the sinon end user libraries

  • 1.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
30M
decreased by-5.63%
Maintainers
5
Weekly downloads
 
Created

What is @sinonjs/commons?

The @sinonjs/commons package is a collection of common utilities used by Sinon.js and its related projects. It provides a set of helper functions and shared components that are used across the Sinon.js ecosystem to ensure consistency and reduce duplication.

What are @sinonjs/commons's main functionalities?

typeOf

Determines the type of a given value. It is a more robust version of JavaScript's typeof operator.

const { typeOf } = require('@sinonjs/commons');
const result = typeOf({}); // 'object'

valueToString

Converts a value to a string representation, useful for debugging and logging.

const { valueToString } = require('@sinonjs/commons');
const result = valueToString('Hello'); // '"Hello"'

isPromise

Checks if a given value is a Promise.

const { isPromise } = require('@sinonjs/commons');
const result = isPromise(Promise.resolve()); // true

Other packages similar to @sinonjs/commons

FAQs

Package last updated on 28 Oct 2018

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