ut2 1.11.4 → 1.11.5

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.
@@ -2,7 +2,7 @@ import isObjectLike from '../isObjectLike.js';
2
2
  import getTag from './getTag.js';
3
3
  import { argumentsTag, stringUndefined, functionProtoToString } from './native.js';
4
4
 
5
- var VERSION = "1.11.4";
5
+ var VERSION = "1.11.5";
6
6
  var isBrowser = typeof window !== stringUndefined && isObjectLike(window) && typeof document !== stringUndefined && isObjectLike(document) && window.document === document;
7
7
  var supportedArgumentsType = getTag((function () { return arguments; })()) === argumentsTag;
8
8
  var FUNC_ERROR_TEXT = 'Expected a function';
package/es/omit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import allKeysIn from './allKeysIn.js';
2
2
  import castArray from './castArray.js';
3
3
 
4
- var omit = function (object, fields) {
4
+ function omit(object, fields) {
5
5
  if (fields === void 0) { fields = []; }
6
6
  var keys = allKeysIn(object);
7
7
  var fieldArr = castArray(fields);
@@ -12,6 +12,6 @@ var omit = function (object, fields) {
12
12
  }
13
13
  });
14
14
  return result;
15
- };
15
+ }
16
16
 
17
17
  export { omit as default };
package/es/pick.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import castArray from './castArray.js';
2
2
  import isObject from './isObject.js';
3
3
 
4
- var pick = function (object, fields) {
4
+ function pick(object, fields) {
5
5
  if (fields === void 0) { fields = []; }
6
6
  var result = {};
7
7
  if (!isObject(object)) {
@@ -14,6 +14,6 @@ var pick = function (object, fields) {
14
14
  }
15
15
  });
16
16
  return result;
17
- };
17
+ }
18
18
 
19
19
  export { pick as default };
@@ -4,7 +4,7 @@ var isObjectLike = require('../isObjectLike.js');
4
4
  var getTag = require('./getTag.js');
5
5
  var native = require('./native.js');
6
6
 
7
- var VERSION = "1.11.4";
7
+ var VERSION = "1.11.5";
8
8
  var isBrowser = typeof window !== native.stringUndefined && isObjectLike(window) && typeof document !== native.stringUndefined && isObjectLike(document) && window.document === document;
9
9
  var supportedArgumentsType = getTag((function () { return arguments; })()) === native.argumentsTag;
10
10
  var FUNC_ERROR_TEXT = 'Expected a function';
package/lib/omit.js CHANGED
@@ -3,7 +3,7 @@
3
3
  var allKeysIn = require('./allKeysIn.js');
4
4
  var castArray = require('./castArray.js');
5
5
 
6
- var omit = function (object, fields) {
6
+ function omit(object, fields) {
7
7
  if (fields === void 0) { fields = []; }
8
8
  var keys = allKeysIn(object);
9
9
  var fieldArr = castArray(fields);
@@ -14,6 +14,6 @@ var omit = function (object, fields) {
14
14
  }
15
15
  });
16
16
  return result;
17
- };
17
+ }
18
18
 
19
19
  module.exports = omit;
package/lib/pick.js CHANGED
@@ -3,7 +3,7 @@
3
3
  var castArray = require('./castArray.js');
4
4
  var isObject = require('./isObject.js');
5
5
 
6
- var pick = function (object, fields) {
6
+ function pick(object, fields) {
7
7
  if (fields === void 0) { fields = []; }
8
8
  var result = {};
9
9
  if (!isObject(object)) {
@@ -16,6 +16,6 @@ var pick = function (object, fields) {
16
16
  }
17
17
  });
18
18
  return result;
19
- };
19
+ }
20
20
 
21
21
  module.exports = pick;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ut2",
3
- "version": "1.11.4",
3
+ "version": "1.11.5",
4
4
  "author": "caijf",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
package/types/omit.d.ts CHANGED
@@ -1,9 +1,4 @@
1
- import { Many, PropertyName, WithNullable } from './internals/types';
2
- interface OmitFunction {
3
- <T extends object, K extends keyof T = never>(object: WithNullable<T>, fields?: Many<K>): Omit<T, K>;
4
- <T extends object, K extends PropertyName>(object: WithNullable<T>, fields?: Many<K>): Partial<T>;
5
- (object: any, fields?: Many<PropertyName>): Record<PropertyName, any>;
6
- }
1
+ import { Many, WithNullable } from './internals/types';
7
2
  /**
8
3
  * 创建一个对象,该对象由忽略属性之外的 `object` 自身和继承的可枚举属性组成。与 [`pick`](#.pick) 相反。
9
4
  *
@@ -27,5 +22,5 @@ interface OmitFunction {
27
22
  * omit(obj, ['name', 'age']); // {}
28
23
  *
29
24
  */
30
- declare const omit: OmitFunction;
25
+ declare function omit<T extends object, K extends keyof T>(object: WithNullable<T>, fields?: Many<K>): Omit<T, K>;
31
26
  export default omit;
package/types/pick.d.ts CHANGED
@@ -1,9 +1,4 @@
1
- import { Many, PropertyName, WithNullable } from './internals/types';
2
- interface PickFunction {
3
- <T extends object, K extends keyof T = never>(object: WithNullable<T>, fields?: Many<K>): Pick<T, K>;
4
- <T extends object, K extends PropertyName>(object: WithNullable<T>, fields?: Many<K>): Partial<T>;
5
- (object: any, fields?: PropertyName): Record<PropertyName, any>;
6
- }
1
+ import { Many, WithNullable } from './internals/types';
7
2
  /**
8
3
  * 创建一个从 `object` 选中的属性的对象。
9
4
  *
@@ -27,5 +22,5 @@ interface PickFunction {
27
22
  * // 选取多个属性
28
23
  * pick(obj, ['name', 'age']); // { name: "jeff", age: 18 }
29
24
  */
30
- declare const pick: PickFunction;
25
+ declare function pick<T extends object, K extends keyof T>(object: WithNullable<T>, fields?: Many<K>): Pick<T, K>;
31
26
  export default pick;