How to use the pvutils.clearProps function in pvutils

To help you get started, we’ve selected a few pvutils 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 PeculiarVentures / PKI.js / src / PBKDF2Params.js View on Github external
fromSchema(schema)
	{
		//region Clear input data first
		clearProps(schema, [
			"salt",
			"iterationCount",
			"keyLength",
			"prf"
		]);
		//endregion
		
		//region Check the schema is valid
		const asn1 = asn1js.compareSchema(schema,
			schema,
			PBKDF2Params.schema({
				names: {
					saltPrimitive: "salt",
					saltConstructed: {
						names: {
							blockName: "salt"
github PeculiarVentures / PKI.js / src / ExtKeyUsage.js View on Github external
fromSchema(schema)
	{
		//region Clear input data first
		clearProps(schema, [
			"keyPurposes"
		]);
		//endregion
		
		//region Check the schema is valid
		const asn1 = asn1js.compareSchema(schema,
			schema,
			ExtKeyUsage.schema({
				names: {
					keyPurposes: "keyPurposes"
				}
			})
		);

		if(asn1.verified === false)
			throw new Error("Object's schema was not verified against input data for ExtKeyUsage");
github PeculiarVentures / PKI.js / src / SubjectDirectoryAttributes.js View on Github external
fromSchema(schema)
	{
		//region Clear input data first
		clearProps(schema, [
			"attributes"
		]);
		//endregion
		
		//region Check the schema is valid
		const asn1 = asn1js.compareSchema(schema,
			schema,
			SubjectDirectoryAttributes.schema({
				names: {
					attributes: "attributes"
				}
			})
		);

		if(asn1.verified === false)
			throw new Error("Object's schema was not verified against input data for SubjectDirectoryAttributes");
github PeculiarVentures / PKI.js / src / Attribute.js View on Github external
fromSchema(schema)
	{
		//region Clear input data first
		clearProps(schema, [
			"type",
			"values"
		]);
		//endregion
		
		//region Check the schema is valid
		const asn1 = asn1js.compareSchema(schema,
			schema,
			Attribute.schema({
				names: {
					type: "type",
					values: "values"
				}
			})
		);
github PeculiarVentures / PKI.js / src / OtherRevocationInfoFormat.js View on Github external
fromSchema(schema)
	{
		//region Clear input data first
		clearProps(schema, [
			"otherRevInfoFormat",
			"otherRevInfo"
		]);
		//endregion
		
		//region Check the schema is valid
		const asn1 = asn1js.compareSchema(schema,
			schema,
			OtherRevocationInfoFormat.schema()
		);

		if(asn1.verified === false)
			throw new Error("Object's schema was not verified against input data for OtherRevocationInfoFormat");
		//endregion

		//region Get internal properties from parsed schema

pvutils

Common utilities for products from Peculiar Ventures

MIT
Latest version published 3 years ago

Package Health Score

68 / 100
Full package analysis