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 🙏

© 2025 – Pkg Stats / Ryan Hefner

object-advanced

v1.1.0

Published

An advanced form of object

Readme

Installations

npm i object-advanced

Introduction

This package exports an modified Object class with various custom features, which can come useful in various cases.

Note: You can still do everything to advanced object like you do with a normal object

Implementations

  • Creating a advanced object

const { default:AdvancedObject } = require('object-advanced');

const yourObject = {
    some:"Cool Object",
    like:["this", "one"]
}
const ob = new AdvancedObject(yourObject);
  • Adding multiple values to object

const a = {
    name: "Shisui Sama",
    age: 49
}, b = {
    alias: "Unknwon",
    somethingElse: ["stuff"]
}

// ob is your advanced object
ob.concat(a,b); // you can provided any number of objects to add to your object
  • Comparing object with other objects

const anotherOB = {
    lol: false
}

ob.isEqual(anotherOB); // returns false, because anotherOB is not equal to ob
  • Convert to String

ob.toString();

// You can add stuff like repalacer, spaces etc like we do in JSON.stringify
  • Getting Values or Keys

ob.keys() // returns a array with all the keys of the object
ob.values() // returns a array with all the values of the object
  • Getting And Setting Values

const ob2 = new AdvancedObject({
    name: {
        first: "Shisui",
        last: "uchiha"
    },
    others: {
        hobby: {
            fake: ["coding", "gaming"],
            real: ["sleeping", "being lazy"]
        }
    }
});

// Normally we can get properties like this
ob2.name.first
// or
ob2["name"]["first"];

// But in advanced we can do somehting like
ob2.get("name.first") ;
// And we can do this too
ob2.get("others.hobby.fake.0"); // 0 refers to the index of the element you want

// Normally we can set properties like this
ob2.name.first = "Kartike";
// or 
ob2["name"]["first"] = "Kartike";

// But in advanced we can do somehting like
ob2.set("name.first", "Kartike") ;
// And we can do this too
ob2.set("others.hobby.fake.0", "Sleeping A LOTT!!"); // 0 refers to the index of the element you want

- Cool stuff about set property

// Adding new values or unfreezing a object
// for-example
const ob3 = new AdvancedObject({
    a: "A",
    b: Object.freeze({
        c:2
    })
});

// if you do something like
ob3.b.c = 32;
// The property won't change and you will even get a error in typescript or in strict mode in javascript

// But in advanced you can do this
ob3.set("b.c", 32, true); // true means force i.e. force the changes

// What if you wanna add new property?
// you can normally do this
ob3.something = {
    a: {
        b: {
            c: 69
        }
    }
}
// but in advnaced you can do
ob3.set("something.a.b.c", 69, true); // ez

Supports

For support or issues or queries contact me on my discord server, If you find any bug create a issue here. You can ask for new features on github too.