Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonBall authored and danbev committed Jan 14, 2022
1 parent 71fa3b3 commit a4a0fa2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class V8_EXPORT FunctionTemplate : public Template {
```
Rememeber that a function in javascript can have properties just like object.

There is an example in [functionttemplate_test.cc](./test/functiontemplate_test.cc)
There is an example in [functiontemplate_test.cc](./test/functiontemplate_test.cc)

An instance of a function template can be created using:
```c++
Expand Down
4 changes: 2 additions & 2 deletions test/objecttemplate_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ TEST_F(ObjectTemplateTest, AddProperty) {
MaybeLocal<Array> maybe_names = obj->GetPropertyNames(context);
Local<Array> names = maybe_names.ToLocalChecked();
EXPECT_EQ(static_cast<int>(names->Length()), 1);
// If found it iteresting that Array does not have any methods except Length()
// and thress static methods (New, New, and Cast). Since Array extends Object
// If found it interesting that Array does not have any methods except Length()
// and three static methods (New, New, and Cast). Since Array extends Object
// we can use Object::Get with the index:
Local<Value> name_from_array = names->Get(context, 0).ToLocalChecked();
String::Utf8Value utf8_name{isolate_, name_from_array};
Expand Down

0 comments on commit a4a0fa2

Please sign in to comment.