New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@peerbit/logger

Package Overview
Dependencies
Maintainers
0
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peerbit/logger - npm Package Compare versions

Comparing version

to
1.0.3-5652381

dist/src/index.d.ts

93

package.json
{
"name": "@peerbit/logger",
"version": "1.0.2",
"description": "Logging utils",
"type": "module",
"sideEffects": false,
"module": "lib/esm/index.js",
"types": "lib/esm/index.d.ts",
"exports": {
"import": "./lib/esm/index.js"
},
"files": [
"lib",
"src",
"!src/**/__tests__",
"!lib/**/__tests__",
"LICENSE"
],
"publishConfig": {
"access": "public"
},
"dependencies": {
"pino": "^8.14.1"
},
"scripts": {
"clean": "shx rm -rf lib/*",
"build": "yarn clean && tsc -p tsconfig.json",
"test": "node ../../../node_modules/.bin/jest test -c ../../../jest.config.ts --runInBand --forceExit",
"test:unit": "node ../../../node_modules/.bin/jest test -c ../../../jest.config.unit.ts --runInBand --forceExit",
"test:integration": "node ../node_modules/.bin/jest test -c ../../../jest.config.integration.ts --runInBand --forceExit"
},
"author": "dao.xyz",
"license": "MIT",
"gitHead": "c48cb37d237a25b0bcc849482b43f6941d53e3d5"
"name": "@peerbit/logger",
"version": "1.0.3-5652381",
"description": "Logging utils",
"sideEffects": false,
"type": "module",
"types": "./dist/src/index.d.ts",
"typesVersions": {
"*": {
"*": [
"*",
"dist/*",
"dist/src/*",
"dist/src/*/index"
],
"src/*": [
"*",
"dist/*",
"dist/src/*",
"dist/src/*/index"
]
}
},
"files": [
"src",
"dist",
"!dist/test",
"!**/*.tsbuildinfo"
],
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/src/index.js"
}
},
"eslintConfig": {
"extends": "peerbit",
"parserOptions": {
"project": true,
"sourceType": "module"
},
"ignorePatterns": [
"!.aegir.js",
"test/ts-use",
"*.d.ts"
]
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"pino": "^8.14.1"
},
"scripts": {
"clean": "aegir clean",
"build": "aegir build --no-bundle",
"test": "aegir test --target node",
"lint": "aegir lint"
},
"author": "dao.xyz",
"license": "MIT"
}

@@ -5,3 +5,3 @@ import pino from "pino";

export const getEnv = (key) => {
export const getEnv = (key: any) => {
if (isNode) {

@@ -20,3 +20,3 @@ // node

const levels = ["fatal", "error", "warn", "info", "debug", "trace"];
if (levels.indexOf(level) === -1) {
if (!levels.includes(level)) {
throw new Error(

@@ -26,3 +26,3 @@ "Unexpected LOG_LEVEL: " +

". Expecting one of: " +
JSON.stringify(levels)
JSON.stringify(levels),
);

@@ -29,0 +29,0 @@ }