Skip to content
master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

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 first-run

Usage

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

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

API

firstRun([options])

firstRun.clear([options])

Clear the state.

options

Type: Object

name

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

The name used to identify it.

License

MIT © Sindre Sorhus

You can’t perform that action at this time.