Skip to content

Commit

Permalink
Merge pull request #13 from modnes/develop
Browse files Browse the repository at this point in the history
Updating documentation
  • Loading branch information
luizcanet committed Apr 18, 2020
2 parents a4c0bca + d936591 commit f310c20
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Data Controller Module

Data Controller is browser module that aims to let implementations to know about data updates inside a data attribute of a host object in a simple way.

It uses a [Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) to capture any modification in the target data and comunicates changes dispatching an event callde `dataUpdated`.
It uses a [Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) to capture any modification in the target data and comunicates changes dispatching an event called `dataUpdated`.


Installing
Expand Down Expand Up @@ -47,7 +47,7 @@ Data Controller provides more two main methods: bindDOM() and bindForm(). These

### bindDOM

The [`bindDOM()`](https://github.com/modnes/data-cotroller/wiki/API#binddom) method uses an array containing mapping set that bind properties modifications to elements in DOM. Each map must to set the `property` attribute from data in the host object.
The [`bindDOM()`](https://github.com/modnes/data-controller/wiki/API#binddom) method uses an array containing mapping set that bind properties modifications to elements in DOM. Each map must to set the `property` attribute from data in the host object.

The following are some examples of configuring mappings:

Expand Down Expand Up @@ -89,7 +89,7 @@ dataController.bindDOM(MAPPING_SET)

### bindForm

The [`bindForm()`](https://github.com/modnes/data-cotroller/wiki/API#bindform) receives a form and binds each form element to a property from data by it name attribute.
The [`bindForm()`](https://github.com/modnes/data-controller/wiki/API#bindform) receives a form and binds each form element to a property from data by it name attribute.

```html
<form class="person-form">
Expand Down Expand Up @@ -119,4 +119,4 @@ let form = document.querySelector('.person-form')
dataController.bindForm(form)
```

See the [API documentation](https://github.com/modnes/data-cotroller/wiki/API)
See the [API documentation](https://github.com/modnes/data-controller/wiki/API)
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@modnes/data-cotroller",
"name": "@modnes/data-controller",
"version": "1.0.0",
"description": "Module to Control Data by Handling Data Events",
"main": "data-controller.js",
Expand All @@ -10,7 +10,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/modnes/data-cotroller.git"
"url": "git+https://github.com/modnes/data-controller.git"
},
"keywords": [
"module",
Expand All @@ -21,9 +21,9 @@
"author": "Luiz Henrique Canet Filho <me@luizca.net>",
"license": "MIT",
"bugs": {
"url": "https://github.com/modnes/data-cotroller/issues"
"url": "https://github.com/modnes/data-controller/issues"
},
"homepage": "https://github.com/modnes/data-cotroller#readme",
"homepage": "https://github.com/modnes/data-controller#readme",
"devDependencies": {
"@babel/register": "^7.9.0",
"babel-eslint": "^10.1.0",
Expand Down

0 comments on commit f310c20

Please sign in to comment.