ck2
GFX game configuration format parser. Crusader Kings II | Paradox Interactive
Last updated 9 months ago by bluelovers .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ck2 
SYNC missed versions from official npm registry.

node-ck2

GFX game configuration format parser. Crusader Kings II | Paradox Interactive

npm install ck2

this version is very stupid and slow, wellcome rewrite code


const ck2 = require('ck2');
const assert = require('assert');

let options = {
	//pretty: false,
	comment: false,
	pretty: true,
	//pretty: false,
	print_length: 50,
};

let input = `
##########remedy_fe_swapping6##########
fe131  = { random = no customizer = no hidden = yes } #辛格尔德
fe132  = { random = no customizer = no hidden = yes } #艾丝琳
fe133  = { random = no customizer = no hidden = yes } #亚斯穆尔
fe134  = { random = no customizer = no hidden = yes } #克尔特
fe135  = { random = no customizer = no hidden = yes }	#拜隆
fe136  = { random = no customizer = no hidden = yes }	#林格
fe137  = { random = no customizer = no hidden = yes }	#雷普托尔
fe138  = { random = no customizer = no hidden = yes }	#兰格巴鲁特

loputousu = {
		graphical_culture = westerngfx
		graphical_unit_culture = western
		
		color = { 1.0 0.0 0.0 }
		
		# ?222 ?254 ?208 ?240 ?
		}
`;

let data = ck2.parse(input, options);
let output = ck2.stringify(data, options);
let data2 = ck2.parse(output, options);

console.log(data);

assert.deepEqual(data, data2);

Current Tags

  • 1.0.0                                ...           latest (9 months ago)

6 Versions

  • 1.0.0                                ...           9 months ago
  • 0.1.0                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
  • 0.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 2
Dependencies (10)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |