Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
ember-deep-set
Advanced tools
ember-deep-set
is a simple utility function to deeply set a value on an Ember Object or POJO. Note that this mutates the object.
To install:
ember install ember-deep-set
Ember.set
will throw an error if you try to set a value on a non-existent object. For example:
Ember.set({}, 'foo.bar.baz', 123); // Property set failed: object in path "foo.bar" could not be found or was destroyed.
With ember-deep-set
, you can safely and deeply set values on POJOs as well as Ember.Objects without having to first create the empty intermediate objects.
import Ember from 'ember';
import deepSet from 'ember-deep-set';
const { get } = Ember;
let company = {};
deepSet(company, 'region.department.director.name', 'Jim Bob');
deepSet(company, 'region.department.name', 'Accounting');
deepSet(company, 'region.name', 'North America');
get(company, 'region.department.name'); // "Accounting"
get(company, 'region.department.director'); // { name: "Jim Bob" }
deepSet
is designed to be a drop-in replacement to Ember.set
:
deepSet( object, key, value )
object
: {Ember.Object|Object}
The object to set values onkey
: {String}
The key to setvalue
: {Any}
Value to setvalue
: {Any}
Value that was passed ingit clone <repository-url>
this repositorycd ember-deep-set
npm install
bower install
ember serve
npm test
(Runs ember try:each
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
For more information on using ember-cli, visit https://ember-cli.com/.
FAQs
Deeply set values on an Ember Object or POJO
The npm package ember-deep-set receives a total of 12,588 weekly downloads. As such, ember-deep-set popularity was classified as popular.
We found that ember-deep-set demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.