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.
game-of-life-es6
Advanced tools
ES6 JavaScript algorithm implementation.
You can install Game of life using npm:
npm install -g game-of-life-es6
var GameOfLife = require('game-of-life-es6'),
world = new GameOfLife.World(1, 1);
<script src="dist/bundle.js"></script>
<script>
var world = new GameOfLife.World(1, 1);
</script>
Please check API Documentation for more details.
The universe of the Game of Life is an infinite two-dimensional orthogonal grid of square cells, each of which is in one of two possible states, alive or dead. Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:
The initial pattern constitutes the seed of the system. The first generation is created by applying the above rules simultaneously to every cell in the seed—births and deaths occur simultaneously, and the discrete moment at which this happens is sometimes called a tick (in other words, each generation is a pure function of the preceding one). The rules continue to be applied repeatedly to create further generations.
According to Kent Back four rules for a simple system are in order (most important first):
SOLID principles:
A class (component) should have one, and only one, reason to change
.A system should be open for extension, but closed for modification
.Derived types should be substitutable for their base types
.Abstractions should not depend upon details. Details should depend upon abstractions
.Interfaces should be small, focused on a specific use case
.The DRY (Don't Repeat Yourself) Principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
grunt dependencies
- helps to update package.json filegrunt spec
- lints the code and runs unit testsgrunt build
- lints the code, runs unit tests, creates dist/bundle.js
transformed ES5 codegrunt
- runs grunt build
FAQs
Conway's Game of life - ES6 JavaScript algorithm implementation
The npm package game-of-life-es6 receives a total of 7 weekly downloads. As such, game-of-life-es6 popularity was classified as not popular.
We found that game-of-life-es6 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.