|
@@ -17,17 +17,20 @@ Additionally:
|
|
|
npm install @e22m4u/js-format
|
|
npm install @e22m4u/js-format
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-To load the ES-module, you need to set `"type": "module"`
|
|
|
|
|
-in the `package.json` file, or use the `.mjs` extension.
|
|
|
|
|
-
|
|
|
|
|
## Examples
|
|
## Examples
|
|
|
|
|
|
|
|
-ES-import
|
|
|
|
|
|
|
+ESM
|
|
|
|
|
|
|
|
```js
|
|
```js
|
|
|
import {format} from '@e22m4u/js-format';
|
|
import {format} from '@e22m4u/js-format';
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
+CommonJS
|
|
|
|
|
+
|
|
|
|
|
+```js
|
|
|
|
|
+const {format} = require('@e22m4u/js-format');
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
### %v
|
|
### %v
|
|
|
|
|
|
|
|
Strings are wrapped in quotes, other primitives are converted
|
|
Strings are wrapped in quotes, other primitives are converted
|