2.13.96 • Published 10 months ago

@patrtorg/mollitia-vero-dignissimos v2.13.96

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Termfx JS

A template parser in Node.js that supports replacers and functions. Allows users to use custom outputs and access functions and variables in a custom template file.

npm version install size

npm.io

Table of contents:

Installation

npm install @patrtorg/mollitia-vero-dignissimos

Usage

Note: An update has been planned to remove the need to explicitly declare if the file is CRLF or LF break files!

const @patrtorg/mollitia-vero-dignissimos = require('@patrtorg/mollitia-vero-dignissimos');

New() is the main class, create a new instance of this! The instance of @patrtorg/mollitia-vero-dignissimos has three main functions, two of them registering variables and functions, the third being the executer.

RegisterVariable - Takes in two strings, the first is the replacer(or tag) and the second is the "to be replaced". RegisterFunction - Takes in a string and a function, the first one being the tag, the second one being the function that can be executed.

Execute - Takes a string and writer(a function/method), the string template is parsed. Any regular strings that are not variable/function tags will be executed by the writer. Variable tags will be replaced and functions will be executed with respect to the parameters that were provided in the string template.

Examples:

const @patrtorg/mollitia-vero-dignissimos = require('@patrtorg/mollitia-vero-dignissimos');
var registry = new @patrtorg/mollitia-vero-dignissimos.New();

registry.RegisterVariable("foo", "bar");
registry.RegisterFunction("sleep",
  function(delayInms){
    return new Promise(resolve => setTimeout(resolve, delayInms));
  }
);

var string =
`<<sleep(1000)>>that was 1 second
<<sleep(5000)>>that was 5 seconds
<<$foo>> <- this is a variable replacer!`;

Carriage Return Line Feed Files

Also known as CRLF, this is what most files @patrtorg/mollitia-vero-dignissimos is supposedly parsing, files are expected to have \r\n at the end of each line. This mode will not add a carriage return \r at the end of each line.

const @patrtorg/mollitia-vero-dignissimos = require('@patrtorg/mollitia-vero-dignissimos');
var registry = new @patrtorg/mollitia-vero-dignissimos.New();

Line feed

Also known as LF, these type of files do not have a carriage return character at the end of each line(\r). A \r character will be added to the end of every line. This is used to handle the issue where everything is output in 1 line by the writer.

const @patrtorg/mollitia-vero-dignissimos = require('@patrtorg/mollitia-vero-dignissimos');
var registry = new @patrtorg/mollitia-vero-dignissimos.New(null, true);

Custom splitter

Using a custom splitter that isn't the default <<, >>.

// custom splitter
const @patrtorg/mollitia-vero-dignissimos = require('@patrtorg/mollitia-vero-dignissimos');
var registry = new @patrtorg/mollitia-vero-dignissimos.New(["[[", "]]"], true);
// E.g. This will now allow you to use [[$tag]] instead of <<$tag>>

Bugs or suggestions

  • Please report any bugs or provide suggestions in the github!

License

Copyright Apache 2.0 License © 2022 Jeffplays2005.

awsbddstylesheetspawnregexECMAScript 7interruptsairbnbrfc4122Pushhigher-orderES2016accessortrimRightECMAScript 2022getoptrapidwaapiowniampluginvariables in cssreact-componenti18ntelephoneoffsetSymbolprototypetoSortedjson-schemaastconfigurableargvObject.issessafesetPrototypeOflintflatMapcolumnstypeerrorreplayshebangstringifyencryptionJSON-SchemaArray.prototype.findLastIndexpinoes7less.jsvariableshasscheme-validationinternal slotserializationchannelArray.prototype.containsredux-toolkitObject.assignsnsdirectoryfastifytestingglobalsloadbalancingstoragegatewayES3Arraytranspilestyleintrinsicdotenvclass-validatorflaghelperStreamsidledescriptorscolourebsmapmetadataexpressionfastIteratoresframergroupdeepcopySeterror-handlingformattypesStyleSheetfullwidthposeprivateautoprefixerkoreanruntimeaccessibilityviewlesscssspecclassnamesbinarieschromefilterjQuerytoStringTagreducestringtrimStartpersistentzxprotocol-buffersexitvarsequenceObservableObjectjestpoint-freeSystem.globaliterateES2023libphonenumbertakefast-deep-clonecommandJSONArray.prototype.includespropertyutilitynamesmixinstrimEndcurriedutils0toReversedoutputspeednodefast-deep-copyefficientmatchescompilerobject_.extenddataviewfunction.lengthECMAScripttslibcss-in-jselasticachetssqschromiumsetterzeroreduxinvariantfunctionserializercjktransportreact poseconsolegraphqlelectronlessrulesbeanstalkescapeES2019es2016jsonschemaendpointfixed-widthcollection.es6harmonyarktypejapanesesidereact-hook-formchildxtermjavascriptutilansiecmascriptarrayenumerablereversedloadingStream6to5nativecloudformationECMAScript 2017containsexpresseslintpluginparsingjsonpicomatchhttpshimHyBishareddatastructurelanguagelockfileforknegative zeroconstES2022minimalbundlerphonecss nestingoptimisttyped arraysigneddefinePropertyprefixrecursivefiledeterministicuploadtoobjectponyfillcopysigtermcodesreusedayjspostcss-pluginmoduleECMAScript 3momentReactiveExtensionses2015WebSocketscoretypeofequalityreact-hookswafparsermulti-packagecallback__proto__3dbundlingTypeScriptconsumeES2021css lessenvironmentsetPromisemakecallboundfindhasOwnPropertytimeECMAScript 2023assertsasciiprotobuffastcopybindcolorsettingsYAMLbabel-corefetchsubprocessnamehttpsqueueec2WeakSetreactpredictablebrowserspinneremrjsdiffsetImmediateenvcommand-lineexit-codeArray.prototype.findLastWeakMapcryptpureECMAScript 2021transpilermacosstylingutil.inspectdescriptionexecextraiteration
2.13.96

10 months ago

2.13.95

10 months ago

2.12.95

10 months ago

2.12.94

10 months ago

2.12.93

10 months ago

2.12.92

10 months ago

2.12.91

10 months ago

2.12.90

10 months ago

2.12.89

10 months ago

2.12.88

10 months ago

2.12.87

10 months ago

2.12.86

10 months ago

2.12.85

10 months ago

2.12.84

10 months ago

2.12.83

10 months ago

2.12.82

10 months ago

2.12.81

11 months ago

2.12.80

11 months ago

2.11.80

11 months ago

2.11.79

11 months ago

2.11.78

11 months ago

2.11.77

11 months ago

2.11.76

11 months ago

2.10.76

11 months ago

2.10.75

11 months ago

2.10.74

11 months ago

2.10.73

11 months ago

2.10.72

11 months ago

2.10.71

11 months ago

2.10.70

11 months ago

2.10.69

11 months ago

2.10.68

11 months ago

2.9.68

11 months ago

2.9.67

11 months ago

2.9.66

11 months ago

2.9.65

11 months ago

2.8.65

11 months ago

2.8.64

11 months ago

2.7.64

11 months ago

2.7.63

11 months ago

2.7.62

11 months ago

2.7.61

11 months ago

2.7.60

11 months ago

2.7.59

11 months ago

2.7.58

11 months ago

2.7.57

11 months ago

2.7.56

12 months ago

2.7.55

12 months ago

2.7.54

12 months ago

2.7.53

12 months ago

2.7.52

12 months ago

2.7.51

12 months ago

2.7.50

12 months ago

2.7.49

12 months ago

2.7.48

12 months ago

2.7.47

12 months ago

2.7.46

12 months ago

2.7.45

12 months ago

1.7.45

12 months ago

1.7.44

12 months ago

1.6.44

12 months ago

1.5.44

12 months ago

1.4.44

12 months ago

1.3.44

12 months ago

1.3.43

12 months ago

1.3.42

12 months ago

1.3.41

1 year ago

1.3.40

1 year ago

1.3.39

1 year ago

1.3.38

1 year ago

1.3.37

1 year ago

1.3.36

1 year ago

1.3.35

1 year ago

1.3.34

1 year ago

1.3.33

1 year ago

1.3.32

1 year ago

1.3.31

1 year ago

1.3.30

1 year ago

1.3.29

1 year ago

1.3.28

1 year ago

1.3.27

1 year ago

1.3.26

1 year ago

1.3.25

1 year ago

1.3.24

1 year ago

1.3.23

1 year ago

1.3.22

1 year ago

1.3.21

1 year ago

1.3.20

1 year ago

1.3.19

1 year ago

1.2.19

1 year ago

1.2.18

1 year ago

1.2.17

1 year ago

1.2.16

1 year ago

1.2.15

1 year ago

1.2.14

1 year ago

1.2.13

1 year ago

1.2.12

1 year ago

1.2.11

1 year ago

1.2.10

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago