Browse Source

chore: updates readme

e22m4u 1 year ago
parent
commit
da036a8edb
2 changed files with 32 additions and 6 deletions
  1. 16 3
      README-ru.md
  2. 16 3
      README.md

+ 16 - 3
README-ru.md

@@ -10,10 +10,23 @@
 npm install @e22m4u/js-service
 ```
 
-Для загрузки ES-модуля требуется установить `"type": "module"` в файле
-`package.json`, или использовать `.mjs` расширение.
+## Обзор
 
-## Назначение
+Модуль поддерживает ESM и CommonJS стандарты.
+
+*ESM*
+
+```js
+import {Service} from '@e22m4u/js-service';
+```
+
+*CommonJS*
+
+```js
+const {Service} = require('@e22m4u/js-service');
+```
+
+### Назначение
 
 Модуль предлагает классы `ServiceContainer` и `Service`,
 которые можно использовать как по отдельности, так и вместе.

+ 16 - 3
README.md

@@ -10,10 +10,23 @@ The «Service Locator» implementation for JavaScript.
 npm install @e22m4u/js-service
 ```
 
-To load the ES-module, you need to set `"type": "module"`
-in the `package.json` file, or use the `.mjs` extension.
+## Overview
 
-## Purpose
+The module supports ESM and CommonJS standards.
+
+*ESM*
+
+```js
+import {Service} from '@e22m4u/js-service';
+```
+
+*CommonJS*
+
+```js
+const {Service} = require('@e22m4u/js-service');
+```
+
+### Purpose
 
 The module offers `ServiceContainer` and `Service` classes,
 which can be used separately or together.