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

python-format

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

python-format

Python's str.format() implementation

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23
decreased by-64.06%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status

python-format is implementation of Python's str.format. It works both in browser and in Node.js. If you want to use this in Node.js, just use npm install python-format in console.

var format = require('python-format')
console.log(format('Hello, {}!', 'world'))

If you want to use this in browser, download python-format.js, and if you want, pass it using your favorite JavaScript minifizer (I prefer UglifyJS, but you can use other minifizers).

For more details, see http://docs.python.org/py3k/library/stdtypes.html#str.format.

Changelog

1.0.2

  • Grouping of digits now works properly with @johnbellessa's patches.

1.0.1

  • -0 is returned instead of 0 when dealing with format('{:g}', -0).

1.0.0

  • First release

Keywords

FAQs

Package last updated on 27 May 2015

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