Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Omm maps between rich objects and documents.
Load rich objects instead of documents from a collection
Describe the object graph through annotation-style function calls
Declare meteor methods through annotations-style function calls
Perform collection altering operations anywhere on the object graph
Strengthens encapsulation of objects by removing persistence logic from the domain logic
Atomicity over complex operations within one document
Garden = function Garden( name, id ){
this._id = id;
this.name = name;
this.plants = [];
this.harvested = 0;
};
// declares Garden as an Entity
omm.addEntity(Garden);
// declares that the property "plants" contains objects of the type "Plant"
omm.arrayType(Garden, "plants", "Plant");
Garden.prototype.addPlant = function( t ){
this.plants.push( new Plant( t, this ) );
};
omm.collectionUpdate( Garden, "addPlant" );
Garden.prototype.growPlants = function(){
this.plants.forEach( function(p){
p.grow();
});
};
omm.collectionUpdate( Garden, "growPlants" );
Plant = function Plant( type, garden ){
//this._id = "id"+garden.plants.length;
this.type = type;
this.height = 1;
this.garden = garden;
};
// declares that Plant is an Entity
omm.addEntity(Plant);
// declares that the property garden contains object of the class "Garden"
omm.type(Plant, "garden", "Garden");
// declares that the value of the property should be stored as a key (string) rather than the actual object
omm.asForeignKey(Plant, "garden");
Plant.prototype.grow = function(){
if( this.height<20 )
this.height++;
if( this.height==10 || this.height==15 ){
this.garden.addPlant(this.type,this.garden);
}
};
Plant.prototype.harvest = function(){
var i = this.garden.plants.indexOf(this);
this.garden.plants.splice(i,1);
this.garden.harvested+=this.height;
};
// declares that the function "harvest" should also be invoked on the object in the collection.
omm.collectionUpdate( Plant, "harvest");
MIT
FAQs
Omm maps between rich objects and documents.
The npm package o-m-m receives a total of 1 weekly downloads. As such, o-m-m popularity was classified as not popular.
We found that o-m-m demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.