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

ssf

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssf

pure-JS library to format data using ECMA-376 spreadsheet Format Codes

  • 0.6.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.5M
increased by9.26%
Maintainers
1
Weekly downloads
 
Created

What is ssf?

The ssf npm package is a format library for handling spreadsheet string formats. It allows users to format numbers and dates in a way that is consistent with spreadsheet software like Microsoft Excel or Google Sheets. This can be particularly useful for applications that deal with data export, reporting, or any form of data presentation that requires spreadsheet-like formatting.

What are ssf's main functionalities?

Number Formatting

This feature allows you to format numbers according to a specified format string. In this example, a number is formatted to two decimal places.

"SSF.format('0.00', 123.456); // '123.46'"

Date Formatting

This feature enables the formatting of JavaScript Date objects into a string format based on the provided format string. Here, a date is formatted into a YYYY-MM-DD format.

"SSF.format('YYYY-MM-DD', new Date(2023, 3, 1)); // '2023-04-01'"

Custom Formats

SSF allows for the creation of custom formats to handle specific formatting needs. This example demonstrates how to format numbers into a 'Million' or 'Thousand' string based on their value.

"SSF.format('[>999999]#,##0,"Million";#,##0,"Thousand"', 1200000); // '1,200,000,"Million"'"

Other packages similar to ssf

Keywords

FAQs

Package last updated on 29 Mar 2014

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