Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Part of lucidity project.
Beta software. Until 1.0, API subject to change.
lucy.forge is a minimal 'game' or 'feature composition' engine. It's goal is to foster clean and reusable Javascript code through the extensive use of mixins and conventions.
npm install lucy-forge --save
const forge = require ( 'lucy-forge' )
// Define a component
// for auto-loading, the path for this component should be 'Person.js'
const Person = forge.Component
( 'Person'
// Class methods
, { // Setup an entity. 'e' is the entity being initialized.
setup ( e )
{ e._person = {}
Person.people.push ( e )
e.bind
( 'destroy'
, function ()
{ Person.peopleCount --
}
)
}
// This is called once on Component creation. It is used to initialize
// the component (not an entity). 'this' is the component aka 'class'.
// Here, this === Person.
, init ()
{ this.peopleCount = 0
}
, count ()
{ return this.peopleCount
}
}
// Methods
, { person ( name, age )
{ let self = this._person
self.name = name
self.age = age
}
}
)
// Use the component
let Person = forge.findComponent ( 'Person' )
console.log
( Person.count () ) // ==> 0
let player1 = forge.Entity
( 'Person'
, 'Score'
// #set shortcut
// same as calling player1.person ( 'John Difool', 34 )
// player1.score ( 100 )
, { person: [ 'John Difool', 34 ]
, score: 100
}
)
console.log
( Person.count () ) // ==> 1
npm test
Please use 'jessy style'.
Add unit tests for any new or changed functionality.
FAQs
Entity and component definition tool
The npm package lucy-forge receives a total of 0 weekly downloads. As such, lucy-forge popularity was classified as not popular.
We found that lucy-forge 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.