Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angluar2 Ionic #32

Closed
ghost opened this issue Dec 9, 2016 · 2 comments
Closed

Angluar2 Ionic #32

ghost opened this issue Dec 9, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 9, 2016

Hi,

I try to use your lib with ionic2

npm install https://github.com/mattyork/fuzzy.git#typescript --save

import { fuzzy } from 'fuzzy';

error
throw new Error("Cannot find module "fuzzy"");

any idea ?

thx

@ghost
Copy link
Author

ghost commented Dec 9, 2016

And if I try with master branch.

npm install fuzzy --save

error
/node_modules/fuzzy/lib/fuzzy"' has no exported member 'fuzzy'.

@SamVerschueren
Copy link

I used it in my Angular 2 application and it works great. It might have something to do with your import statement.

$ npm install fuzzy --save
import { filter } from 'fuzzy';

const list = ['baconing', 'narwhal', 'a mighty bear canoe'];
const results = filter('bcn', list)

Or, you can also do it like this probably

import * as fuzzy from 'fuzzy';

const list = ['baconing', 'narwhal', 'a mighty bear canoe'];
const results = fuzzy.filter('bcn', list)

@ghost ghost closed this as completed Jan 18, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant