1.1.0 • Published 4 months ago

@solidso/inspection v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

solid-inspection

NPM Version npm.io

Dev mode, frontend logging library for solid.js

A small logging utility for frontend development in solid.js. It prints nothing in non-dev environments and functions get eliminated during bundling for non-dev environments.

Screenshot of the library in action

Usage

Install:

pnpm add @solidso/inspection

Import the relevant logging method:

import { info, debug, warn, error } from '@solidso/inspection'

debug('The identifier is 1')
info('Loaded local storage.')
error(new Error('Failed to fetch data.'))
warn({ msg: 'This is a warning.' })

These functions won't produce any output based on the following condition:

import { DEV } from 'solid-js'
import { isServer } from 'solid-js/web'

const isActive = (DEV && !isServer) || import.meta.env['VITE_SOLID_INSPECTION']

Contributing

If you're interested in contributing, read the CONTRIBUTING.md first, please.


Thanks for the attention 💙 Any amount of support on patreon or github will return you back as bug fixes, new features and bits and bytes.

1.1.0

4 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago