1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 23:28:06 +02:00

Merge pull request #7534 from Snuffleupagus/isName-name-check

Add a parameter to the `isName` function that enables checking not just that something is a `Name`, but also that the actual `name` properties matches
This commit is contained in:
Tim van der Meij 2016-08-17 15:48:42 +02:00 committed by GitHub
commit b4c8814fc9
6 changed files with 23 additions and 27 deletions

View file

@ -244,6 +244,12 @@ describe('primitives', function() {
var name = Name.get('Font');
expect(isName(name)).toEqual(true);
});
it('handles names with name check', function () {
var name = Name.get('Font');
expect(isName(name, 'Font')).toEqual(true);
expect(isName(name, 'Subtype')).toEqual(false);
});
});
describe('isCmd', function () {