-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Description
I'm not sure if there is something broken or I am doing it wrong, but the basic example in the docs fail.
$ node
> var format = require('string-format');
undefined
> format('hello, {}', 'world'); // works
'hello, world'
> 'hello, {}'.format('world'); // doesn't work
TypeError: "hello, {}".format is not a function
at repl:1:13
at REPLServer.defaultEval (repl.js:248:27)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer.<anonymous> (repl.js:412:12)
at emitOne (events.js:82:20)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:210:10)
at REPLServer.Interface._line (readline.js:549:8)
at REPLServer.Interface._ttyWrite (readline.js:826:14)
Installed the library from npm. This is the version I have in my package.json
:
"string-format": "^0.5.0"
Metadata
Metadata
Assignees
Labels
No labels