chore: update to version 14.0.11 and align website URLs

This commit is contained in:
2026-01-11 11:34:13 +03:00
parent ef74383349
commit 19c8d69bd8
1499 changed files with 53633 additions and 89 deletions
+5
View File
@@ -0,0 +1,5 @@
/**
* @name objectClear
* @summary Removes all the keys from the input object
*/
export declare function objectClear<T>(value: Record<string, T>): Record<string, T>;
+14
View File
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.objectClear = objectClear;
/**
* @name objectClear
* @summary Removes all the keys from the input object
*/
function objectClear(value) {
const keys = Object.keys(value);
for (let i = 0, count = keys.length; i < count; i++) {
delete value[keys[i]];
}
return value;
}
+5
View File
@@ -0,0 +1,5 @@
/**
* @name objectCopy
* @summary Creates a shallow clone of the input object
*/
export declare function objectCopy<T extends object>(source: T): T;
+11
View File
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.objectCopy = objectCopy;
const spread_js_1 = require("./spread.js");
/**
* @name objectCopy
* @summary Creates a shallow clone of the input object
*/
function objectCopy(source) {
return (0, spread_js_1.objectSpread)({}, source);
}
+9
View File
@@ -0,0 +1,9 @@
type Entries<T> = {
[K in keyof T]: [K, T[K]];
}[keyof T][];
/**
* @name objectEntries
* @summary A version of Object.entries that is typed for TS
*/
export declare function objectEntries<T extends object>(obj: T): Entries<T>;
export {};
+10
View File
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.objectEntries = objectEntries;
/**
* @name objectEntries
* @summary A version of Object.entries that is typed for TS
*/
function objectEntries(obj) {
return Object.entries(obj);
}
+7
View File
@@ -0,0 +1,7 @@
export { objectClear } from './clear.js';
export { objectCopy } from './copy.js';
export { objectEntries } from './entries.js';
export { objectKeys } from './keys.js';
export { objectProperties, objectProperty } from './property.js';
export { objectSpread } from './spread.js';
export { objectValues } from './values.js';
+18
View File
@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.objectValues = exports.objectSpread = exports.objectProperty = exports.objectProperties = exports.objectKeys = exports.objectEntries = exports.objectCopy = exports.objectClear = void 0;
var clear_js_1 = require("./clear.js");
Object.defineProperty(exports, "objectClear", { enumerable: true, get: function () { return clear_js_1.objectClear; } });
var copy_js_1 = require("./copy.js");
Object.defineProperty(exports, "objectCopy", { enumerable: true, get: function () { return copy_js_1.objectCopy; } });
var entries_js_1 = require("./entries.js");
Object.defineProperty(exports, "objectEntries", { enumerable: true, get: function () { return entries_js_1.objectEntries; } });
var keys_js_1 = require("./keys.js");
Object.defineProperty(exports, "objectKeys", { enumerable: true, get: function () { return keys_js_1.objectKeys; } });
var property_js_1 = require("./property.js");
Object.defineProperty(exports, "objectProperties", { enumerable: true, get: function () { return property_js_1.objectProperties; } });
Object.defineProperty(exports, "objectProperty", { enumerable: true, get: function () { return property_js_1.objectProperty; } });
var spread_js_1 = require("./spread.js");
Object.defineProperty(exports, "objectSpread", { enumerable: true, get: function () { return spread_js_1.objectSpread; } });
var values_js_1 = require("./values.js");
Object.defineProperty(exports, "objectValues", { enumerable: true, get: function () { return values_js_1.objectValues; } });
+5
View File
@@ -0,0 +1,5 @@
/**
* @name objectKeys
* @summary A version of Object.keys that is typed for TS
*/
export declare function objectKeys<T extends object, K extends Extract<keyof T, string>>(value: T): K[];
+10
View File
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.objectKeys = objectKeys;
/**
* @name objectKeys
* @summary A version of Object.keys that is typed for TS
*/
function objectKeys(value) {
return Object.keys(value);
}
+10
View File
@@ -0,0 +1,10 @@
/**
* @name objectProperty
* @summary Assign a get property on the input object
*/
export declare function objectProperty<S>(that: object, key: string, getter: (key: string, index: number, self: S) => unknown, getName?: (key: string, index: number) => string, index?: number): void;
/**
* @name objectProperties
* @summary Assign get properties on the input object
*/
export declare function objectProperties<S>(that: object, keys: string[], getter: (key: string, index: number, self: S) => unknown, getName?: (key: string, index: number) => string): void;
+38
View File
@@ -0,0 +1,38 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.objectProperty = objectProperty;
exports.objectProperties = objectProperties;
/**
* @name objectProperty
* @summary Assign a get property on the input object
*/
function objectProperty(that, key, getter, getName, index = 0) {
const name = getName
? getName(key, index)
: key;
// There are 3 approaches here -
// - Object.prototype.hasOwnProperty.call(that, key) - this only checks the current class, i.e
// will retuirn false if the property is set in the parent class
// - isUndefined(...) - this may yield a false positive when the property is there, but not set.
// Additionally, on pre-defined getters it may make a call
// - key in that - Does not need to be combined with either of the above and checks the full chain
if (!(name in that)) {
Object.defineProperty(that, name, {
enumerable: true,
// Unlike in lazy, we always call into the upper function, i.e. this method
// does not cache old values (it is expected to be used for dynamic values)
get: function () {
return getter(key, index, this);
}
});
}
}
/**
* @name objectProperties
* @summary Assign get properties on the input object
*/
function objectProperties(that, keys, getter, getName) {
for (let i = 0, count = keys.length; i < count; i++) {
objectProperty(that, keys[i], getter, getName, i);
}
}
+6
View File
@@ -0,0 +1,6 @@
/**
* @name objectSpread
* @summary Concats all sources into the destination
* @description Spreads object properties while maintaining object integrity
*/
export declare function objectSpread<T extends object>(dest: object, ...sources: (object | undefined | null)[]): T;
+34
View File
@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.objectSpread = objectSpread;
/**
* @name objectSpread
* @summary Concats all sources into the destination
* @description Spreads object properties while maintaining object integrity
*/
function objectSpread(dest, ...sources) {
const filterProps = new Set(['__proto__', 'constructor', 'prototype']);
for (let i = 0, count = sources.length; i < count; i++) {
const src = sources[i];
if (src) {
if (typeof src.entries === 'function') {
for (const [key, value] of src.entries()) {
if (!filterProps.has(key)) {
dest[key] = value;
}
}
}
else {
// Create a clean copy of the source object
const sanitizedSrc = Object.create(null);
for (const [key, value] of Object.entries(src)) {
if (!filterProps.has(key)) {
sanitizedSrc[key] = value;
}
}
Object.assign(dest, sanitizedSrc);
}
}
}
return dest;
}
+5
View File
@@ -0,0 +1,5 @@
/**
* @name objectValues
* @summary A version of Object.values that is typed for TS
*/
export declare function objectValues<T extends object>(obj: T): T[keyof T][];
+10
View File
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.objectValues = objectValues;
/**
* @name objectValues
* @summary A version of Object.values that is typed for TS
*/
function objectValues(obj) {
return Object.values(obj);
}