@bemoje/map 0.0.8 → 0.1.0

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 CHANGED
@@ -1,39 +1,11 @@
1
- # @bemoje/map
2
- Map related tools/util.
1
+ # map
3
2
 
4
- ![GitHub Top Language](https://img.shields.io/github/languages/top/bemoje/https://github.com/bemoje/tsmono)
3
+ This library was generated with [Nx](https://nx.dev).
5
4
 
6
- ##### Github
7
- ![GitHub Last Commit](https://img.shields.io/github/last-commit/bemoje/https://github.com/bemoje/tsmono?color=red)
8
- ![GitHub Stars](https://img.shields.io/github/stars/bemoje/https://github.com/bemoje/tsmono)
9
- ![GitHub Forks](https://img.shields.io/github/forks/bemoje/https://github.com/bemoje/tsmono)
10
- ![GitHub Watchers](https://img.shields.io/github/watchers/bemoje/https://github.com/bemoje/tsmono)
11
- ![GitHub Repo Size](https://img.shields.io/github/repo-size/bemoje/https://github.com/bemoje/tsmono)
5
+ ## Building
12
6
 
13
- ##### NPM
14
- <span><a href="https://npmjs.org/@bemoje/map" title="View this project on NPM"><img src="https://img.shields.io/npm/v/@bemoje/map" alt="NPM Version" /></a></span>
15
- <span><a href="https://npmjs.org/@bemoje/map" title="NPM Downloads"><img src="https://img.shields.io/npm/dt/@bemoje/map" alt="NPM Downloads" /></a></span>
7
+ Run `nx build map` to build the library.
16
8
 
17
- ## Documentation
18
- [map docs](https://bemoje.github.io/tsmono/modules/map.html)
9
+ ## Running unit tests
19
10
 
20
- ##### Donate
21
- <span><a href="https://www.patreon.com/user?u=40752770" title="Donate using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon Donation" /></a></span>
22
-
23
- ## Installation
24
- This library is published in the NPM registry and can be installed using any compatible package manager.
25
-
26
- #### NPM
27
- ```sh
28
- npm install @bemoje/map
29
- ```
30
-
31
-
32
- ## Issues
33
- Please let me know of any bugs or [issues](https://github.com/bemoje/https://github.com/bemoje/tsmono/issues).
34
-
35
- ## Contribute
36
- Contributors are welcome to open a [pull request](https://github.com/bemoje/https://github.com/bemoje/tsmono/pulls).
37
-
38
- ## License
39
- Released under the [MIT License](./LICENSE).
11
+ Run `nx test map` to execute the unit tests via [Jest](https://jestjs.io).
package/package.json CHANGED
@@ -1,13 +1,9 @@
1
1
  {
2
2
  "name": "@bemoje/map",
3
- "version": "0.0.8",
3
+ "version": "0.1.0",
4
4
  "description": "Map related tools/util.",
5
- "main": "dist/index.cjs.js",
6
- "module": "dist/index.esm.js",
7
- "types": "dist/types/index.d.ts",
8
- "scripts": {
9
- "build": "rimraf dist && rollup --config ./rollup.config.js --bundleConfigAsCjs"
10
- },
5
+ "main": "./src/index.js",
6
+ "scripts": {},
11
7
  "author": {
12
8
  "name": "Benjamin Møller Jensen",
13
9
  "email": "bemoje@bemoje.net",
@@ -15,7 +11,9 @@
15
11
  },
16
12
  "license": "MIT",
17
13
  "keywords": [],
18
- "dependencies": {},
14
+ "dependencies": {
15
+ "tslib": "^2.3.0"
16
+ },
19
17
  "repository": {
20
18
  "type": "git",
21
19
  "url": "git+https://github.com/bemoje/tsmono.git"
@@ -27,5 +25,8 @@
27
25
  "bugs": {
28
26
  "url": "https://github.com/bemoje/tsmono/issues"
29
27
  },
30
- "homepage": "https://github.com/bemoje/tsmono"
31
- }
28
+ "homepage": "https://github.com/bemoje/tsmono",
29
+ "type": "commonjs",
30
+ "typings": "./src/index.d.ts",
31
+ "types": "./src/index.d.ts"
32
+ }
@@ -1,4 +1,3 @@
1
1
  export * from './lib/mapGetOrElse';
2
2
  export * from './lib/mapReverse';
3
3
  export * from './lib/mapUpdate';
4
- //# sourceMappingURL=index.d.ts.map
package/src/index.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./lib/mapGetOrElse"), exports);
5
+ tslib_1.__exportStar(require("./lib/mapReverse"), exports);
6
+ tslib_1.__exportStar(require("./lib/mapUpdate"), exports);
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/map/src/index.ts"],"names":[],"mappings":";;;AAAA,6DAAkC;AAClC,2DAAgC;AAChC,0DAA+B"}
@@ -12,4 +12,3 @@
12
12
  * ```
13
13
  */
14
14
  export declare function mapGetOrElse<K, V>(map: Map<K, V>, key: K, callback: (key: K) => V): V;
15
- //# sourceMappingURL=mapGetOrElse.d.ts.map
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapGetOrElse = void 0;
4
+ /**
5
+ * Returns a value from a map, while setting a given default value before returning it, if the key is not present.
6
+ * @param map map to get value from
7
+ * @param key key to get value for
8
+ * @param callback callback to set the value if key is not present
9
+ * @template K - The type of the keys in the Map.
10
+ * @returns The value retrieved from the Map or generated by the callback function.
11
+ * @example ```ts
12
+ * const map = new Map<string, number>()
13
+ * map.set('key', 1)
14
+ * mapGetOrElse(map, 'nonexistentKey', () => 2) // Output: 2
15
+ * ```
16
+ */
17
+ function mapGetOrElse(map, key, callback) {
18
+ let value = map.get(key);
19
+ if (value !== undefined)
20
+ return value;
21
+ value = callback(key);
22
+ map.set(key, value);
23
+ return value;
24
+ }
25
+ exports.mapGetOrElse = mapGetOrElse;
26
+ //# sourceMappingURL=mapGetOrElse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapGetOrElse.js","sourceRoot":"","sources":["../../../../../packages/map/src/lib/mapGetOrElse.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;GAYG;AACH,SAAgB,YAAY,CAAO,GAAc,EAAE,GAAM,EAAE,QAAuB;IAChF,IAAI,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACxB,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAA;IACrC,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAA;IACrB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACnB,OAAO,KAAK,CAAA;AACd,CAAC;AAND,oCAMC"}
@@ -12,4 +12,3 @@
12
12
  * ```
13
13
  */
14
14
  export declare function mapReverse<K, V>(map: Map<K, V>): Map<K, V>;
15
- //# sourceMappingURL=mapReverse.d.ts.map
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapReverse = void 0;
4
+ /**
5
+ * Reverses the order of entries in a Map.
6
+ * @remarks This function creates a new Map with the entries of the original Map in reverse order.
7
+ * The original Map is not modified.
8
+ * @typeparam K - The type of the keys in the Map.
9
+ * @typeparam V - The type of the values in the Map.
10
+ * @param map The Map to reverse.
11
+ * @returns A new Map with the entries of the original Map in reverse order.
12
+ * @example ```ts
13
+ * mapReverse(new Map([['a', 1], ['b', 2], ['c', 3]]));;
14
+ * //=> [['c', 3], ['b', 2], ['a', 1]]
15
+ * ```
16
+ */
17
+ function mapReverse(map) {
18
+ return new Map([...map.entries()].reverse());
19
+ }
20
+ exports.mapReverse = mapReverse;
21
+ //# sourceMappingURL=mapReverse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapReverse.js","sourceRoot":"","sources":["../../../../../packages/map/src/lib/mapReverse.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;GAYG;AACH,SAAgB,UAAU,CAAO,GAAc;IAC7C,OAAO,IAAI,GAAG,CAAO,CAAC,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAA;AACpD,CAAC;AAFD,gCAEC"}
@@ -17,4 +17,3 @@
17
17
  * ```
18
18
  */
19
19
  export declare function mapUpdate<K, V>(map: Map<K, V>, key: K, fun: (value: V | undefined, key: K) => V): V;
20
- //# sourceMappingURL=mapUpdate.d.ts.map
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapUpdate = void 0;
4
+ /**
5
+ * Updates the value for the given key in the map using the provided function.
6
+ * If the key does not exist in the map, the function will be called with `undefined` as the value.
7
+ * @template K - The type of the keys in the map.
8
+ * @param map - The map to update.
9
+ * @param key - The key of the value to update.
10
+ * @param fun - The function to use to update the value.
11
+ * This function takes the current value (or `undefined` if the key does not exist) and the key as arguments,
12
+ * and should return the new value.
13
+ * @returns - The new value for the key.
14
+ * @example ```ts
15
+ * const map = new Map<string, number>()
16
+ * map.set('a', 1)
17
+ * mapUpdate(map, 'a', (value, key) => value !== undefined ? value + 1 : 0)
18
+ * map.get('a')
19
+ * //=> 2
20
+ * ```
21
+ */
22
+ function mapUpdate(map, key, fun) {
23
+ const value = fun(map.get(key), key);
24
+ map.set(key, value);
25
+ return value;
26
+ }
27
+ exports.mapUpdate = mapUpdate;
28
+ //# sourceMappingURL=mapUpdate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapUpdate.js","sourceRoot":"","sources":["../../../../../packages/map/src/lib/mapUpdate.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,SAAS,CAAO,GAAc,EAAE,GAAM,EAAE,GAAwC;IAC9F,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAA;IACpC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACnB,OAAO,KAAK,CAAA;AACd,CAAC;AAJD,8BAIC"}
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 Benjamin Møller Jensen
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/dist/index.cjs.js DELETED
@@ -1,6 +0,0 @@
1
- /*!
2
- * @bemoje/map v0.0.7
3
- * (c) Benjamin Møller Jensen
4
- * Released under the MIT License.
5
- */"use strict";function mapGetOrElse(map,key,callback){let value=map.get(key);return void 0===value?(value=callback(key),map.set(key,value),value):value}function mapReverse(map){return new Map([...map.entries()].reverse())}function mapUpdate(map,key,fun){const value=fun(map.get(key),key);return map.set(key,value),value}exports.mapGetOrElse=mapGetOrElse,exports.mapReverse=mapReverse,exports.mapUpdate=mapUpdate;
6
- //# sourceMappingURL=index.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../src/lib/mapGetOrElse.ts","../src/lib/mapReverse.ts","../src/lib/mapUpdate.ts"],"sourcesContent":["/**\n * Returns a value from a map, while setting a given default value before returning it, if the key is not present.\n * @param map map to get value from\n * @param key key to get value for\n * @param callback callback to set the value if key is not present\n * @template K - The type of the keys in the Map.\n * @returns The value retrieved from the Map or generated by the callback function.\n * @example ```ts\n * const map = new Map<string, number>()\n * map.set('key', 1)\n * mapGetOrElse(map, 'nonexistentKey', () => 2) // Output: 2\n * ```\n */\nexport function mapGetOrElse<K, V>(map: Map<K, V>, key: K, callback: (key: K) => V): V {\n let value = map.get(key)\n if (value !== undefined) return value\n value = callback(key)\n map.set(key, value)\n return value\n}\n","/**\n * Reverses the order of entries in a Map.\n * @remarks This function creates a new Map with the entries of the original Map in reverse order.\n * The original Map is not modified.\n * @typeparam K - The type of the keys in the Map.\n * @typeparam V - The type of the values in the Map.\n * @param map The Map to reverse.\n * @returns A new Map with the entries of the original Map in reverse order.\n * @example ```ts\n * mapReverse(new Map([['a', 1], ['b', 2], ['c', 3]]));;\n * //=> [['c', 3], ['b', 2], ['a', 1]]\n * ```\n */\nexport function mapReverse<K, V>(map: Map<K, V>): Map<K, V> {\n return new Map<K, V>([...map.entries()].reverse())\n}\n","/**\n * Updates the value for the given key in the map using the provided function.\n * If the key does not exist in the map, the function will be called with `undefined` as the value.\n * @template K - The type of the keys in the map.\n * @param map - The map to update.\n * @param key - The key of the value to update.\n * @param fun - The function to use to update the value.\n * This function takes the current value (or `undefined` if the key does not exist) and the key as arguments,\n * and should return the new value.\n * @returns - The new value for the key.\n * @example ```ts\n * const map = new Map<string, number>()\n * map.set('a', 1)\n * mapUpdate(map, 'a', (value, key) => value !== undefined ? value + 1 : 0)\n * map.get('a')\n * //=> 2\n * ```\n */\nexport function mapUpdate<K, V>(map: Map<K, V>, key: K, fun: (value: V | undefined, key: K) => V): V {\n const value = fun(map.get(key), key)\n map.set(key, value)\n return value\n}\n"],"names":["mapGetOrElse","map","key","callback","value","get","set","mapReverse","Map","entries","reverse","mapUpdate","fun"],"mappings":";;;;wBAagB,CAAAA,YAAYA,CAAOC,GAAc,CAAEC,GAAM,CAAEC,QAAuB,CAAA,CAChF,GAAI,CAAAC,KAAK,CAAGH,GAAG,CAACI,GAAG,CAACH,GAAG,CAAC,CAAA,MACpB,UAAAE,KAAmB,EACvBA,KAAK,CAAGD,QAAQ,CAACD,GAAG,CAAC,CACrBD,GAAG,CAACK,GAAG,CAACJ,GAAG,CAAEE,KAAK,CAAC,CACZA,KAAK,EAHoBA,KAIlC,CCNM,QAAU,CAAAG,UAAUA,CAAON,GAAc,CAAA,CAC7C,MAAO,IAAI,CAAAO,GAAG,CAAO,CAAC,GAAGP,GAAG,CAACQ,OAAO,EAAE,CAAC,CAACC,OAAO,CAAA,CAAE,CACnD,SCGgB,CAAAC,SAASA,CAAOV,GAAc,CAAEC,GAAM,CAAEU,GAAwC,CAAA,CAC9F,KAAM,CAAAR,KAAK,CAAGQ,GAAG,CAACX,GAAG,CAACI,GAAG,CAACH,GAAG,CAAC,CAAEA,GAAG,CAAC,CAEpC,MADA,CAAAD,GAAG,CAACK,GAAG,CAACJ,GAAG,CAAEE,KAAK,CAAC,CACZA,KACT"}
package/dist/index.esm.js DELETED
@@ -1,6 +0,0 @@
1
- /*!
2
- * @bemoje/map v0.0.7
3
- * (c) Benjamin Møller Jensen
4
- * Released under the MIT License.
5
- */function mapGetOrElse(map,key,callback){let value=map.get(key);return void 0===value?(value=callback(key),map.set(key,value),value):value}function mapReverse(map){return new Map([...map.entries()].reverse())}function mapUpdate(map,key,fun){const value=fun(map.get(key),key);return map.set(key,value),value}export{mapGetOrElse,mapReverse,mapUpdate};
6
- //# sourceMappingURL=index.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/lib/mapGetOrElse.ts","../src/lib/mapReverse.ts","../src/lib/mapUpdate.ts"],"sourcesContent":["/**\n * Returns a value from a map, while setting a given default value before returning it, if the key is not present.\n * @param map map to get value from\n * @param key key to get value for\n * @param callback callback to set the value if key is not present\n * @template K - The type of the keys in the Map.\n * @returns The value retrieved from the Map or generated by the callback function.\n * @example ```ts\n * const map = new Map<string, number>()\n * map.set('key', 1)\n * mapGetOrElse(map, 'nonexistentKey', () => 2) // Output: 2\n * ```\n */\nexport function mapGetOrElse<K, V>(map: Map<K, V>, key: K, callback: (key: K) => V): V {\n let value = map.get(key)\n if (value !== undefined) return value\n value = callback(key)\n map.set(key, value)\n return value\n}\n","/**\n * Reverses the order of entries in a Map.\n * @remarks This function creates a new Map with the entries of the original Map in reverse order.\n * The original Map is not modified.\n * @typeparam K - The type of the keys in the Map.\n * @typeparam V - The type of the values in the Map.\n * @param map The Map to reverse.\n * @returns A new Map with the entries of the original Map in reverse order.\n * @example ```ts\n * mapReverse(new Map([['a', 1], ['b', 2], ['c', 3]]));;\n * //=> [['c', 3], ['b', 2], ['a', 1]]\n * ```\n */\nexport function mapReverse<K, V>(map: Map<K, V>): Map<K, V> {\n return new Map<K, V>([...map.entries()].reverse())\n}\n","/**\n * Updates the value for the given key in the map using the provided function.\n * If the key does not exist in the map, the function will be called with `undefined` as the value.\n * @template K - The type of the keys in the map.\n * @param map - The map to update.\n * @param key - The key of the value to update.\n * @param fun - The function to use to update the value.\n * This function takes the current value (or `undefined` if the key does not exist) and the key as arguments,\n * and should return the new value.\n * @returns - The new value for the key.\n * @example ```ts\n * const map = new Map<string, number>()\n * map.set('a', 1)\n * mapUpdate(map, 'a', (value, key) => value !== undefined ? value + 1 : 0)\n * map.get('a')\n * //=> 2\n * ```\n */\nexport function mapUpdate<K, V>(map: Map<K, V>, key: K, fun: (value: V | undefined, key: K) => V): V {\n const value = fun(map.get(key), key)\n map.set(key, value)\n return value\n}\n"],"names":["mapGetOrElse","map","key","callback","value","get","set","mapReverse","Map","entries","reverse","mapUpdate","fun"],"mappings":";;;;WAagB,CAAAA,YAAYA,CAAOC,GAAc,CAAEC,GAAM,CAAEC,QAAuB,CAAA,CAChF,GAAI,CAAAC,KAAK,CAAGH,GAAG,CAACI,GAAG,CAACH,GAAG,CAAC,CAAA,MACpB,UAAAE,KAAmB,EACvBA,KAAK,CAAGD,QAAQ,CAACD,GAAG,CAAC,CACrBD,GAAG,CAACK,GAAG,CAACJ,GAAG,CAAEE,KAAK,CAAC,CACZA,KAAK,EAHoBA,KAIlC,CCNM,QAAU,CAAAG,UAAUA,CAAON,GAAc,CAAA,CAC7C,MAAO,IAAI,CAAAO,GAAG,CAAO,CAAC,GAAGP,GAAG,CAACQ,OAAO,EAAE,CAAC,CAACC,OAAO,CAAA,CAAE,CACnD,SCGgB,CAAAC,SAASA,CAAOV,GAAc,CAAEC,GAAM,CAAEU,GAAwC,CAAA,CAC9F,KAAM,CAAAR,KAAK,CAAGQ,GAAG,CAACX,GAAG,CAACI,GAAG,CAACH,GAAG,CAAC,CAAEA,GAAG,CAAC,CAEpC,MADA,CAAAD,GAAG,CAACK,GAAG,CAACJ,GAAG,CAAEE,KAAK,CAAC,CACZA,KACT"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mapGetOrElse.d.ts","sourceRoot":"","sources":["../../../src/lib/mapGetOrElse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAMrF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mapReverse.d.ts","sourceRoot":"","sources":["../../../src/lib/mapReverse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAE1D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mapUpdate.d.ts","sourceRoot":"","sources":["../../../src/lib/mapUpdate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,SAAS,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAInG"}
package/jest.config.ts DELETED
@@ -1,13 +0,0 @@
1
- /* eslint-disable */
2
- const pkg = require('./package.json')
3
- const name = pkg.name.split('@')[1]
4
- export default {
5
- displayName: name,
6
- preset: '../../jest.preset.js',
7
- testEnvironment: 'node',
8
- transform: {
9
- '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
10
- },
11
- moduleFileExtensions: ['ts', 'js', 'html'],
12
- coverageDirectory: '../../coverage/pkg/' + name,
13
- }
package/project.json DELETED
@@ -1,30 +0,0 @@
1
- {
2
- "name": "map",
3
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "pkg/map/src",
5
- "projectType": "library",
6
- "targets": {
7
- "lint": {
8
- "executor": "@nx/linter:eslint",
9
- "outputs": ["{options.outputFile}"],
10
- "options": {
11
- "lintFilePatterns": ["pkg/map/**/*.ts"]
12
- }
13
- },
14
- "test": {
15
- "executor": "@nx/jest:jest",
16
- "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
17
- "options": {
18
- "jestConfig": "pkg/map/jest.config.ts",
19
- "passWithNoTests": true
20
- },
21
- "configurations": {
22
- "ci": {
23
- "ci": true,
24
- "codeCoverage": true
25
- }
26
- }
27
- }
28
- },
29
- "tags": []
30
- }
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../dist/out-tsc",
5
- "module": "commonjs",
6
- "types": ["jest", "node"]
7
- },
8
- "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"]
9
- }