4.10.113 • Published 2 years ago

@devtea2026/odit-voluptas-rerum-ea v4.10.113

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

@devtea2026/odit-voluptas-rerum-ea

Build and Test NPM version NPM

Minimal templates for Node.js

Installation

npm install @devtea2026/odit-voluptas-rerum-ea

Usage

const compile = require('@devtea2026/odit-voluptas-rerum-ea');

const compiled = compile('filedir/filename.ct', { name: 'John' }); // filepath and variables

Full example

├── root
│   ├── index.js
│   └── template.ct # template file you can use any extension
// index.js
const compile = require('@devtea2026/odit-voluptas-rerum-ea');

const compiled = compile('template.ct', { name: 'John' }); // you can pass file content as third argument 
console.log(compiled); // you can also write to a file or do whatever you want with the compiled template
<!-- template.ct -->
<h1>Hello, ${name}!</h1>
<h2>How are you? ${capitalize(name)}</h2>
<h3>Lowercase: ${lowercase(name)}</h3>
<!-- output -->
<h1>Hello, John!</h1>
<h2>How are you? John</h2>
<h3>Lowercase: john</h3>

Functions

  • capitalize(string) - Capitalizes the first letter of a string
  • lowercase(string) - Converts a string to lowercase
  • uppercase(string) - Converts a string to uppercase
  • pluralize(string) - Change the word to its plural
  • singularize(string) - Change the word to its singular
  • capPluralize(string) - capitalize + pluralize
  • capSingularize(string) - capitalize + singularize
  • time() - return timestamp

Notes

  • You can't provide whitespace in the function name, so capitalize (name) won't work. You can use capitalize(name) instead.
  • ${ name} won't work. You can use ${name} instead.
  • You can use any extension for the template file, but it's recommended to use .ct for compile-template files.
idleES7browserchannelclassnameassertratelimitrestoutputgetPrototypeOfboundpushmacoscommand-linereplayoperating-systemxhrdomwritablecss-in-jsparseqsfullinternales2017numberemrES2017valueFunction.prototype.namefilterreadwatchFile[[Prototype]]tostringtagconnectimmerdatastructurearktypeconcurrencycachefast-copyprocessregularassertsfetchcomputed-typesjsonpathhookformsettingsIteratorconsumeelasticacheshrinkwrapec2deepmapsymbolPromiseiamESnextmimetypesregexbrowserlistairbnbcryptpackagesrmpipeES2020_.extenddataSetmimeECMAScript 2017multi-packageStyleSheetdeepclonefast-deep-clonefind-uptaskstarterenumerableTypedArraydefaultawaitfixed-widthtextformURLes6packagewebloggingObservablesArray.prototype.flatMicrosoftclass-validatorvisualform-validationurl0cjkpackage.jsonBigUint64Arrayes7createECMAScript 2018URLSearchParamsopenpropnodejsemitUint16Arrayvariablesowncompile lessUint32Arrayvalidcommandervalidateregular expressionajvchinesefseventsargsinstallersqsworkflowjssharedarraybufferstylesheetfindLastagentArray.prototype.filterjshintdefineargvshelldirmobilestatelessprotobufelmtypesbundlerObjectwalkweakmaprmdirconfigurableflatMappostcss-plugincontainsgetOwnPropertyDescriptorfastifyflatweaksetexitcoercibletypanionArray.prototype.findLastIndexcirculargetoptstyleguidelanguagewaitjQuerymatchesmochalook-up@@toStringTagRegExp#flagsslotprettytraverseguidperformancestartiterationredactcompilercharacterclassesutilityreadablestreammoduleproxyjesttyped arrayES5promiseswfinterruptsbatchconcatMapObject.entriesphoneWebSocketintrinsicprotoreact-hooksECMAScript 2019Array.prototype.findLastbusyecmascriptbluebirdcensorfindupkeysECMAScript 3wgetsiginttoobjectECMAScript 2020loggerpluginsuperstructObject.keysdeterministicimportexportwhichspinnersconsoleserializationECMAScript 2023momentzodoptimizernegative zerosuperagentbyteLengthnested csscryptolintmatchAlldirectoryJSONrestful
4.10.113

2 years ago

4.10.112

2 years ago

4.10.111

2 years ago

4.10.110

2 years ago

4.10.109

2 years ago

4.10.108

2 years ago

4.10.107

2 years ago

4.10.106

2 years ago

4.9.102

2 years ago

4.9.103

2 years ago

4.9.104

2 years ago

2.7.62

2 years ago

2.7.61

2 years ago

4.9.100

2 years ago

2.7.60

2 years ago

4.9.101

2 years ago

2.3.28

2 years ago

2.3.27

2 years ago

2.3.29

2 years ago

2.3.26

2 years ago

2.7.64

2 years ago

2.7.63

2 years ago

3.8.80

2 years ago

4.10.104

2 years ago

4.10.105

2 years ago

2.3.31

2 years ago

2.3.30

2 years ago

2.3.32

2 years ago

3.8.69

2 years ago

3.8.68

2 years ago

2.1.23

2 years ago

2.6.39

2 years ago

2.1.21

2 years ago

2.1.22

2 years ago

2.1.20

2 years ago

3.8.78

2 years ago

3.8.79

2 years ago

3.8.76

2 years ago

3.8.77

2 years ago

3.8.74

2 years ago

2.8.67

2 years ago

2.6.44

2 years ago

3.8.75

2 years ago

2.8.66

2 years ago

2.6.45

2 years ago

3.8.72

2 years ago

2.8.65

2 years ago

2.6.46

2 years ago

3.8.73

2 years ago

2.8.64

2 years ago

3.8.70

2 years ago

2.6.40

2 years ago

3.8.71

2 years ago

2.6.41

2 years ago

2.6.42

2 years ago

2.8.68

2 years ago

2.6.43

2 years ago

3.9.90

2 years ago

2.4.36

2 years ago

2.4.35

2 years ago

2.4.32

2 years ago

2.4.34

2 years ago

2.4.33

2 years ago

3.9.93

2 years ago

3.9.94

2 years ago

3.9.91

2 years ago

3.9.92

2 years ago

2.2.26

2 years ago

2.2.24

2 years ago

2.2.25

2 years ago

2.2.23

2 years ago

4.9.95

2 years ago

4.9.94

2 years ago

4.9.97

2 years ago

4.9.96

2 years ago

4.9.99

2 years ago

4.9.98

2 years ago

2.7.49

2 years ago

2.7.48

2 years ago

2.7.47

2 years ago

2.7.46

2 years ago

2.7.51

2 years ago

2.7.50

2 years ago

3.9.88

2 years ago

3.9.89

2 years ago

2.5.36

2 years ago

2.5.37

2 years ago

2.5.38

2 years ago

2.5.39

2 years ago

3.9.86

2 years ago

2.7.55

2 years ago

3.9.87

2 years ago

2.7.54

2 years ago

3.9.84

2 years ago

2.7.53

2 years ago

3.9.85

2 years ago

2.7.52

2 years ago

3.9.82

2 years ago

2.7.59

2 years ago

3.9.83

2 years ago

2.7.58

2 years ago

3.9.80

2 years ago

2.7.57

2 years ago

3.9.81

2 years ago

2.7.56

2 years ago

2.1.19

2 years ago

2.1.18

2 years ago

2.1.16

2 years ago

2.1.17

2 years ago

1.1.16

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago