🚀 Launch Week Day 3:Introducing Supply Chain Attack Campaigns Tracking.Learn More →
Socket
Book a DemoInstallSign in
Socket

first-run

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

first-run

Check if it's the first time the process is run

Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
374
-66.15%
Maintainers
1
Weekly downloads
 
Created
Source

first-run Build Status

Check if it's the first time the process is run

Can be used to greet the user the first time they use your CLI app, show usage tip, initialize something, etc.

Install

$ npm install --save first-run

Usage

// x.js
var firstRun = require('first-run');

console.log(firstRun());
$ node x.js
true
$ node x.js
false

API

firstRun([options])

options.name

Type: string
Default: name field in your package.json

The name used to identify it.

firstRun.clear()

Clear the state.

License

MIT © Sindre Sorhus

Keywords

first

FAQs

Package last updated on 08 Sep 2015

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