This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const path = require('path'); | |
function encodeFileContent(filePath) { | |
return new Promise((resolve, reject) => { | |
fs.readFile(filePath, { encoding: 'base64' }, (err, data) => { | |
if (err) { | |
reject(`Error reading file ${filePath}: ${err}`); | |
} else { | |
resolve(data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"basicInformation": { | |
"type": "object", | |
"x-label": "Basic Information", | |
"properties": { | |
"basicInfo": { | |
"description": "What is the character’s age, sex, ethnicity? Describe {{possPronoun}} physical appearance (hair and eye color; body build; skin tone; height and weight; unique features such as glasses, scars, dimples, etc.).", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"majorArcana": [ | |
{ | |
"name": "The Fool", | |
"cardNumber": 1, | |
"symbols": [ | |
"A man standing at the edge of a cliff", | |
"A barking dog" | |
], | |
"description": "The Fool represents new beginnings, having faith in the future, being inexperienced, not knowing what to expect, having beginner's luck, improvisation and believing in the universe to provide.", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
She said she loved him | |
Only she said she loved him. | |
She only said she loved him. | |
She said only she loved him. | |
She said she only loved him. | |
She said she loved only him. | |
She said she loved him only. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apologies for the confusion. If you only want to encode `<` and `>` characters that are not part of XML tags, you can modify the regex and the encoding logic. Here's an updated example: | |
```javascript | |
const text = "<example>Some text with <tag> and > symbol</example>"; | |
// Regular expression to match '<' or '>' not followed by an XML tag | |
const regex = /(<(?!\/?[a-zA-Z]+\b)[^>]*>)|([<>])/g; | |
// Function to encode the matched characters | |
function encodeNonXmlTags(match, xmlTag) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"personalLife": { | |
"description": "Friends, allies, rivals, enemies, superiors, romantic partners, role models, influence among them all", | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"portrait": { | |
"type": "string" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "object", | |
"x-stoplight": { | |
"id": "4254907af0db3" | |
}, | |
"x-examples": { | |
"data": { | |
"majorArcana": [ | |
{ | |
"name": "The Fool", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { parseWithPointers, safeParse, safeStringify } from "@stoplight/json"; | |
const result = parseWithPointers(`{ | |
"hello": "world", | |
"address": { | |
"street": 123 | |
} | |
}`); | |
console.log(result.data); | |
console.log(result.pointers); // Returns undefined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// tslint:disable: quotemark | |
// modules | |
import { Module } from '@nestjs/common'; | |
import { CharacterModule } from './character/character.module'; | |
import { CampaignModule } from './campaign/campaign.module'; | |
import { PlayerModule } from './player/player.module'; | |
import { SageModule } from './sage/sage.module'; | |
import { TypeOrmModule } from "@nestjs/typeorm"; | |
import { Connection } from 'typeorm'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hostname: guiltygear4 | |
k3os: | |
data_sources: | |
- gcp | |
- cdrom | |
modules: | |
- kvm | |
- nvme | |
dns_nameservers: |
NewerOlder