SkillAgentSearch skills...

Subs

tiny string substitution

Install / Use

/learn @matthewmueller/Subs
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

subs

tiny string substitution

Installation

Install with component(1):

$ component install matthewmueller/subs

Install with npm:

$ npm install subs

Example

// subs(tpl, obj)
var tpl = 'my favorite {food} is: {name}';
var str = subs(str, { food: 'fruit', name: 'peach' });

// currying: subs(tpl)(obj)
var tpl = 'my favorite {food} is: {name}';
var fn = subs(tpl);
var str = fn({ food: 'fruit', name: 'peach' });

Test

make test

License

MIT

Related Skills

View on GitHub
GitHub Stars11
CategoryDevelopment
Updated2y ago
Forks1

Languages

JavaScript

Security Score

60/100

Audited on Feb 25, 2024

No findings