Browse Source

chore: updates readme

e22m4u 1 year ago
parent
commit
bc50fc6bfd
2 changed files with 8 additions and 5 deletions
  1. 2 1
      README-ru.md
  2. 6 4
      README.md

+ 2 - 1
README-ru.md

@@ -45,7 +45,8 @@ console.log(format(`A boolean required, but %s given.`, 'Oct 18 2024 13:04:30'))
 а для объектов выводят имя конструктора.
 а для объектов выводят имя конструктора.
 
 
 ```js
 ```js
-import {format} from '@e22m4u/js-format';
+// import {format} from 'util';
+import {format} from '@e22m4u/js-format'; // заменяем пакет "util"
 
 
 console.log(format(`A boolean required, but %v given.`, 8));
 console.log(format(`A boolean required, but %v given.`, 8));
 console.log(format(`A boolean required, but %v given.`, '8'));
 console.log(format(`A boolean required, but %v given.`, '8'));

+ 6 - 4
README.md

@@ -14,9 +14,10 @@ Additionally:
 ## Motivation
 ## Motivation
 
 
 Аn error message may need to interpolate certain values
 Аn error message may need to interpolate certain values
-in the message string. In this case, a problem is to accurately
-determine the type of the output value, because the standard `%s`
-specifier treats strings, numbers, and other types the same way.
+in its message string. In this case, a problem is accurately
+determine the type of the output value, because the standard
+specifier `%s` treats strings, numbers, and other types
+in the same way.
 
 
 ```js
 ```js
 import {format} from 'util';
 import {format} from 'util';
@@ -44,7 +45,8 @@ with additional `%v` and `%l`, which wrap strings in quotes
 and output the constructor name for objects.
 and output the constructor name for objects.
 
 
 ```js
 ```js
-import {format} from '@e22m4u/js-format';
+// import {format} from 'util';
+import {format} from '@e22m4u/js-format'; // replace "util" package
 
 
 console.log(format(`A boolean required, but %v given.`, 8));
 console.log(format(`A boolean required, but %v given.`, 8));
 console.log(format(`A boolean required, but %v given.`, '8'));
 console.log(format(`A boolean required, but %v given.`, '8'));