https://github.com/flauc/otfs
A simple npm library that creates nicely formatted template strings from objects.
https://github.com/flauc/otfs
Last synced: 12 months ago
JSON representation
A simple npm library that creates nicely formatted template strings from objects.
- Host: GitHub
- URL: https://github.com/flauc/otfs
- Owner: flauc
- License: mit
- Created: 2016-04-23T11:14:45.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-24T10:23:22.000Z (about 10 years ago)
- Last Synced: 2025-04-19T17:54:24.845Z (about 1 year ago)
- Language: TypeScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# OTFS
A light weight npm library for converting objects in to properly indented ES6 template strings.
## Install
```cmd
npm install otfs
```
## Usage
otfs has a single method called create which accepts an object and returns a template string.
```js
const otfs = require("otfs");
let something = {
a: "something",
b: "something else",
c: {
d: "this also works",
e: ["and this", "and this", "and this"]
}
};
otfs.create(something)
```
## Example
For a simple example clone this repository and check out the example folder.