<commit_before># js-object-wrapper
Javascript Object Wrapper

## Basic Usage

Define:

```javascript
var obj = ObjectWrapper({
				name: {
					first : "<NAME>",
					last: "Kim",
					wife: {
						name : "Nara"
					}
				},
				nickname: "haloper",
				hobby: ["game", "movie"]
			});
```

Get, Set, Value:

```javascript
obj.get("name").get("first"); 	// "<NAME>"
obj.get("hobby"); 					// ["game", "movie"]
obj.value();							// obj object
obj.get("name").value();			// name object

obj.get("name").set("full name", "<NAME>");
obj.get("name").get("full name");						//"<NAME>";

obj.get(["name", "first"]);									// "<NAME>"
obj.set(["name", "wife", "nickname"], "shine");
obj.get("name").get(["wife", "nickname"]); 			//shine"
```

Parent, Child and Root:

```javascript
var child = obj.child("name").child("wife"); 	// wife wrapped object
child.parent().value(); 								// name object
child.parent().parent().value(); 					// root object
child.root().value();									// root object
```

Contain:

```javascript
obj.get("name").contain("first"); 	//true
obj.contain("name"); 					//true
obj.contain("first"); 					//false
```

ForEachAll:

```javascript
var count = 0;
obj.forEachAll(function(key, value, path) {
	// key : "first"
	// value : "<NAME>"
	// path : ["name"]
	// ...
	console.log(key + "|" + value + "|" + path)
	count++;
	
});
count; 	//count = 7
```

FindKeys:

```javascript
var result = objectWrapper.findKey(/wife/);
result.length; 		// 1
```

## Namespace conflicts

```javascript
var objectWrapper = ObjectWrapper.noConflict();
var obj = objectWrapper({name: "haloper"});
```

## Authors

* [<NAME>](https://github.com/haloper)<commit_msg>README updated<commit_after># js-object-wrapper
Javascript Object Wrapper

## Basic Usage

Define:

```javascript
var obj = ObjectWrapper({
				name: {
					first : "<NAME>",
					last: "Kim",
					wife: {
						name : "Nara"
					}
				},
				nickname: "haloper",
				hobby: ["game", "movie"]
			});
```

Get, Set, Value:

```javascript
obj.get("name").get("first"); 	// "<NAME>"
obj.get("hobby"); 					// ["game", "movie"]
obj.value();							// obj object
obj.get("name").value();			// name object

obj.get("name").set("full name", "<NAME>");
obj.get("name").get("full name");						//"<NAME>";

obj.get(["name", "first"]);									// "<NAME>"
obj.set(["name", "wife", "nickname"], "shine");
obj.get("name").get(["wife", "nickname"]); 			//shine"
```

Parent, Child and Root:

```javascript
var child = obj.child("name").child("wife"); 	// wife wrapped object
child.parent().value(); 								// name object
child.parent().parent().value(); 					// root object
child.root().value();									// root object
```

Contain:

```javascript
obj.get("name").contain("first"); 	//true
obj.contain("name"); 					//true
obj.contain("first"); 					//false
```

ForEachAll:

```javascript
var count = 0;
obj.forEachAll(function(key, value, path) {
	// key : "first"
	// value : "<NAME>"
	// path : ["name"]
	// ...
	console.log(key + "|" + value + "|" + path)
	count++;
	
});
count; 	//count = 7
```

FindKeys:

```javascript
var result = obj.findKey(/wife/);
result.length; 		// 1
```

Snapshot and check change:

```javascript
obj.snapshot();
obj.get("name").get("first"); 				// <NAME>
obj.get("name").set("first", "<NAME>");
obj.changed();								// true
obj.get("name").set("first", "<NAME>");
obj.changed();								// false
```

## Namespace conflicts

```javascript
var objectWrapper = ObjectWrapper.noConflict();
var obj = objectWrapper({name: "haloper"});
```

## Authors

* [<NAME>](https://github.com/haloper)
{'fraction_non_alphanumeric': 0.24489795918367346, 'fraction_numerical': 0.0016773832820799553, 'mean_word_length': 3.2243211334120425, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1606109', 'n_tokens_mistral': 1494, 'n_tokens_neox': 1259, 'n_words': 264}