1.1.2 • Published 4 years ago

js-dynamic-constants v1.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

js-dynamic-constants

build issues forks stars license version minified size package version keywords

Easy dynamic template strings / constants for production scale application

Usage

  1. To import, import { getTemplateString } from 'js-dynamic-constants';

API

getTemplateString(someString)(value1, value2, value3, ...);

For example,

Consider the string "This is a ${0} dynamic string, ${1} use ${n} to indicate the corresponding fillers"

Fill the required values in order in the inner function arguments.

const templateString = 'This is a ${0} dynamic string, you can pass ${1} number of ${2}';
const dynamicString = getTemplateString(templateString)('sample', 'any', 'arguments');
// This is a sample dynamic string, you can pass any number of arguments
1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago