Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
VicGUTT committed Mar 8, 2022
1 parent 740c6df commit b761a89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ yarn add @vicgutt/isjs

Then you may chose to import each individual functions separately _(`import isFoo from '@vicgutt/isjs/isFoo'`)_ or import an object containing all available functions _(`import is from '@vicgutt/isjs'`)_;

**Note**: This library is very "future facing" in the code that is distributed _(dist folder)_, meaning it requires at least Node14+ and ES2020/ES2021 support from your JS compiler/bundler or browser.
**Note**: This library is very "future facing" in the code that is distributed _(dist folder)_, meaning it requires at least Node16+ and ES2020/ES2021 support from your JS compiler/bundler or browser.

**Note bis**: Check out the [pro tips](#pro-tips) bellow.

Expand Down Expand Up @@ -962,6 +962,7 @@ export default {
};

// some-folder/some-file.js

import is from '../utils/is';

if (is.string(someVariable)) {
Expand All @@ -972,11 +973,10 @@ if (is.string(someVariable)) {
### Ensure TypeScript support

This library uses the newer Node's package.json's [`exports`](https://nodejs.org/api/packages.html#exports) field to expose the individual functions to end users which may cause TypeScript not knowing where to get the associated `.d.ts` files.
Therefore, if on a none compatible TypeScript version _(which seems to be the case on the latest v4.5.5)_, I'd recomment adding the following key/values to your `tsconfig.json`.
Therefore, if on a non compatible TypeScript version _(which seems to be the case on the latest v4.5.5)_, I'd recomment adding the following key/values to your `tsconfig.json`.

```json
{
// ...
"baseUrl": ".",
"paths": {
"@vicgutt/isjs/*": ["./node_modules/@vicgutt/isjs/dist/*"]
Expand Down
2 changes: 1 addition & 1 deletion src/isLengthy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Lengthy } from './types';

/**
* Determines whether the given value is a "lengthy".
* Determines whether the given value is "lengthy".
*
* A value is considered "lengthy" if it has a `length`
* property that returns a number.
Expand Down
2 changes: 1 addition & 1 deletion src/isSizey.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Sizey } from './types';

/**
* Determines whether the given value is a "sizey".
* Determines whether the given value is "sizey".
*
* A value is considered "sizey" if it has a `size`
* property that returns a number.
Expand Down

0 comments on commit b761a89

Please sign in to comment.