Skip to content

Commit

Permalink
Merge pull request #45 from nats-io/docs
Browse files Browse the repository at this point in the history
added generated docs
  • Loading branch information
aricart authored May 23, 2024
2 parents 9af067f + c7d6c35 commit 2fa27bb
Show file tree
Hide file tree
Showing 19 changed files with 1,779 additions and 64 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ Reference the library in your code. If using you can `import` or `require` the
npm nuid library supports both Common JS and ESM:

```javascript
const { nuid, Nuid, next, reset } = require("nuid");
const { nuid, Nuid } = require("nuid");
// or
import { next, Nuid, nuid, reset } from "nuid";
import { next, Nuid } from "nuid";

// `nuid` is a global instance of nuid, you can look at it directly
// or you can use `next()` and `reset()` to mutate it if you would like.
// `nuid` is a global instance of nuid, you can use it directly
// `Nuid` is the actual class implementing the nuids, so you can also
// `new Nuid()`.
```
Expand Down Expand Up @@ -66,8 +65,11 @@ The 2.x version of the npm module support both CJS and ESM modules, an ESM only
version of the module is available via
[jsr @nats-io/nuid](https://jsr.io/@nats-io/nuid)

If you are migrating from the 1.x.x series, note that `getGlobalNuid()` has been
replaced with the constant `nuid` as shown in the examples above.
If you are migrating from the 1.x.x series, note that `getGlobalNuid()`,
`next()` and `reset()` and `version` property have been removed. Instead, access
the exported constant `nuid` and call `next()` or `reset()` on it as shown in
the examples above. For version information please refer to your installed
module's version information.

If you are migrating from the `js-nuid` module in npm, there should be no
changes except to the location of the import in the npm bundle:
Expand Down
1 change: 1 addition & 0 deletions docs/.nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
22 changes: 22 additions & 0 deletions docs/assets/highlight.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
:root {
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}

@media (prefers-color-scheme: light) { :root {
--code-background: var(--light-code-background);
} }

@media (prefers-color-scheme: dark) { :root {
--code-background: var(--dark-code-background);
} }

:root[data-theme='light'] {
--code-background: var(--light-code-background);
}

:root[data-theme='dark'] {
--code-background: var(--dark-code-background);
}

pre, code { background: var(--code-background); }
15 changes: 15 additions & 0 deletions docs/assets/icons.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2fa27bb

Please sign in to comment.