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

@namchee/decora

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@namchee/decora - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4-canary.3.af4835fca9cd0c1c8789968bce33833cfbd510ad.0

src/utils.ts

2

package.json
{
"name": "@namchee/decora",
"version": "1.0.3",
"version": "1.0.4-canary.3.af4835fca9cd0c1c8789968bce33833cfbd510ad.0",
"description": "Useful ECMAScript-compliant decorators to enhance JS (specifically, TypeScript) development experience",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -46,4 +46,3 @@ # Decora

`precision` | `false` | `number, n > 1` | `undefined` | Number of digits after comma. Passing `undefined` will print an abruptly long string.
`stream` | `true` | `NodeJS.WritableStream` | `process.stdout` | Destination for the log to be written to. [Detailed Explanation](https://nodejs.org/api/stream.html#stream_writable_streams)
`stream` | `true` | `NodeJS.WritableStream` | `process.stdout` | Destination for the log to be written to. [Detailed Explanation](https://nodejs.org/api/stream.html#stream_writable_streams). This option is **ONLY** available on NodeJS environment.
## `@timeout`

@@ -50,0 +49,0 @@

@@ -1,3 +0,2 @@

import { Console } from 'console';
import { performance } from 'perf_hooks';
import { isNode, isBrowser } from './utils';

@@ -29,4 +28,25 @@ /**

const logger = new Console({ stdout: stream });
let logger: Console;
let performance: Performance;
if (isNode) { // node environment
const Console = require('console').Console;
logger = new Console({ stdout: stream });
performance = require('perf_hooks').performance;
} else if (isBrowser) { // browser
logger = window.console;
performance = window.performance;
// if stream is somehow defined, ignore it
if (stream) {
logger.warn(
/* eslint-disable-next-line */
'The `stream` option only available on Node.JS environment. This option will be ignored.',
);
}
} else { // do nothing, for now
return;
}
const fn: Function = descriptor.value;

@@ -33,0 +53,0 @@

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