Socket
Socket
Sign inDemoInstall

console-locale-timestamp

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-locale-timestamp - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

dist/tsconfig.tsbuildinfo

6

dist/ConsoleLocaleTimestamp.d.ts

@@ -8,3 +8,3 @@ /**

*
* @version 1.0.4
* @version 1.0.8
*/

@@ -15,7 +15,7 @@ export default class ConsoleLocaleTimestamp {

* @param {string} locales - The specified value will be used as the first argument of `Date.prototype.toLocaleTimeString()`. (e.g. 'en-US' => '12:00:00 AM', 'ja-JP' => '0:00:00' )
* @param {object} options - The specified value will be used as the second argument of `Date.prototype.toLocaleTimeString()`. (e.g. { minute: '2-digit', second: '2-digit' } => '00:00')
* @param {Intl.DateTimeFormatOptions} options - The specified value will be used as the second argument of `Date.prototype.toLocaleTimeString()`. (e.g. { minute: '2-digit', second: '2-digit' } => '00:00')
* @param {string[]} quote - The characters that surround the timestamp. If you omit the second value, the same characters as the first are applied. (e.g. [''] => '0:00:00' , ['[', ']'] => '[0:00:00]' )
* @param {string} separator - Delimiter between the timestamp and the message that follows. (e.g. ' - ' => '0:00:00 - Log message.' )
*/
constructor(locales?: string, options?: object, quote?: string[], separator?: string);
constructor(locales?: string, options?: Intl.DateTimeFormatOptions, quote?: string[], separator?: string);
/**

@@ -22,0 +22,0 @@ * Print a timestamp to the console.

@@ -8,3 +8,3 @@ /**

*
* @version 1.0.4
* @version 1.0.8
*/

@@ -14,3 +14,3 @@ export default class ConsoleLocaleTimestamp {

* @param {string} locales - The specified value will be used as the first argument of `Date.prototype.toLocaleTimeString()`. (e.g. 'en-US' => '12:00:00 AM', 'ja-JP' => '0:00:00' )
* @param {object} options - The specified value will be used as the second argument of `Date.prototype.toLocaleTimeString()`. (e.g. { minute: '2-digit', second: '2-digit' } => '00:00')
* @param {Intl.DateTimeFormatOptions} options - The specified value will be used as the second argument of `Date.prototype.toLocaleTimeString()`. (e.g. { minute: '2-digit', second: '2-digit' } => '00:00')
* @param {string[]} quote - The characters that surround the timestamp. If you omit the second value, the same characters as the first are applied. (e.g. [''] => '0:00:00' , ['[', ']'] => '[0:00:00]' )

@@ -27,3 +27,3 @@ * @param {string} separator - Delimiter between the timestamp and the message that follows. (e.g. ' - ' => '0:00:00 - Log message.' )

if (Object.prototype.toString.call(locales) !== '[object String]') {
throw new Error('The argument `locales` must be an String.');
throw new TypeError('The argument `locales` must be an String.');
}

@@ -34,3 +34,3 @@ this.#locales = locales;

if (Object.prototype.toString.call(options) !== '[object Object]') {
throw new Error('The argument `options` must be an Object.');
throw new TypeError('The argument `options` must be an Object.');
}

@@ -41,9 +41,9 @@ this.#options = options;

if (Object.prototype.toString.call(quote) !== '[object Array]') {
throw new Error('The argument `quote` must be an Array.');
throw new TypeError('The argument `quote` must be an Array.');
}
else if (quote.length < 1 || quote.length > 2) {
throw new Error('The argument `quote` must be an Array of length 1 or 2.');
throw new RangeError('The argument `quote` must be an Array of length 1 or 2.');
}
else if (!quote.every((val) => Object.prototype.toString.call(val) === '[object String]')) {
throw new Error('The contents of the Array of arguments `quote` must be a String.');
throw new TypeError('The contents of the Array of arguments `quote` must be a String.');
}

@@ -55,3 +55,3 @@ this.#openQuote = quote[0];

if (Object.prototype.toString.call(separator) !== '[object String]') {
throw new Error('The argument `separator` must be an String.');
throw new TypeError('The argument `separator` must be an String.');
}

@@ -58,0 +58,0 @@ this.#separator = separator;

{
"name": "console-locale-timestamp",
"version": "1.0.7",
"version": "1.0.8",
"description": "Provides a console debugging facilities with a timestamp. Timestamps are written using Date.prototype.toLocaleTimeString().",
"keywords": [
"console"
],
"homepage": "https://github.com/SaekiTominaga/console-locale-timestamp#readme",
"bugs": {
"url": "https://github.com/SaekiTominaga/console-locale-timestamp/issues"
},
"license": "MIT",
"author": "Saeki Tominaga",
"files": [
"dist"
],
"type": "module",
"devDependencies": {
"@types/node": "^14.14.19",
"@typescript-eslint/eslint-plugin": "^4.11.1",
"@typescript-eslint/parser": "^4.11.1",
"eslint": "^7.17.0",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-jsdoc": "^30.7.9",
"typescript": "^4.1.3"
},
"main": "dist/ConsoleLocaleTimestamp.js",
"module": "dist/ConsoleLocaleTimestamp.js",
"types": "dist/ConsoleLocaleTimestamp.d.ts",
"scripts": {
"build": "tsc -w"
},
"repository": {

@@ -24,11 +24,15 @@ "type": "git",

},
"keywords": [
"console"
],
"author": "Saeki Tominaga",
"license": "MIT",
"bugs": {
"url": "https://github.com/SaekiTominaga/console-locale-timestamp/issues"
"scripts": {
"build": "tsc -w",
"test": "node test.js"
},
"homepage": "https://github.com/SaekiTominaga/console-locale-timestamp#readme",
"devDependencies": {
"@types/node": "^14.14.20",
"@typescript-eslint/eslint-plugin": "^4.13.0",
"@typescript-eslint/parser": "^4.13.0",
"eslint": "^7.17.0",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-jsdoc": "^30.7.13",
"typescript": "^4.1.3"
},
"publishConfig": {

@@ -35,0 +39,0 @@ "access": "public"

Sorry, the diff of this file is not supported yet

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