Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
fix(spelling): run most code through a spell checker (#226)
Browse files Browse the repository at this point in the history
I did change `unserialize` to `deserialize`, so it's not only comments and text that changed, but it's not a public method, so it should be okay.
  • Loading branch information
Haroenv authored Aug 1, 2017
1 parent dae13a1 commit 640fec3
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/docgen/src/advanced/multi-index-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ component](components/index.html), a search store is automatically instantiated.

## Independent Multi-Index searches

Let's take a look at what a minimalistic example of multi-index search looks like:
Let's take a look at what a minimal example of multi-index search looks like:

```html
<!-- App.vue -->
Expand Down
4 changes: 2 additions & 2 deletions docs/docgen/src/getting-started/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ Add Vue InstantSearch as a dependency, it's published on [npm](https://www.npmjs
$ npm install --save vue-instantsearch
```

## Run the development environement
## Run the development environment

When `vue-cli` bootstraped the project, it added some [npm scripts](https://docs.npmjs.com/misc/scripts) to your project, like a `dev` one. Let's use it:
When `vue-cli` bootstrapped the project, it added some [npm scripts](https://docs.npmjs.com/misc/scripts) to your project, like a `dev` one. Let's use it:

```shell
$ npm run dev
Expand Down
2 changes: 1 addition & 1 deletion docs/docgen/src/getting-started/search-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Note that there is no reason to provide your own client if you are not reusing i

### Create a search store from an Algolia helper instance

The [Algolia helper](https://github.com/algolia/algoliasearch-helper-js) is a JavaScript library that is built on top of the Algolia API client. Its goal is to expose a simple API to achieve advanced queries while also exposing utility methods and behaviours like keeping track of the last result.
The [Algolia helper](https://github.com/algolia/algoliasearch-helper-js) is a JavaScript library that is built on top of the Algolia API client. Its goal is to expose a simple API to achieve advanced queries while also exposing utility methods and behavior like keeping track of the last result.

As for the Algolia client, if you do not have an existing Algolia helper in your application, there should be no reason for you to instantiate the search store like showcased below.

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/sanitize-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ test('it should replace pre-post tags in highlighted values', () => {
]);
});

test('it should replace multiple occurences of pre-post tags in highlighted values', () => {
test('it should replace multiple occurrences of pre-post tags in highlighted values', () => {
const results = [
{
name: 'name',
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe('Store', () => {
expect(addAlgoliaAgent).toBeCalledWith(`vue-instantsearch ${version}`);
});

test('should throw an error upon adding a facet of unkown type', () => {
test('should throw an error upon adding a facet of unknown type', () => {
const store = createStore();
expect(() => {
store.addFacet('attribute', 'unknown');
Expand Down Expand Up @@ -270,7 +270,7 @@ describe('Store', () => {
attributesToRetrieve: ['objectID'],
};

// Make sure distinct parameter is gone when overrided with undefined.
// Make sure distinct parameter is gone when overridden with undefined.
expect(store.queryParameters).not.toHaveProperty('distinct');

store.queryParameters = {
Expand All @@ -280,7 +280,7 @@ describe('Store', () => {
};
store.addFacet('price');

// Make sure distinct parameter is gone when overrided with null.
// Make sure distinct parameter is gone when overridden with null.
expect(store.queryParameters).not.toHaveProperty('distinct');
});

Expand Down
2 changes: 1 addition & 1 deletion src/helper-serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const serialize = function(helper) {
return serialized;
};

export const unserialize = function(data) {
export const deserialize = function(data) {
const client = algoliaClient(data.appId, data.apiKey);
const helper = algoliaHelper(
client,
Expand Down
5 changes: 3 additions & 2 deletions src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import algoliaHelper from 'algoliasearch-helper';
import { version } from '../package.json';
import {
serialize as serializeHelper,
unserialize as unserializeHelper,
deserialize as deserializeHelper,
} from './helper-serializer';

import sanitizeResults from './sanitize-results';
Expand Down Expand Up @@ -199,6 +199,7 @@ export class Store {
return this._helper.lastResults.processingTimeMS;
}

// todo: change to goToFirstPage()
goTofirstPage() {
this.page = 0;
}
Expand Down Expand Up @@ -415,7 +416,7 @@ export const createFromAlgoliaClient = client => {
};

export const createFromSerialized = data => {
const helper = unserializeHelper(data.helper);
const helper = deserializeHelper(data.helper);

const store = new Store(helper);
store.highlightPreTag = data.highlightPreTag;
Expand Down

0 comments on commit 640fec3

Please sign in to comment.