
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Specification pattern library written in typescript.
import { createSpec } from 'spoeck';
const dragon = {
color: 'blue',
element: 'ice',
age: 1000,
};
const dragonIsBlue = createSpec({
name: 'dragonIsBlue',
desc: 'Dragon is blue',
isSatisfiedBy: (dragon: Dragon) => dragon.color === 'blue'
});
const result = dragonIsBlue.isSatisfiedBy(dragon);
const result.value // => true
The specification isSatisifiedBy function will always return an object with these properties.
name: Is the name of the specification.desc: Is the description of the specification.value: Is the boolean that indicate if the specification is respected.details: Is the list of all sub specifications results.// With a simple rule :
const result ={
name: 'dragonIsBlue',
desc: 'Dragon is blue',
value: true,
details: [
{ name: 'dragonIsBlue', desc: 'Dragon is blue', value: true },
],
};
// With a composite rule :
const dragonIsBlueIceYoung = dragonIsBlue
.and(dragonIsIce, 'dragonIsBlueIce')
.and(dragonIsYoung, 'dragonIsBlueIceYoung');
const compositeRuleResult = {
name: 'dragonIsBlueIceYoung',
desc: 'Dragon is blue AND (Dragon is ice) AND (NOT (Dragon is old))',
value: false,
details: [
{ name: 'dragonIsBlue', desc: 'Dragon is blue', value: true },
{ name: 'dragonIsIce', desc: 'Dragon is ice', value: true },
{ name: 'dragonIsYoung', desc: 'NOT (Dragon is old)', value: false },
],
}
import { createSpec } from 'spoeck';
const dragon = {
color: 'blue',
element: 'ice',
age: 1000,
};
const dragonIsBlue = createSpec({
name: 'dragonIsBlue',
desc: 'Dragon is blue',
isSatisfiedBy: (dragon: Dragon) => entity.color === 'blue'
});
const dragonIsIce = createSpec({
name: 'dragonIsIce',
desc: 'Dragon is ice',
isSatisfiedBy: (dragon: Dragon) => entity.element === 'ice'
});
const dragonIsBlueANDIce = dragonIsBlue.and(dragonIsIce, 'dragonIsBlueANDIce');
const result = dragonIsBlueANDIce.isSatisfiedBy(dragon);
result.value; // => true
const dragonIsBlueORIce = dragonIsBlue.or(dragonIsIce, 'dragonIsBlueORIce');
const result = dragonIsBlueORIce.isSatisfiedBy(dragon);
result.value; // => true
const dragonIsBlueXORIce = dragonIsBlue.xor(dragonIsIce, 'dragonIsBlueXORIce');
const result = dragonIsBlueXORIce.isSatisfiedBy(dragon);
result.value; // => false
const dragonIsBlueAndNotIce = dragonIsBlue.and(dragonIsIce.not('dragonIsNotIce'), 'dragonIsBlueAndNotIce');
const result = dragonIsBlueAndNotIce.isSatisfiedBy(dragon);
result.value; // => false
FAQs
Specification pattern implementation
We found that spoeck 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.