npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@igorskyflyer/odin

v2.0.0

Published

🔱 Odin is an Object wrapper that allows you to create objects and set their attributes - all at once! 🔺

Downloads

13

Readme

📃 Table of Contents

🤖 Features

  • ⚡ Fast merge - Assigns all source props to target in one go
  • 🛡 Type‑safe - Leverages TS generics for compile‑time checks
  • 🧩 Shallow copy - Efficiently copies only top‑level properties
  • 🔄 In‑place update - Mutates and returns the target object
  • 📝 Clear signature - Simple, predictable API
  • 📦 Zero dependencies - Pure TypeScript, no extras
  • 🌍 Cross‑platform - Works in browser and Node.js
  • 🧠 Safe defaults - Handles missing or invalid inputs gracefully

🕵🏼 Usage

Install it by executing any of the following, depending on your preferred package manager:

pnpm add @igorskyflyer/odin
yarn add @igorskyflyer/odin
npm i @igorskyflyer/odin

🤹🏼 API

odin(target: object, source: object): object

Assigns all properties of the source object to the target object.

target: object - the target object to copy properties to,

source: object - the source object to copy properties from.

Returns the target object.

If the target object is not provided and empty object is returned.

If the source object is not provided the target object is returned unchanged.

ℹ️ NOTE

Shallow vs deep copy

This function uses the method of shallow copying of the source object, for deep/true copied objects consider using clone.js.

For more info, see, shallow copy vs deep copy.

🗒️ Examples

import { odin } from '@igorskyflyer/odin'

const cloned: object = odin({ a: 1, b: 2 }, { c: 3 }) // returns { a: 1, b: 2, c: 3 }

📝 Changelog

📑 The changelog is available here, CHANGELOG.md.

🪪 License

Licensed under the MIT license which is available here, MIT license.

💖 Support

🧬 Related

@igorskyflyer/common-color

🎨 Provides common Color-related TypeScript types. 🌈

@igorskyflyer/magic-queryselector

🪄 A TypeScript-types patch for querySelector/querySelectorAll, make them return types you expect them to! 🔮

@igorskyflyer/upath

🎍 Provides a universal way of formatting file-paths in Unix-like and Windows operating systems as an alternative to the built-in path.normalize(). 🧬

@igorskyflyer/strip-yaml-front-matter

🦓 Strips YAML front matter from a String or a file. 👾

@igorskyflyer/registry-apppaths

🪀 A Node.js module for reading the AppPaths registry key on Windows. Useful for retrieving applications that can be launched from the command prompt. 🗃

👨🏻‍💻 Author

Created by Igor Dimitrijević (@igorskyflyer).