Comparing version 2.0.0-alpha.2 to 2.0.0-alpha.3
@@ -1,34 +0,3 @@ | ||
/** | ||
* Copy properties from one or more source objects to a target object. | ||
* | ||
* @type {ExtendFn} | ||
* | ||
* @param {object} target - The target object to copy properties to. | ||
* @param {...object} sources - The source objects to copy properties from. | ||
* @returns {object} The modified target object. | ||
* | ||
* @example | ||
* // Example 1: | ||
* const targetObj = { a: 1 }; | ||
* const sourceObj1 = { b: 2 }; | ||
* const sourceObj2 = { c: 3 }; | ||
* | ||
* const result = extend(targetObj, sourceObj1, sourceObj2); | ||
* // targetObj is now { a: 1, b: 2, c: 3 } | ||
* // result is also { a: 1, b: 2, c: 3 } | ||
* | ||
* @example | ||
* // Example 2: | ||
* const targetObj = { a: 1 }; | ||
* const sourceObj = Object.create({ b: 2 }); | ||
* | ||
* const result = extend(targetObj, sourceObj); | ||
* // targetObj is now { a: 1 } | ||
* // result is also { a: 1 } | ||
*/ | ||
export const _extend: ExtendFn; | ||
export { _extend } from "inherits-ex"; | ||
export default _extend; | ||
/** | ||
* Copy properties from one or more source objects to a target object. | ||
*/ | ||
export type ExtendFn = (target: object, ...sources: object[]) => object; | ||
import { _extend } from "inherits-ex"; |
@@ -6,49 +6,11 @@ "use strict"; | ||
}); | ||
exports.default = exports._extend = void 0; | ||
var _mutable = _interopRequireDefault(require("xtend/mutable.js")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/** | ||
* Copy properties from one or more source objects to a target object. | ||
* | ||
* @type {ExtendFn} | ||
* | ||
* @param {object} target - The target object to copy properties to. | ||
* @param {...object} sources - The source objects to copy properties from. | ||
* @returns {object} The modified target object. | ||
* | ||
* @example | ||
* // Example 1: | ||
* const targetObj = { a: 1 }; | ||
* const sourceObj1 = { b: 2 }; | ||
* const sourceObj2 = { c: 3 }; | ||
* | ||
* const result = extend(targetObj, sourceObj1, sourceObj2); | ||
* // targetObj is now { a: 1, b: 2, c: 3 } | ||
* // result is also { a: 1, b: 2, c: 3 } | ||
* | ||
* @example | ||
* // Example 2: | ||
* const targetObj = { a: 1 }; | ||
* const sourceObj = Object.create({ b: 2 }); | ||
* | ||
* const result = extend(targetObj, sourceObj); | ||
* // targetObj is now { a: 1 } | ||
* // result is also { a: 1 } | ||
*/ | ||
const _extend = _mutable.default; | ||
/** | ||
* | ||
* @type {ExtendFn} | ||
*/ | ||
exports._extend = _extend; | ||
var _default = _extend; | ||
/** | ||
* Copy properties from one or more source objects to a target object. | ||
* | ||
* @callback ExtendFn | ||
* @param {object} target - The target object to copy properties to. | ||
* @param {...object} sources - The source objects to copy properties from. | ||
* @returns {object} The modified target object. | ||
* | ||
*/ | ||
Object.defineProperty(exports, "_extend", { | ||
enumerable: true, | ||
get: function () { | ||
return _inheritsEx._extend; | ||
} | ||
}); | ||
exports.default = void 0; | ||
var _inheritsEx = require("inherits-ex"); | ||
var _default = _inheritsEx._extend; | ||
exports.default = _default; |
@@ -1,2 +0,2 @@ | ||
export const isInt: any; | ||
export function isInt(value: unknown): boolean; | ||
export default isInt; |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/snowyu/util-ex.js", | ||
"version": "2.0.0-alpha.2", | ||
"version": "2.0.0-alpha.3", | ||
"author": { | ||
@@ -63,3 +63,3 @@ "name": "Riceball LEE", | ||
"build.cjs": "babel src --out-dir lib --config-file ./.babelrc", | ||
"build.ts": "tsc --outDir lib", | ||
"build.ts": "tsc --declaration --emitDeclarationOnly --outDir lib", | ||
"clean": "rm -fr web docs lib", | ||
@@ -78,4 +78,4 @@ "clean.doc": "rm -fr web docs", | ||
"dependencies": { | ||
"inherits-ex": "^2.1.0-alpha.4" | ||
"inherits-ex": "^2.1.0-alpha.5" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
210132
5801
Updatedinherits-ex@^2.1.0-alpha.5