Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);