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

ember-tracked-nested

v1.0.11

Published

Tracked version of Javascript's built-in array and POJO.

Readme

ember-tracked-nested Build Status

trackedNested objects/arrays are proxied so that any updates to any nested members are notified at the root object which will trigger glimmer's @tracked. The trackedNested object are guaranteed to have the same JSON.stringify output as original object as long as it's just a mixture of POJO, array, and primitives, except for Symbol.

Compatibility

  • Ember.js v3.16 or above
  • Ember CLI v3.16 or above
  • Node.js v10 or above
  • Proxy support

Installation

yarn add ember-tracked-nested
# or
npm install ember-tracked-nested
# or
ember install ember-tracked-nested

Usage

import { trackedNested } from '@glimmer/tracking';

class Foo {
    @trackedNested obj = { bar: 2 };
}

or in a component

import Component from '@glimmer/component';
import { trackedNested } from 'ember-tracked-nested';
import { action } from '@ember/object';

// works with POJO
export default class Foo extends Component {
  @trackedNested obj = { bar: 2 };
  
  @action
  changeObj() {
    this.obj.bar = 10;
  }
}

// works when updating nested array
export default class Foo extends Component {
  @trackedNested obj = [{ bar: 2 }, { bar: 4 }];
  
  @action
  changeObj() {
    this.obj[1].bar = 100;
  }
}

// works with array method
export default class Foo extends Component {
  @trackedNested obj = [{ bar: 2 }, { bar: 4 }];

  @action
  changeObj() {
    this.obj.push({ bar: 6 });
  }
}

// works with POJO with getter
export default class Foo extends Component {
  @trackedNested obj = { bar: 2, get foo() { return this.bar } };

  @action
  changeObj() {
    this.obj.bar = 9;
  }
}

or autotracked via args

class SomeObj {
  @trackedNested obj = { a: 1, b: { c: 2 } };
}
// passing nested tracked the MyComponent
<MyComponent @obj={{this.someObjInstance.obj}} />

// sample my-component.hbs, printing out the nested value
{{@obj.a}}

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.