GeezerVison is showing github.com — doc: use ffi.suffix in permission example · nodejs/node@be31301
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/cli.md +2-2Lines changed: 2 additions & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -208,8 +208,8 @@ starting Node.js. The [`node:ffi`][] module also requires the |
208 | 208 | Example: |
209 | 209 |
|
210 | 210 | ```js |
211 | | -const { DynamicLibrary } = require('node:ffi'); |
212 | | -const lib = new DynamicLibrary('mylib.so'); |
| 211 | +const { DynamicLibrary, suffix } = require('node:ffi'); |
| 212 | +const lib = new DynamicLibrary(`./mylib.${suffix}`); |
213 | 213 | ``` |
214 | 214 |
|
215 | 215 | ```console |
|
Collapse file
Copy file name to clipboardExpand all lines: doc/node.1 +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -126,8 +126,8 @@ starting Node.js. The \fBnode:ffi\fR module also requires the |
126 | 126 | \fB--experimental-ffi\fR flag and is only available in builds with FFI support. |
127 | 127 | Example: |
128 | 128 | .Bd -literal |
129 | | -const { DynamicLibrary } = require('node:ffi'); |
130 | | -const lib = new DynamicLibrary('mylib.so'); |
| 129 | +const { DynamicLibrary, suffix } = require('node:ffi'); |
| 130 | +const lib = new DynamicLibrary(`./mylib.${suffix}`); |
131 | 131 | .Ed |
132 | 132 | .Bd -literal |
133 | 133 | $ node --permission --experimental-ffi index.js |
|