@nr1e/commons 0.0.2 → 0.0.3-alpha.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/index.d.ts +1 -0
- package/index.js +2 -1
- package/index.js.map +1 -1
- package/lang/index.d.ts +1 -0
- package/lang/index.js +18 -0
- package/lang/index.js.map +1 -0
- package/lang/type-functions.d.ts +3 -0
- package/lang/type-functions.js +16 -0
- package/lang/type-functions.js.map +1 -0
- package/package.json +3 -2
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.http = exports.errors = exports.validator = void 0;
|
|
3
|
+
exports.lang = exports.http = exports.errors = exports.validator = void 0;
|
|
4
4
|
exports.validator = require("./validator");
|
|
5
5
|
exports.errors = require("./errors");
|
|
6
6
|
exports.http = require("./http");
|
|
7
|
+
exports.lang = require("./lang");
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AACzC,qCAAmC;AACnC,iCAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AACzC,qCAAmC;AACnC,iCAA+B;AAC/B,iCAA+B"}
|
package/lang/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './type-functions';
|
package/lang/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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("./type-functions"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isError = exports.isString = exports.isObject = void 0;
|
|
4
|
+
function isObject(item) {
|
|
5
|
+
return (item !== null && typeof item === 'object' && Array.isArray(item) === false);
|
|
6
|
+
}
|
|
7
|
+
exports.isObject = isObject;
|
|
8
|
+
function isString(item) {
|
|
9
|
+
return typeof item === 'string';
|
|
10
|
+
}
|
|
11
|
+
exports.isString = isString;
|
|
12
|
+
function isError(item) {
|
|
13
|
+
return item instanceof Error;
|
|
14
|
+
}
|
|
15
|
+
exports.isError = isError;
|
|
16
|
+
//# sourceMappingURL=type-functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-functions.js","sourceRoot":"","sources":["type-functions.ts"],"names":[],"mappings":";;;AAAA,SAAgB,QAAQ,CAAC,IAAa;IACpC,OAAO,CACL,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,CAC3E,CAAC;AACJ,CAAC;AAJD,4BAIC;AAED,SAAgB,QAAQ,CAAC,IAAa;IACpC,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC;AAClC,CAAC;AAFD,4BAEC;AAED,SAAgB,OAAO,CAAC,IAAa;IACnC,OAAO,IAAI,YAAY,KAAK,CAAC;AAC/B,CAAC;AAFD,0BAEC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nr1e/commons",
|
|
3
3
|
"description": "Provides common patterns for validation",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3-alpha.0",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"author": "NR1E, Inc.",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"./package.json": "./package.json",
|
|
34
34
|
"./http": "./http/index.js",
|
|
35
35
|
"./errors": "./errors/index.js",
|
|
36
|
-
"./validator": "./validator/index.js"
|
|
36
|
+
"./validator": "./validator/index.js",
|
|
37
|
+
"./lang": "./lang/index.js"
|
|
37
38
|
},
|
|
38
39
|
"scripts": {
|
|
39
40
|
"build": "tsc",
|