1
0
mirror of https://github.com/twitter/twemoji.git synced 2024-06-15 03:35:16 +00:00
This commit is contained in:
Masayoshi Sekimura 2014-11-09 20:25:33 +00:00
commit 6d496124ae

View File

@ -19,6 +19,18 @@ var assets = {
// there is no asset equivalent for these // there is no asset equivalent for these
var ignoreMissing = ['2002', '2003', '2005']; var ignoreMissing = ['2002', '2003', '2005'];
function unique(src) {
var dst = [], seen = {};
for (var i = 0; i < src.length; i++) {
if (!seen.hasOwnProperty(src[i])) {
dst.push(src[i]);
seen[src[i]]++;
}
}
return dst;
}
// basic utility to organize async code // basic utility to organize async code
// see: http://webreflection.blogspot.co.uk/2012/03/tweet-sized-queue-system.html // see: http://webreflection.blogspot.co.uk/2012/03/tweet-sized-queue-system.html
// or: http://webreflection.blogspot.co.uk/2012/06/working-with-queues.html // or: http://webreflection.blogspot.co.uk/2012/06/working-with-queues.html
@ -190,6 +202,7 @@ Queue([
}); });
if (q.nonStandard.length) { if (q.nonStandard.length) {
q.nonStandard = unique(q.nonStandard);
console.warn('[WARNING] assets contain ' + q.nonStandard.length + ' non standard emoji:'); console.warn('[WARNING] assets contain ' + q.nonStandard.length + ' non standard emoji:');
// console.log(q.nonStandard.join(', ')); // console.log(q.nonStandard.join(', '));
} }