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

geni

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

geni

geni is a script generator based in templates and json data.

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Geni

Codeship Status for armand1m/geni

Generator based in templates and json data.

Geni Sample

Usage

Programatic:

npm install geni --save

Example


const Geni = require('geni');
var geni = new Geni();

// using files
var options = {
  result: "./results/result.txt",
  template: {
    isPath: true,
    body: "./template/template.txt"
  },
  data: "./data/data.json"
};

// generates ./results/result.txt
geni.generate(options);

// as objects
var options = {
  template: {
    isPath: false,
    body: "my data @@key"
  },
  data: [
    { key: "123" },
    { key: "321" },
  ]
};

// returns : "my data 123\nmy data 321"
var result = geni.generate(options);
  • template.txt
key: @@key
  • data.json
[
  { "key": "value1" },
  { "key": "value2" },
  { "key": "value3" }
]

then run:

node my-generator.js
  • result.txt
key: value1
key: value2
key: value3

FAQs

Package last updated on 05 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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