How to use the get-own-enumerable-property-symbols.default function in get-own-enumerable-property-symbols

To help you get started, we’ve selected a few get-own-enumerable-property-symbols examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yeoman / stringify-object / index.js View on Github external
let value = stringify(el, options, pad + options.indent);
				if (options.transform) {
					value = options.transform(input, i, value);
				}

				return tokens.indent + value + eol;
			}).join('') + tokens.pad + ']';

			seen.pop();

			return expandWhiteSpace(ret);
		}

		if (isObj(input)) {
			let objKeys = Object.keys(input).concat(getOwnEnumPropSymbols(input));

			if (options.filter) {
				objKeys = objKeys.filter(el => options.filter(input, el));
			}

			if (objKeys.length === 0) {
				return '{}';
			}

			seen.push(input);

			const ret = '{' + tokens.newLine + objKeys.map((el, i) => {
				const eol = objKeys.length - 1 === i ? tokens.newLine : ',' + tokens.newLineOrSpace;
				const isSymbol = typeof el === 'symbol';
				const isClassic = !isSymbol && /^[a-z$_][a-z$_0-9]*$/i.test(el);
				const key = isSymbol || isClassic ? el : stringify(el, options);
github prisma / photonjs / packages / photon-generate / src / runtime / utils / stringifyObject.ts View on Github external
value = options.transformValue(input, i, value)
            }

            return tokens.indent + value + eol
          })
          .join('') +
        tokens.pad +
        ']'

      seen.pop()

      return expandWhiteSpace(ret)
    }

    if (isObj(input)) {
      let objKeys = Object.keys(input).concat(getOwnEnumPropSymbols(input))

      if (options.filter) {
        objKeys = objKeys.filter(el => options.filter(input, el))
      }

      if (objKeys.length === 0) {
        return '{}'
      }

      seen.push(input)

      const ret =
        '{' +
        tokens.newLine +
        objKeys
          .map((el, i) => {

get-own-enumerable-property-symbols

Returns an array of all enumerable symbol properties found directly upon a given object

ISC
Latest version published 5 years ago

Package Health Score

65 / 100
Full package analysis

Popular get-own-enumerable-property-symbols functions