
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
Utility functions for JavaScript values and objects
type SystemObj = Object;
declare namespace X {
type Mapper = (value: any, key: any) => any;
type Predicate = (value: any, key: any) => boolean;
type Accumulator<T> = (accumulatedValue: T, currentValue: T, key: any) => T;
class Object implements SystemObj {
constructor(obj: SystemObj | any[]);
put(key: any, value: any): Object;
remove(key: any): Object;
toObject(): SystemObj;
toArray(): any[]; // makeArray if
count(): number;
select(func?: Mapper): Object;
where(func?: Predicate): Object;
accumulate<T>(initial: T, accum?: Accumulator<T>): T;
/**
* Performs the specified action for each element in an array.
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
*/
forEach(func: (value: any, index: number) => void): void;
distinct(): Object;
union(obj: SystemObj): Object;
/**
* Determines whether all the members of an array satisfy the specified test.
* @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
*/
all(func?: Predicate): boolean;
/**
* Determines whether the specified callback function returns true for any element of an array.
* @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
*/
any(func?: Predicate): boolean;
/**
* Determines whether an array includes a certain element, returning true or false as appropriate.
* @param searchElement The element to search for.
* @param fromIndex The position in this array at which to begin searching for searchElement.
*/
contains(obj: any): boolean;
toCase(_case: "camel" | "snake" | "slug" | "pascal", depth?: number): Object;
stripKeys(keys?: string | any[]): Object;
stringify(maxDepth?: number, format?: boolean): string;
// JSON stringify and base64 encode
encode(): string;
static encode(val: any): string
// base64 decode and JSON parse
static decode(val: string): Object;
/** Returns a string representation of an object. */
toString(): string;
/** Returns a date converted to a string using the current locale. */
toLocaleString(): string;
/** Returns the primitive value of the specified object. */
valueOf(): Object;
/**
* Determines whether an object has a property with the specified name.
* @param v A property name.
*/
hasOwnProperty(v: string): boolean;
/**
* Determines whether an object exists in another object's prototype chain.
* @param v Another object whose prototype chain is to be checked.
*/
isPrototypeOf(v: Object): boolean;
/**
* Determines whether a specified property is enumerable.
* @param v A property name.
*/
propertyIsEnumerable(v: string): boolean;
}
}
FAQs
Utility functions for JavaScript values and objects
We found that object-x demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.