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

generify

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

generify - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

test/fixtures/binary-file/logo.png

22

generify.js

@@ -12,2 +12,3 @@ #!/usr/bin/env node

const os = require('os')
const isBinaryFile = require('isbinaryfile')

@@ -59,7 +60,18 @@ module.exports = generify

function copyAndReplace (source, dest) {
pump(
fs.createReadStream(source),
split(replaceLine),
fs.createWriteStream(dest),
complete)
isBinaryFile(source, function (err, isBinary) {
if (err) return complete(err)
if (isBinary) {
pump(
fs.createReadStream(source),
fs.createWriteStream(dest),
complete)
} else {
pump(
fs.createReadStream(source),
split(replaceLine),
fs.createWriteStream(dest),
complete)
}
})
}

@@ -66,0 +78,0 @@

{
"name": "generify",
"version": "3.0.2",
"version": "3.0.3",
"description": "A reusable project generator",

@@ -30,8 +30,9 @@ "main": "generify.js",

"pre-commit": "^1.2.2",
"rimraf": "^2.2.8",
"snazzy": "^7.1.1",
"standard": "^11.0.0",
"tap": "^12.0.0"
"rimraf": "^2.6.3",
"snazzy": "^8.0.0",
"standard": "^12.0.1",
"tap": "^12.5.3"
},
"dependencies": {
"isbinaryfile": "^3.0.2",
"mkdirp": "^0.5.0",

@@ -38,0 +39,0 @@ "pump": "^3.0.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