How to use the unicode-canonical-property-names-ecmascript.delete function in unicode-canonical-property-names-ecmascript

To help you get started, we’ve selected a few unicode-canonical-property-names-ecmascript 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 mathiasbynens / regenerate-unicode-properties / build.js View on Github external
console.log(`Creating ${ fileName }…`);
		const codePoints = require(
			`unicode-${ UNICODE_VERSION }/${ property }/${ value }/code-points.js`
		);
		const set = regenerate(codePoints);
		const output = `${ set.toCode() }\nmodule.exports = set;\n`;
		fs.writeFileSync(fileName, output);
	}
	INDEX.set(property, values.sort());
}

/*----------------------------------------------------------------------------*/

const supportedProperties = require('unicode-canonical-property-names-ecmascript');
for (const property of nonBinaryProperties) {
	supportedProperties.delete(property);
}
const binaryProperties = [...supportedProperties];

// Empty the target directory, or create it if it doesn’t exist yet.
const directory = 'Binary_Property';
console.log(`Emptying ${ directory }…`);
emptyDirSync(directory);
for (const property of binaryProperties) {
	const fileName = `${ directory }/${ property }.js`;
	console.log(`Creating ${ fileName }…`);
	const codePoints = require(
		`unicode-${ UNICODE_VERSION }/Binary_Property/${ property }/code-points.js`
	);
	const set = regenerate(codePoints);
	const output = `${ set.toCode() }\nmodule.exports = set;\n`;
	fs.writeFileSync(fileName, output);

unicode-canonical-property-names-ecmascript

The set of canonical Unicode property names supported in ECMAScript RegExp property escapes.

MIT
Latest version published 2 months ago

Package Health Score

75 / 100
Full package analysis

Popular unicode-canonical-property-names-ecmascript functions