repo
replacements.fyi

// package

is-property

type: "module"

// preferences

// replacements (1)

snippet::is-identifier-name

Simple or drop-in replacement

This package is no longer necessary. You can test a string against the `ID_Start` and `ID_Continue` Unicode properties to check whether it is a valid identifier name, and so usable as an unquoted property.

// example

const isProperty = (str) =>
	/^[$_\p{ID_Start}][$\p{ID_Continue}]*$/u.test(
		str,
	);