Skip to content

Commit

Permalink
docs: Switch to named export in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Dec 8, 2020
1 parent c1303f1 commit c489810
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion utils/check-working-tree/README.md
Expand Up @@ -5,7 +5,7 @@
## Usage

```js
const checkWorkingTree = require("@lerna/check-working-tree");
const { checkWorkingTree } = require("@lerna/check-working-tree");

// values listed here are their defaults
const options = {
Expand Down
2 changes: 1 addition & 1 deletion utils/collect-uncommitted/README.md
Expand Up @@ -5,7 +5,7 @@
## Usage

```js
const collectUncommitted = require("@lerna/collect-uncommitted");
const { collectUncommitted } = require("@lerna/collect-uncommitted");

// values listed here are their defaults
const options = {
Expand Down
2 changes: 1 addition & 1 deletion utils/describe-ref/README.md
Expand Up @@ -5,7 +5,7 @@
## Usage

```js
const describe = require("@lerna/describe-ref");
const { describe } = require("@lerna/describe-ref");

(async () => {
const { lastTagName, lastVersion, refCount, sha, isDirty } = await describe();
Expand Down
6 changes: 1 addition & 5 deletions utils/has-npm-version/README.md
Expand Up @@ -5,18 +5,14 @@
## Usage

```js
const hasNpmVersion = require("@lerna/has-npm-version");
const { hasNpmVersion } = require("@lerna/has-npm-version");

// `npm --version` === 6.3.0
hasNpmVersion(">=6"); // => true

// `npm --version` === 5.6.0
hasNpmVersion(">=6"); // => false

// makePredicate() caches the call to `npm --version`
// useful if you're calling it repeatedly in a loop
const predicate = hasNpmVersion.makePredicate();

// `npm --version` === 6.3.0
hasNpmVersion(">=5"); // => true
```
Expand Down
2 changes: 1 addition & 1 deletion utils/log-packed/README.md
Expand Up @@ -8,7 +8,7 @@ Extracted from the [npm source](https://github.com/npm/cli/blob/4f801d8a476f7ca5

```js
const execa = require("execa");
const logPacked = require("@lerna/log-packed");
const { logPacked } = require("@lerna/log-packed");

execa("npm", ["pack", "--json"]).then(result => {
const tarballs = JSON.parse(result.stdout);
Expand Down
2 changes: 1 addition & 1 deletion utils/prerelease-id-from-version/README.md
Expand Up @@ -5,7 +5,7 @@
## Usage

```js
const prereleaseIdFromVersion = require("@lerna/prerelease-id-from-version");
const { prereleaseIdFromVersion } = require("@lerna/prerelease-id-from-version");

prereleaseIdFromVersion(1.0.0-alpha.0); // => "alpha"

Expand Down
2 changes: 1 addition & 1 deletion utils/rimraf-dir/README.md
Expand Up @@ -5,7 +5,7 @@
## Usage

```js
const rimrafDir = require("@lerna/rimraf-dir");
const { rimrafDir } = require("@lerna/rimraf-dir");

rimrafDir("/path/to/directory").then(removedDir => {
console.log("removed", removedDir);
Expand Down

0 comments on commit c489810

Please sign in to comment.