Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@progfay/playground

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@progfay/playground

Framework to tasting something with Node.js 😋

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@progfay/playground

Framework to tasting something with Node.js 😋

Features

  • Display playground result in hierarchical structure
  • Grouping some playground functions
  • Support async function
  • Provide same API as Console Object
  • Keep color highlighting of log

Syntax

play((group, run) => {
  group('grouping', (group, run) => {
    run('execute playground', console => {
      console.log('yummy 😋')
    })

    run('async function', async console => {
      console.log('sleep start')
      await sleep(1000)
      console.log('sleep end')
    })

    run('keep coloring', async console => {
      console.log(new Date('2020-01-01'))
    })
  })
})

Image from Gyazo

API

play(nest, opts): void

  • Start playgrounds
  • No support for multiple play function call
  • Exported type: play: Play
nest: (group, run) => void
  • Exported type: nest: Nest
group: (name, nest) => void
  • Group some playgrounds or sub-groups
  • Exported type: group: Group
name: string
  • Name of group which is groupd
nest: Nest
  • nest behaves like first argument of play
run: (name, func) => void
  • Name of single playground function
  • Exported type: run: Run
func: (console) => void
  • Single playground function
  • First argument console is Console Object
  • Exported type: func: Func

Keywords

FAQs

Package last updated on 10 Aug 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc