Skip to content

Commit

Permalink
docs: note difference with Reflect.ownKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Jul 9, 2019
1 parent 3d4928c commit d5f8af0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/babel-helpers/src/helpers.js
Expand Up @@ -409,6 +409,10 @@ helpers.objectSpread = helper("7.0.0-beta.0")`
helpers.objectSpread2 = helper("7.5.0")`
import defineProperty from "defineProperty";
// This function is different to "Reflect.ownKeys". The enumerableOnly
// filters on symbol properties only. Return value always include enumerable
// string properties. It is good to use in objectSpread.
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
Expand Down

0 comments on commit d5f8af0

Please sign in to comment.