UNPKG

react-native-sortables

Version:

Powerful Sortable Components for Flexible Content Reordering in React Native

17 lines (16 loc) 373 B
"use strict"; const hasProp = (object, prop) => { return prop in object; }; export const defaultKeyExtractor = item => { if (typeof item === 'object' && item !== null) { if (hasProp(item, 'id')) { return String(item.id); } if (hasProp(item, 'key')) { return String(item.key); } } return String(item); }; //# sourceMappingURL=keys.js.map