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:
commit
b4c8814fc9
6 changed files with 23 additions and 27 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue