Repository: ViacomInc/data-point (js)

Issue:
Document what's exported on the DataPoint object
**Problem description:**

It's not clear what methods/properties are available on the DataPoint object.

```js
const DataPoint = require('data-point')
```
For example, `DataPoint.createEntity` is used in a readme example, but that method is never documented.

**Suggested solution:**

1. Add this info to the readme

2. Refactor `lib/index.js` to make it clear what's being exported. Currently it does this:

https://github.com/ViacomInc/data-point/blob/28b6ed9766164eddbc455dff5f4a86c17d930bfc/packages/data-point/lib/index.js#L4

...and `./helpers`, which it's pointing to, does the same thing...

https://github.com/ViacomInc/data-point/blob/28b6ed9766164eddbc455dff5f4a86c17d930bfc/packages/data-point/lib/helpers/index.js#L3

...but listing the exports by name would make these files more understandable:

```js
// rough example...

module.exports = {
  create: require('./core').create,
  inspect: require('./helpers').inspect
  // and so on
}
```

Pull request:
 feat(data-point): explicitly expose set of methods to main API
<!--
Thanks for your interest in the project. We appreciate bugs filed and PRs submitted!

Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).

Also, please make sure you're familiar with and follow the instructions in the
contributing guidelines (found in the CONTRIBUTING.md file).

Please fill out the information below to expedite the review and (hopefully)
merge of your pull request!
-->

<!-- What changes are being made? (What feature/bug is being fixed here?) -->
**What**: #80

<!-- Why are these changes necessary? -->
**Why**: closes #80

<!-- How were these changes implemented? -->
**How**: explicitly exposing methods

<!-- Have you done all of these things?  -->
**Checklist**:
<!-- add "N/A" to the end of each line that's irrelevant to your changes -->
<!-- to check an item, place an "x" in the box like so: "- [x] Documentation" -->
- [ ] Documentation
- [X] Tests
- [X] Ready to be merged <!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
- [ ] Added username to **all-contributors** list

<!-- feel free to add additional comments -->


Patch:
diff --git a/packages/data-point/examples/custom-entity-type.js b/packages/data-point/examples/custom-entity-type.js
index e95f4f8..fa4e02d 100644
--- a/packages/data-point/examples/custom-entity-type.js
+++ b/packages/data-point/examples/custom-entity-type.js
@@ -33,10 +33,12 @@ function resolve (accumulator, resolveReducer) {
   return resolveReducer(accumulator, spec.value).then(acc => {
     // execute lodash template against
     // accumulator value
-    const output = spec.template(acc.value)
+    const value = spec.template(acc.value)
     // set new accumulator.value
     // this method creates a new acc object
-    return DataPoint.set(acc, 'value', output)
+    return Object.assign({}, acc, {
+      value
+    })
   })
 }
 
diff --git a/packages/data-point/lib/index.js b/packages/data-point/lib/index.js
index 3749dc9..c467ba9 100644
--- a/packages/data-point/lib/index.js
+++ b/packages/data-point/lib/index.js
@@ -1,3 +1,14 @@
 /* eslint global-require: 0 */
 
-module.exports = Object.assign({}, require('./core'), require('./helpers'))
+const core = require('./core')
+const helpers = require('./helpers')
+
+module.exports = {
+  create: core.create,
+  helpers: helpers.helpers,
+  createEntity: helpers.createEntity,
+  resolveEntity: helpers.resolveEntity,
+  reducify: helpers.reducify,
+  reducifyAll: helpers.reducifyAll,
+  createReducerResolver: helpers.reducifyAll
+}


Test patch:
diff --git a/packages/data-point/lib/__snapshots__/index.test.js.snap b/packages/data-point/lib/__snapshots__/index.test.js.snap
new file mode 100644
index 0000000..19d6e79
--- /dev/null
+++ b/packages/data-point/lib/__snapshots__/index.test.js.snap
@@ -0,0 +1,20 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`lib It should explicity expose set of methods 1`] = `
+Object {
+  "create": [Function],
+  "createEntity": [Function],
+  "createReducerResolver": [Function],
+  "helpers": Object {
+    "assign": [Function],
+    "filter": [Function],
+    "find": [Function],
+    "map": [Function],
+    "omit": [Function],
+    "pick": [Function],
+  },
+  "reducify": [Function],
+  "reducifyAll": [Function],
+  "resolveEntity": [Function],
+}
+`;
diff --git a/packages/data-point/lib/index.test.js b/packages/data-point/lib/index.test.js
new file mode 100644
index 0000000..b283cc3
--- /dev/null
+++ b/packages/data-point/lib/index.test.js
@@ -0,0 +1,11 @@
+/* eslint-env jest */
+
+const lib = require('./index')
+
+describe('lib', () => {
+  // this test here is mainly to be aware of any new method that gets added
+  // to the main API
+  test('It should explicity expose set of methods', () => {
+    expect(lib).toMatchSnapshot()
+  })
+})