Gathering detailed insights and metrics for simple-fake-console
Gathering detailed insights and metrics for simple-fake-console
Gathering detailed insights and metrics for simple-fake-console
Gathering detailed insights and metrics for simple-fake-console
npm install simple-fake-console
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (93.41%)
JavaScript (6.18%)
Shell (0.41%)
Total Downloads
6,635
Last Day
4
Last Week
4
Last Month
67
Last Year
559
MIT License
10 Stars
1,532 Commits
3 Forks
1 Watchers
46 Branches
4 Contributors
Updated on Jan 30, 2025
Minified
Minified + Gzipped
Latest Version
0.1.8
Package Id
simple-fake-console@0.1.8
Unpacked Size
14.22 kB
Size
3.72 kB
File Count
17
NPM Version
6.14.7
Node Version
14.8.0
Cumulative downloads
Total Downloads
Last Day
100%
4
Compared to previous day
Last Week
-90.9%
4
Compared to previous week
Last Month
11.7%
67
Compared to previous month
Last Year
-60.3%
559
Compared to previous year
2
Create fake consoles for testing purpose
1const { ConsoleInstance, ActionType, getString } = require('simple-fake-console') 2const console = new ConsoleInstance() 3 4console.log('hello', 'world') 5console.info(0, 1, 2, 3) 6console.error(new Error('foo')) 7console.warn('Warning') 8console.clear() 9 10// Get all actions 11// 12// Result: Array< 13// { 14// type: 'log' | 'info' | 'error' | 'warn', 15// data: any[] 16// } | { 17// type: 'clear' 18// } 19// > 20console.getActions() 21 22// Get string from selected types of actions 23// 24// Result: string 25getString({ 26 console, 27 types: [ActionType.Log, ActionType.Info] 28})
1// main.ts 2 3import { Console } from 'simple-fake-console' 4 5export function main (console: Console) { 6 console.log('hello', 'world') 7}
1// test.ts 2 3import assert from 'assert' 4import { ConsoleInstance, ActionType, getString } from 'simple-fake-console' 5import { main } from './main' 6 7const fakeConsole = new ConsoleInstance() 8main(fakeConsole) 9 10assert.deepStrictEqual( 11 fakeConsole.getActions(), 12 [{ 13 type: 'log', 14 data: ['hello', 'world'] 15 }] 16) 17 18assert.strictEqual( 19 getString({ console, types: [ActionType.Log] }), 20 'hello world' 21)
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
Found 0/2 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is archived
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
45 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More