Git Product home page Git Product logo

create-value's Introduction

demo

create-value

スクリーンショット 2023-03-23 15 05 57

create-value

本プログラムを使うと、手軽に
・配列
・オブジェクト(rubyではハッシュとしても使えます)
を作成する事が出来ます。

プログラミングの学習で「サクッと」データが欲しい時があると思います。

その際にご使用ください。

また、オプションを利用する際は、-a -r -o -hのみを指定してご利用下さい。

Installation

npmを使用してインストールします。

npm install -g create-value

Usage

ご利用の際は、オプションを付ける場合は、-a -r -o -hどちらかを指定してご利用下さい。

# オプションなしで使用すると、よく使うであろうデータが表示されます。
❯ cv index.js
[ 'hoge', 'fuga', 'foo', 'piyo', 'bar' ] 

[ 1, 2, 3, 4, 5 ] 

[ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ] 

{ name: 'taro', age: 25, hobby: 'game' } 

[ { name: 'taro' }, { name: 'hana' }, { name: 'jiro' } ] 

[
  { name: 'taro', age: 25 },
  { name: 'hana', age: 18 },
  { name: 'jiro', age: 42 }
]

# -a : 配列を作成します。オプションの引数はスペース区切りで渡してください
❯ cv -a neko inu salu 
[ 'neko', 'inu', 'salu' ]

# -r : 範囲から配列を作成します。オプションは
# 1. [1以上の数値]..[2以上の値]を渡す
# 2. [a以上の値]..[z以下の値]を渡す
# でお願い致します。

❯ cv -r 1..5
[ 1, 2, 3, 4, 5 ]
❯ cv -r a..e 
[ 'a', 'b', 'c', 'd', 'e' ]

# -o : オブジェクトを作成します。引数はスペース区切りで渡してください
❯ cv -o neko inu salu 
{ key1: 'neko', key2: 'inu', key3: 'salu' }

create-value's People

Contributors

toke04 avatar

Stargazers

kochi avatar

Watchers

 avatar

create-value's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.