@spinajs/util 2.0.45 → 2.0.50

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,11 +1,11 @@
1
- # `jobs`
2
-
3
- > TODO: description
4
-
5
- ## Usage
6
-
7
- ```
8
- const jobs = require('jobs');
9
-
10
- // TODO: DEMONSTRATE API
11
- ```
1
+ # `jobs`
2
+
3
+ > TODO: description
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ const jobs = require('jobs');
9
+
10
+ // TODO: DEMONSTRATE API
11
+ ```
package/lib/index.d.ts CHANGED
@@ -1 +1,2 @@
1
- export * from './json';
1
+ export * from './json.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
package/lib/index.js CHANGED
@@ -1,18 +1,2 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./json"), exports);
1
+ export * from './json.js';
18
2
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
package/lib/json.d.ts CHANGED
@@ -4,3 +4,4 @@ export interface ICustomDataType {
4
4
  }
5
5
  export declare function replacer(_: string, value: unknown): unknown;
6
6
  export declare function reviver(_: string, value: ICustomDataType): ICustomDataType | Map<unknown, unknown>;
7
+ //# sourceMappingURL=json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../src/json.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,GAAG,CAAC;CACZ;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,WASjD;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,2CAOxD"}
package/lib/json.js CHANGED
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reviver = exports.replacer = void 0;
4
- function replacer(_, value) {
1
+ export function replacer(_, value) {
5
2
  if (value instanceof Map) {
6
3
  return {
7
4
  dataType: 'Map',
@@ -12,8 +9,7 @@ function replacer(_, value) {
12
9
  return value;
13
10
  }
14
11
  }
15
- exports.replacer = replacer;
16
- function reviver(_, value) {
12
+ export function reviver(_, value) {
17
13
  if (typeof value === 'object' && value !== null) {
18
14
  if (value.dataType === 'Map') {
19
15
  return new Map(value.value);
@@ -21,5 +17,4 @@ function reviver(_, value) {
21
17
  }
22
18
  return value;
23
19
  }
24
- exports.reviver = reviver;
25
20
  //# sourceMappingURL=json.js.map
package/lib/json.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"json.js","sourceRoot":"","sources":["../src/json.ts"],"names":[],"mappings":";;;AAKA,SAAgB,QAAQ,CAAC,CAAS,EAAE,KAAc;IAChD,IAAI,KAAK,YAAY,GAAG,EAAE;QACxB,OAAO;YACL,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,EAAE,oCAAoC;SACzE,CAAC;KACH;SAAM;QACL,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AATD,4BASC;AAED,SAAgB,OAAO,CAAC,CAAS,EAAE,KAAsB;IACvD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;QAC/C,IAAI,KAAK,CAAC,QAAQ,KAAK,KAAK,EAAE;YAC5B,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC7B;KACF;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAPD,0BAOC"}
1
+ {"version":3,"file":"json.js","sourceRoot":"","sources":["../src/json.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,QAAQ,CAAC,CAAS,EAAE,KAAc;IAChD,IAAI,KAAK,YAAY,GAAG,EAAE;QACxB,OAAO;YACL,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,EAAE,oCAAoC;SACzE,CAAC;KACH;SAAM;QACL,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,CAAS,EAAE,KAAsB;IACvD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;QAC/C,IAAI,KAAK,CAAC,QAAQ,KAAK,KAAK,EAAE;YAC5B,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC7B;KACF;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
package/package.json CHANGED
@@ -1,41 +1,44 @@
1
- {
2
- "name": "@spinajs/util",
3
- "version": "2.0.45",
4
- "description": "utility functions shared across @spinajs framework",
5
- "main": "lib/index.js",
6
- "private": false,
7
- "scripts": {
8
- "build": "npm run clean && npm run compile && cpx src/views/**/* lib/views && cpx src/static/**/* lib/static",
9
- "compile": "tsc -p tsconfig.build.json",
10
- "clean": "",
11
- "test": "ts-mocha -p tsconfig.json test/**/*.test.ts",
12
- "coverage": "nyc npm run test",
13
- "build-docs": "rimraf docs && typedoc --options typedoc.json src/",
14
- "prepare": "npm run build",
15
- "format": "prettier --write \"src/**/*.ts\"",
16
- "lint": "eslint -c .eslintrc.js --ext .ts src --fix",
17
- "prepublishOnly": "npm test && npm run lint",
18
- "preversion": "npm run lint",
19
- "version": "npm run format && git add -A src",
20
- "postversion": "git push && git push --tags"
21
- },
22
- "files": [
23
- "lib/**/*"
24
- ],
25
- "types": "lib",
26
- "repository": {
27
- "type": "git",
28
- "url": "git+https://github.com/spinajs/main.git"
29
- },
30
- "keywords": [
31
- "spinajs",
32
- "http"
33
- ],
34
- "author": "SpinaJS <spinajs@coderush.pl> (https://github.com/spinajs/main)",
35
- "license": "MIT",
36
- "bugs": {
37
- "url": "https://github.com/spinajs/main/issues"
38
- },
39
- "homepage": "https://github.com/spinajs/main#readme",
40
- "gitHead": "3aa423c570eae952dc79fe6a4704c3d2ccc178be"
41
- }
1
+ {
2
+ "name": "@spinajs/util",
3
+ "version": "2.0.50",
4
+ "description": "utility functions shared across @spinajs framework",
5
+ "exports": "./lib/index.js",
6
+ "type": "module",
7
+ "private": false,
8
+ "engines": {
9
+ "node": ">=16.11"
10
+ },
11
+ "scripts": {
12
+ "build": "npm run clean && npm run compile",
13
+ "compile": "tsc -b tsconfig.json",
14
+ "rimraf": "./node_modules/rimraf/bin.js",
15
+ "clean": "rimraf lib/ && rimraf tsconfig.tsbuildinfo",
16
+ "test": "ts-mocha -p tsconfig.json test/**/*.test.ts",
17
+ "coverage": "nyc npm run test",
18
+ "build-docs": "rimraf docs && typedoc --options typedoc.json src/",
19
+ "format": "prettier --write \"src/**/*.ts\"",
20
+ "lint": "eslint -c .eslintrc.cjs --ext .ts src --fix",
21
+ "preversion": "npm run lint",
22
+ "version": "npm run format && git add -A src",
23
+ "postinstall": "npm run build"
24
+ },
25
+ "files": [
26
+ "lib/**/*"
27
+ ],
28
+ "types": "lib",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/spinajs/main.git"
32
+ },
33
+ "keywords": [
34
+ "spinajs",
35
+ "http"
36
+ ],
37
+ "author": "SpinaJS <spinajs@coderush.pl> (https://github.com/spinajs/main)",
38
+ "license": "MIT",
39
+ "bugs": {
40
+ "url": "https://github.com/spinajs/main/issues"
41
+ },
42
+ "homepage": "https://github.com/spinajs/main#readme",
43
+ "gitHead": "002dc553b0ffffd72193d0121ac425a4083bc9ee"
44
+ }
package/lib/jobs.js DELETED
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = jobs;
4
-
5
- function jobs() {
6
- // TODO
7
- }