@digitransit-search-util/digitransit-search-util-serialize 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -13
- package/package.json +5 -4
- package/test.js +3 -5
package/README.md
CHANGED
|
@@ -8,8 +8,8 @@ Serializes objects
|
|
|
8
8
|
|
|
9
9
|
### Parameters
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* `obj` **[Object][1]** Object to be serialized
|
|
12
|
+
* `prefix` **Any**
|
|
13
13
|
|
|
14
14
|
### Examples
|
|
15
15
|
|
|
@@ -23,11 +23,6 @@ Returns **[String][2]** Serialized object
|
|
|
23
23
|
[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
24
24
|
|
|
25
25
|
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
|
|
26
|
-
|
|
27
|
-
<!-- This file is automatically generated. Please don't edit it directly:
|
|
28
|
-
if you find an error, edit the source file (likely index.js), and re-run
|
|
29
|
-
./scripts/generate-readmes in the digitransit-util project. -->
|
|
30
|
-
|
|
31
26
|
---
|
|
32
27
|
|
|
33
28
|
This module is part of the Digitransit-ui project. It is maintained in the
|
|
@@ -41,9 +36,3 @@ Install this module individually:
|
|
|
41
36
|
```sh
|
|
42
37
|
$ npm install @digitransit-search-util/digitransit-search-util-serialize
|
|
43
38
|
```
|
|
44
|
-
|
|
45
|
-
Or install the Digitransit-util module that includes it as a function:
|
|
46
|
-
|
|
47
|
-
```sh
|
|
48
|
-
$ npm install @digitransit-util/digitransit-util
|
|
49
|
-
```
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitransit-search-util/digitransit-search-util-serialize",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "digitransit-search-util serialize module",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"publishConfig": {
|
|
7
8
|
"access": "public"
|
|
8
9
|
},
|
|
9
10
|
"scripts": {
|
|
10
|
-
"test": "
|
|
11
|
-
"docs": "node
|
|
11
|
+
"test": "vitest run --config ../../../config/vitest.config.js \"$PWD/test.js\"",
|
|
12
|
+
"docs": "node ../../../scripts/workspace-packages/generate-readmes.mjs"
|
|
12
13
|
},
|
|
13
14
|
"repository": {
|
|
14
15
|
"type": "git",
|
|
@@ -20,5 +21,5 @@
|
|
|
20
21
|
],
|
|
21
22
|
"author": "Digitransit Authors",
|
|
22
23
|
"license": "(AGPL-3.0 OR EUPL-1.2)",
|
|
23
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "3ea16b8aa7ff98fa4d58f72aed40ac0cda27c85f"
|
|
24
25
|
}
|
package/test.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import { describe, it } from 'mocha';
|
|
4
|
-
import serialize from '.';
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import serialize from './index.js';
|
|
5
3
|
|
|
6
4
|
describe('Testing @digitransit-search-util/digitransit-search-util-serialize module', () => {
|
|
7
5
|
it('Checking that null returns empty', () => {
|
|
8
6
|
const retValue = serialize(null, 'hello');
|
|
9
|
-
expect('').
|
|
7
|
+
expect('').toBe(retValue);
|
|
10
8
|
});
|
|
11
9
|
});
|