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

create-duck

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-duck - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

src/util.js

2

package.json
{
"name": "create-duck",
"version": "0.2.1",
"version": "0.2.2",
"description": "CLI script for creating Redux ducks",

@@ -5,0 +5,0 @@ "main": "./src/create-duck.js",

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

#!/usr/bin/env node
#!/usr/bin/env nodejs

@@ -7,2 +7,3 @@ const prompt = require("prompt");

const duckTemplate = require("./duck.template");
const generateDuckNames = require("./util").generateDuckNames;

@@ -12,3 +13,3 @@ const schema = {

name: {
description: 'Duck name',
description: 'Duck name (kebab-case)',
type: 'string',

@@ -28,5 +29,6 @@ message: 'Duck name is required',

const { name } = result;
const duckNames = generateDuckNames(name);
const filename = path.resolve(name + ".js");
fs.writeSync(fs.openSync(filename, "w"), duckTemplate(name));
fs.writeSync(fs.openSync(filename, "w"), duckTemplate(duckNames));
console.log(`Created ${name} duck`);
});
});

@@ -1,5 +0,5 @@

module.exports = (duckName) => {
const name = duckName.toLowerCase();
const NAME = duckName.toUpperCase();
const Name = duckName[0].toUpperCase() + name.substr(1);
module.exports = (names) => {
var name = names.name,
Name = names.Name,
NAME = names.NAME;
return (

@@ -43,3 +43,3 @@ `import { createLogic } from 'redux-logic';

*/
const initialState = {};

@@ -103,2 +103,2 @@

);
};
};
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