Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
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 5 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.