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

ssf-cli

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssf-cli

Command-line interface for ssf

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

SSF Command-Line Interface

ssf (SpreadSheet Format) is a pure JS library to format data using ECMA-376 spreadsheet format codes (used in popular spreadsheet software packages).

This CLI tool formats numbers from shell scripts and other command-line tools.

Installation

With npm:

$ npm install -g ssf-cli

Usage

ssf-cli takes two arguments: the format string and the value to be formatted.

The value is formatted twice, once interpreting the value as a string and once interpreting the value as a number, and both results are printed to standard output, with a pipe character | after each value:

$ bin/ssf.njs "#,##0.00" 12345
12345|12,345.00|
$ bin/ssf.njs "0;0;0;:@:" 12345
:12345:|12345|

Extracting the values in a pipeline is straightforward with AWK:

$ bin/ssf.njs "#,##0.00" 12345 | awk -F\| '{print $2}'
12,345.00

License

Please consult the attached LICENSE file for details. All rights not explicitly granted by the Apache 2.0 license are reserved by the Original Author.

Credits

Special thanks to Garrett Luu for spinning off the command from the SSF module.

Analytics

Keywords

FAQs

Package last updated on 28 Jun 2020

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