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

daily-rotating-file-stream

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

daily-rotating-file-stream - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

4

lib/DailyRotatingFileStream.js

@@ -40,2 +40,6 @@ 'use strict'

flush () {
this[stream].flush()
}
destroy () {

@@ -42,0 +46,0 @@ this[stream].destroy()

2

package.json
{
"name": "daily-rotating-file-stream",
"version": "1.0.0",
"version": "1.1.0",
"description": "file stream being rotating daily",

@@ -5,0 +5,0 @@ "main": "lib/DailyRotatingFileStream.js",

@@ -5,3 +5,3 @@ # daily-rotating-file-stream

[![Coverage Status](https://coveralls.io/repos/github/SerayaEryn/daily-rotating-file-stream/badge.svg?branch=master)](https://coveralls.io/github/SerayaEryn/daily-rotating-file-stream?branch=master)
[![NPM version](https://img.shields.io/npm/v/daily-rotating-file-stream.svg?style=flat)](https://www.npmjs.com/package/daily-rotating-file-stream) [![Greenkeeper badge](https://badges.greenkeeper.io/SerayaEryn/daily-rotating-file-stream.svg)](https://greenkeeper.io/)
[![NPM version](https://img.shields.io/npm/v/daily-rotating-file-stream.svg?style=flat)](https://www.npmjs.com/package/daily-rotating-file-stream)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

@@ -36,2 +36,6 @@

## DailyRotatingFileStream#flush()
Flushes the content of the buffer to the file.
## DailyRotatingFileStream#destroy()

@@ -38,0 +42,0 @@

@@ -139,2 +139,22 @@ 'use strict'

test('Should flush', (t) => {
t.plan(2)
const options = {
fileName: join(__dirname, '/testfiles5/console%DATE%.log')
}
const fileName = getFileName(5)
const stream = new DailyRotatingFileStream(options)
stream.write('hello world')
stream.flush()
stream.on('finish', () => {
fs.readFile(fileName, (err, buffer) => {
t.error(err)
t.strictEquals(buffer.toString(), 'hello world')
cleanUp(fileName)
})
})
stream.end()
})
function cleanUp (fileName) {

@@ -141,0 +161,0 @@ if (fs.existsSync(fileName)) {

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