New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

month-days

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

month-days - npm Package Compare versions

Comparing version 2.1.0 to 3.0.0

index.d.ts

4

index.js
'use strict';
const isDefined = x => x !== null && x !== undefined;
const isDefined = value => value !== undefined;
module.exports = (month, year) => {
module.exports = ({month, year} = {}) => {
if (isDefined(month) && typeof month !== 'number') {

@@ -6,0 +6,0 @@ throw new TypeError(`Expected \`month\` to be of type \`number\`, got \`${typeof month}\``);

{
"name": "month-days",
"version": "2.1.0",
"description": "Get the number of days in a month",
"license": "MIT",
"repository": "sindresorhus/month-days",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"month",
"days",
"year",
"date",
"utc",
"number",
"count"
],
"devDependencies": {
"ava": "*",
"xo": "*"
},
"xo": {
"esnext": true
}
"name": "month-days",
"version": "3.0.0",
"description": "Get the number of days in a month",
"license": "MIT",
"repository": "sindresorhus/month-days",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"month",
"days",
"year",
"date",
"utc",
"number",
"count"
],
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
}
}

@@ -9,3 +9,3 @@ # month-days [![Build Status](https://travis-ci.org/sindresorhus/month-days.svg?branch=master)](https://travis-ci.org/sindresorhus/month-days)

```
$ npm install --save month-days
$ npm install month-days
```

@@ -19,3 +19,3 @@

monthDays(1, 2016);
monthDays({month: 1, year: 2016});
//=> 29

@@ -27,6 +27,10 @@ ```

### monthDays([month], [year])
### monthDays([options])
#### month
#### options
Type: `object`
##### month
Type: `number`<br>

@@ -37,3 +41,3 @@ Default: Current UTC month

#### year
##### year

@@ -40,0 +44,0 @@ Type: `number`<br>

Sorry, the diff of this file is not supported yet

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