![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@rustable/utils
Advanced tools
Utility TypeScript utilities inspired by Rust, providing type-safe implementations of HashMap, TypeId, deep cloning, hashing, and equality comparison
This is the utilities package of the Rustable project, providing fundamental utilities and type management functionalities. The package implements essential features like type identification, object cloning, hashing, and string manipulation.
npm install @rustable/utils
# or
yarn add @rustable/utils
# or
pnpm add @rustable/utils
type_id.ts
)stringify.ts
)hash.ts
)clone.ts
)eq.ts
)Import the required utilities from the package:
import { typeId, clone, hash, stringify } from '@rustable/utils';
class MyClass {}
const id = typeId(MyClass); // Get type ID for class
// With generic parameters
class Container<T> {}
const stringContainerId = typeId(Container, [String]);
import { deepCopy } from '@rustable/utils';
// Cloning simple objects
const original = { name: 'John', age: 30 };
const clone = deepCopy(original);
// Cloning complex objects with circular references
const complexObj = {
data: [1, 2, 3],
date: new Date(),
};
complexObj.self = complexObj; // circular reference
const cloned = deepCopy(complexObj);
import { hash } from '@rustable/utils';
// Hash simple values
const numberHash = hash(42);
const stringHash = hash('Hello World');
// Hash objects
const objectHash = hash({ x: 1, y: 2 });
const arrayHash = hash([1, 2, 3]);
import { equals } from '@rustable/utils';
// Compare simple values
console.log(equals(5, 5)); // true
console.log(equals('hello', 'hello')); // true
// Compare objects
const obj1 = { x: 1, y: [1, 2, 3] };
const obj2 = { x: 1, y: [1, 2, 3] };
console.log(equals(obj1, obj2)); // true
MIT © illuxiza
FAQs
Essential utilities for object cloning, string manipulation, and value comparison in TypeScript, inspired by Rust's standard library.
The npm package @rustable/utils receives a total of 0 weekly downloads. As such, @rustable/utils popularity was classified as not popular.
We found that @rustable/utils demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.