New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

is-month

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-month

Check if the current month is equalt to the given month

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

is-month

Check if the current month is equalt to the given month

Install

	$ npm install is-month --save

	#or

	$ yarn add is-month

Usage

	import isMonth from 'is-month';

	isMonth('april', { today: new Date('2018/04/12') }) //=> true
	isMonth.promise('april', { today: new Date('2018/04/12') })
		.then(month => {
			console.log('We are in April!')
		})
		.catch(err => {
			if (err) {
				throw err;
			}
		})

Api

isMonth(month, { today })

Returns a boolean.

month

Type: String Month to check

today

Type: Date Default: new Date() Date to check

isMonth.promise(month, { today })

Returns a promise for a boolean.

month

Type: String Month to check

today

Type: Date Default: new Date() Date to check

License

MIT © Federico Vitale

Keywords

month

FAQs

Package last updated on 12 Apr 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