xjs-common 8.0.0 → 8.0.1
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 +1 -1
- package/dist/const/types.d.ts +1 -0
- package/dist/func/u-file.d.ts +7 -6
- package/dist/func/u-type.d.ts +2 -2
- package/package.json +3 -2
package/README.md
CHANGED
@@ -4,7 +4,7 @@ Available to `npm i xjs-common`.
|
|
4
4
|
**NOTE**: The versions <= `v6.2.0` was unpublished. If you has been used these versions, please update to the version >= `v7.0.0`.
|
5
5
|
|
6
6
|
# Overview
|
7
|
-
Library modules for nodejs that bundled general-purpose implementations.
|
7
|
+
Library modules for nodejs + typescript that bundled general-purpose implementations.
|
8
8
|
This module is very simple, therefore it has no dependencies.
|
9
9
|
|
10
10
|
# Code example (only part)
|
package/dist/const/types.d.ts
CHANGED
package/dist/func/u-file.d.ts
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
/// <reference types="node" />
|
2
|
+
import { MaybeArray } from "../const/types";
|
2
3
|
export declare namespace UFile {
|
3
|
-
function mkdir(p: string
|
4
|
-
function write(p: string
|
4
|
+
function mkdir(p: MaybeArray<string>): boolean;
|
5
|
+
function write(p: MaybeArray<string>, c: string): void;
|
5
6
|
function exists(...p: string[]): boolean;
|
6
|
-
function read(p: string
|
7
|
-
function read(p: string
|
8
|
-
function cp(from: string
|
9
|
-
function mv(from: string
|
7
|
+
function read(p: MaybeArray<string>): Buffer;
|
8
|
+
function read(p: MaybeArray<string>, encoding: BufferEncoding): string;
|
9
|
+
function cp(from: MaybeArray<string>, to: MaybeArray<string>): void;
|
10
|
+
function mv(from: MaybeArray<string>, to: MaybeArray<string>): void;
|
10
11
|
}
|
package/dist/func/u-type.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Type } from "../const/types";
|
1
|
+
import { MaybeArray, Type } from "../const/types";
|
2
2
|
export declare namespace UType {
|
3
3
|
function isDefined(v: any): boolean;
|
4
4
|
function isEmpty(v: any): boolean;
|
@@ -21,5 +21,5 @@ export declare namespace UType {
|
|
21
21
|
* @returns invalid property keys. returns an empty array if `o` is valid.
|
22
22
|
*/
|
23
23
|
function validate(o: any): string[];
|
24
|
-
function takeAsArray<T>(v: T
|
24
|
+
function takeAsArray<T>(v: MaybeArray<T>): T[];
|
25
25
|
}
|
package/package.json
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "xjs-common",
|
3
|
-
"version": "8.0.
|
4
|
-
"description": "library modules for nodejs that bundled general-purpose implementations.",
|
3
|
+
"version": "8.0.1",
|
4
|
+
"description": "library modules for nodejs + typescript that bundled general-purpose implementations.",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
7
7
|
"url": "https://github.com/begyyal/xjs_commons"
|
8
8
|
},
|
9
9
|
"keywords": [
|
10
10
|
"node",
|
11
|
+
"typescript",
|
11
12
|
"utility"
|
12
13
|
],
|
13
14
|
"scripts": {
|