Skip to content

Commit

Permalink
use element-in-view
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed May 26, 2017
1 parent 958850a commit 8abb4a5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 63 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"extends": "egoist/esnext-browser"
},
"dependencies": {
"element-in-view": "^0.1.0",
"throttleit": "^1.0.0"
}
}
28 changes: 0 additions & 28 deletions src/in-viewport.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import throttle from 'throttleit'
import inViewport from './in-viewport'
import inViewport from 'element-in-view'

const triggers = ['scroll', 'resize']

Expand Down
50 changes: 16 additions & 34 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ async-to-gen@^1.2.0:
babylon "^6.14.0"
magic-string "^0.19.0"

[email protected]:
[email protected], async@^2.1.2, async@^2.1.4:
version "2.1.4"
resolved "https://registry.npmjs.org/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4"
dependencies:
Expand All @@ -245,12 +245,6 @@ async@^1.4.0:
version "1.5.2"
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"

async@^2.1.2, async@^2.1.4:
version "2.1.5"
resolved "https://registry.npmjs.org/async/-/async-2.1.5.tgz#e587c68580994ac67fc56ff86d3ac56bdbe810bc"
dependencies:
lodash "^4.14.0"

asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
Expand Down Expand Up @@ -1404,11 +1398,7 @@ content-type@~1.0.2:
version "1.0.2"
resolved "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed"

convert-source-map@^1.1.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.3.0.tgz#e9f3e9c6e2728efc2676696a70eb382f73106a67"

convert-source-map@^1.4.0:
convert-source-map@^1.1.0, convert-source-map@^1.4.0:
version "1.5.0"
resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5"

Expand Down Expand Up @@ -1867,14 +1857,14 @@ [email protected]:
version "1.1.1"
resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"

electron-to-chromium@^1.2.7:
version "1.3.9"
resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.9.tgz#db1cba2a26aebcca2f7f5b8b034554468609157d"

electron-to-chromium@^1.3.11:
electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.11:
version "1.3.11"
resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.11.tgz#744761df1d67b492b322ce9aa0aba5393260eb61"

element-in-view@^0.1.0:
version "0.1.0"
resolved "https://registry.npmjs.org/element-in-view/-/element-in-view-0.1.0.tgz#662f41f9a8d3b8ca4587c1ddb427b7d27af88bc9"

elliptic@^6.0.0:
version "6.4.0"
resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df"
Expand Down Expand Up @@ -2701,14 +2691,10 @@ got@^6.7.1:
unzip-response "^2.0.1"
url-parse-lax "^1.0.0"

[email protected], graceful-fs@^4.1.11:
[email protected], graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
version "4.1.11"
resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"

graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
version "4.1.10"
resolved "http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.1.10.tgz#f2d720c22092f743228775c75e3612632501f131"

"graceful-readlink@>= 1.0.0":
version "1.0.1"
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
Expand Down Expand Up @@ -2904,11 +2890,7 @@ ieee754@^1.1.4:
version "1.1.8"
resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4"

ignore@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.0.tgz#8d88f03c3002a0ac52114db25d2c673b0bf1e435"

ignore@^3.2.6:
ignore@^3.2.0, ignore@^3.2.6:
version "3.3.3"
resolved "https://registry.npmjs.org/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d"

Expand Down Expand Up @@ -3939,18 +3921,18 @@ mime-db@~1.27.0:
version "1.27.0"
resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1"

mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.7:
version "2.1.14"
resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee"
dependencies:
mime-db "~1.26.0"

mime-types@~2.1.15:
mime-types@^2.1.12, mime-types@~2.1.15, mime-types@~2.1.7:
version "2.1.15"
resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed"
dependencies:
mime-db "~1.27.0"

mime-types@~2.1.11:
version "2.1.14"
resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee"
dependencies:
mime-db "~1.26.0"

[email protected], [email protected], mime@^1.3.4:
version "1.3.4"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53"
Expand Down

0 comments on commit 8abb4a5

Please sign in to comment.