# [obj-chain](https://github.com/aretecode/obj-chain#readme) *0.0.3*

> fluent chaining for obj with dot-prop access


### src/index.js


#### flow(funcs) 






##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| funcs | `Array.&lt;Function&gt;`  | functions to flow left to right | &nbsp; |




##### Returns


- `Function`  passes args through the functions, bound to this



#### new ObjChain() 








##### Returns


- `Void`



#### ObjChain.init(data[, plugins&#x3D;]) 






##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| data | `string` `Object`  | json data | &nbsp; |
| plugins&#x3D; | `Array.&lt;string&gt;`  |  | *Optional* |




##### Returns


- `JSONChain`  



#### ObjChain.constructor(data[, plugins&#x3D;]) 






##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| data | `string` `Object`  |  | &nbsp; |
| plugins&#x3D; | `Array.&lt;string&gt;`  |  | *Optional* |




##### Returns


- `Void`



#### ObjChain.update(key, val) 






##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| key | `string` `any`  |  | &nbsp; |
| val | `Serializable` `any`  |  | &nbsp; |




##### Returns


- `ObjChain`  @chainable



#### ObjChain.escape(key) 






##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| key | `string`  | key with `.` | &nbsp; |




##### Returns


- `string`  string with escaped `\\.`



#### ObjChain.setIfNotEmpty(key, val) 

sets !.has(key)




##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| key | `string` `any`  |  | &nbsp; |
| val | `Serializable` `any`  |  | &nbsp; |




##### Returns


- `ObjChain`  @chainable



#### ObjChain.has(key) 






##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| key | `string` `any`  |  | &nbsp; |




##### Returns


- `Boolean`  



#### ObjChain.del(key) 

delete. remove




##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| key | `string` `any`  |  | &nbsp; |




##### Returns


- `ObjChain`  



#### ObjChain.val([key&#x3D;null]) 

get a value




##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| key&#x3D;null | `string` `any`  |  | *Optional* |




##### Returns


- `any`  current key or named if there is key param



#### ObjChain.save() 

save/write data






##### Returns


- `ObjChain`  



#### ObjChain.use(obj) 

use middleware




##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| obj | `Object`  |  | &nbsp; |




##### Returns


- `ObjChain`  



#### ObjChain.extend(methods[, nest&#x3D;false]) 

take strings, make them methods to .set on




##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| methods | `Array.&lt;string&gt;`  |  | &nbsp; |
| nest&#x3D;false | `boolean`  | nest the .set | *Optional* |




##### Returns


- `JSONChain`  



#### ObjChain.toString() 








##### Returns


- `string`  




### src/plugins/ConfigPlugin.js


#### configPlugin(chain[, name]) 






##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| chain | `ObjChain`  |  | &nbsp; |
| name | `string`  |  | *Optional* |




##### Returns


- `Void`




### src/plugins/KebabPlugin.js


#### extendKebab(methods) 






##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| methods | `Array.&lt;string&gt;`  |  | &nbsp; |




##### Returns


- `ObjectChain`  @chainable




### src/plugins/SnapshotPlugin.js


#### getAst(state)  *private method*






##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| state |  |  | &nbsp; |




##### Returns


-  code generated state



#### getSnapshot([type&#x3D;&#x27;ast&#x27;, index&#x3D;1]) 






##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| type&#x3D;&#x27;ast&#x27; | `String`  | snapshot type to use | *Optional* |
| index&#x3D;1 | `Number`  | index starting from last to use | *Optional* |




##### Returns


-  snapshot



#### snapAst(state)  *private method*






##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| state |  |  | &nbsp; |
| now&#x3D;Date.now() | `number`  |  | *Optional* |




##### Returns


- `ObjChain`  @chainable



#### snapStr(state)  *private method*






##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| state |  |  | &nbsp; |
| now&#x3D;Date.now() | `number`  |  | *Optional* |




##### Returns


- `ObjChain`  @chainable



#### snapshot([types&#x3D;&#x27;ast&#x27;, props&#x3D;&#x27;data&#x27;]) 






##### Parameters

| Name | Type | Description |  |
| ---- | ---- | ----------- | -------- |
| types&#x3D;&#x27;ast&#x27; | `Array.&lt;string&gt;` `string`  | [ast, stringify] | *Optional* |
| props&#x3D;&#x27;data&#x27; | `Array.&lt;string&gt;` `string`  | properties to snapshot | *Optional* |




##### Returns


- `ObjChain`  @chainable




*Documentation generated with [doxdox](https://github.com/neogeek/doxdox).*
