@bemoje/map 0.0.1 → 0.0.3

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 ADDED
@@ -0,0 +1,39 @@
1
+ # @bemoje/map
2
+ Map related tools/util.
3
+
4
+ ![GitHub Top Language](https://img.shields.io/github/languages/top/bemoje/https://github.com/bemoje/tsmono)
5
+
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)
12
+
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>
16
+
17
+ ## Documentation
18
+ [map docs](https://bemoje.github.io/tsmono/html/map/modules.html)
19
+
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).
package/dist/index.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @bemoje/map v0.0.1
2
+ * @bemoje/map v0.0.2
3
3
  * (c) Benjamin Møller Jensen
4
4
  * Released under the MIT License.
5
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;
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @bemoje/map v0.0.1
2
+ * @bemoje/map v0.0.2
3
3
  * (c) Benjamin Møller Jensen
4
4
  * Released under the MIT License.
5
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};
package/jest.config.ts ADDED
@@ -0,0 +1,13 @@
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/package.json CHANGED
@@ -1,16 +1,13 @@
1
1
  {
2
2
  "name": "@bemoje/map",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Map related tools/util.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
7
7
  "types": "dist/types/index.d.ts",
8
8
  "scripts": {
9
- "lint": "eslint \"*/**/*.{ts,js,json}\" --fix",
10
- "test": "jest --preset ts-jest",
11
9
  "build": "rimraf dist && rollup --config ./rollup.config.js --bundleConfigAsCjs",
12
- "docs": "rimraf ../../docs/map && typedoc --out ../../docs/map --entryPoints src/index.ts",
13
- "prepub": "npm run lint && npm run build && npm run test && npm run docs"
10
+ "docs": "rimraf ../../docs/map && typedoc --out ../../docs/map --entryPoints src/index.ts"
14
11
  },
15
12
  "author": {
16
13
  "name": "Benjamin Møller Jensen",
package/project.json CHANGED
@@ -3,6 +3,28 @@
3
3
  "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
4
  "sourceRoot": "pkg/map/src",
5
5
  "projectType": "library",
6
- "targets": {},
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
+ },
7
29
  "tags": []
8
30
  }
@@ -0,0 +1,9 @@
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
+ }