GitXplorerGitXplorer
r

s.js

public
21 stars
2 forks
2 issues

Commits

List of commits on branch master.
Unverified
0c2782e02162b8c5dd83feb122ec228a4b76867e

Fixed README

rrauchg committed 13 years ago
Unverified
a4ab5ecd18985eaa5341132740507c206f558883

Added JSON stringification test.

rrauchg committed 13 years ago
Unverified
60ab55bd64b7acefaf4f047f71237c5ce1542ffd

Added JSON stringification support.

rrauchg committed 13 years ago
Unverified
3760b9a48d8b11103437889573cbc3dd29a85986

Added JSON serialization example.

rrauchg committed 13 years ago
Unverified
46751ddde055fc2f8a49f1d122ab94091ac789fc

README

rrauchg committed 13 years ago
Unverified
fa1c2872fcbe0202d4f145498abd3c89b38c5e52

Clarified NPM name

rrauchg committed 13 years ago

README

The README file for this repository.

s.js: minimalistic javascript sprintf().

// standalone
s('http://%s:%d', 'localhost', 40)
s('got %j', { this: 'will be JSON.stringified' })

// extend String.prototype
s.extend();
'http://%s:%d'.s('localhost', 40);
  • Node/browser compatible. Published as s on npm.
  • Opt-in String.prototype extension
  • Only supports %s and %d. Escape % as %%.