Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am sdjcw on github.
  • I am sdjcw (https://keybase.io/sdjcw) on keybase.
  • I have a public key whose fingerprint is 91AF AFE1 7E3C C235 08C9 DACE 73B3 6E68 0C96 DC85

To claim this, I am signing this object:

@sdjcw
sdjcw / gist:af8e469f8b594cb297d786b75b17488d
Created April 1, 2017 06:30
LeanCloud JS-SDK 遍历表
const forEachAVObject = (query, fn) => {
let cursor = new Date(0);
const innerFn = () => {
return query
.greaterThan('createdAt', cursor)
.ascending('createdAt')
.limit(1000)
.find()
.then((objs) => {
_.forEach(objs, fn);