GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — node/src/node_util.cc at 6526ae7b37316e301ff12accd2671640ae4a48c1 · ppaugh/node Expand file tree/ Copy pathnode_util.ccMore file actions 112 lines (81 loc) · 2.96 KB / Copy pathnode_util.ccFile metadata and controls112 lines (81 loc) · 2.96 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 #include "node.h" #include "v8.h" #include "env.h" #include "env-inl.h" namespace node { namespace util { using v8::Context; using v8::FunctionCallbackInfo; using v8::Local; using v8::Object; using v8::String; using v8::Value; static void IsRegExp(const FunctionCallbackInfo<Value>& args) { CHECK_EQ(1, args.Length()); args.GetReturnValue().Set(args[0]->IsRegExp()); } static void IsDate(const FunctionCallbackInfo<Value>& args) { CHECK_EQ(1, args.Length()); args.GetReturnValue().Set(args[0]->IsDate()); } static void IsMap(const FunctionCallbackInfo<Value>& args) { CHECK_EQ(1, args.Length()); args.GetReturnValue().Set(args[0]->IsMap()); } static void IsMapIterator(const FunctionCallbackInfo<Value>& args) { CHECK_EQ(1, args.Length()); args.GetReturnValue().Set(args[0]->IsMapIterator()); } static void IsSet(const FunctionCallbackInfo<Value>& args) { CHECK_EQ(1, args.Length()); args.GetReturnValue().Set(args[0]->IsSet()); } static void IsSetIterator(const FunctionCallbackInfo<Value>& args) { CHECK_EQ(1, args.Length()); args.GetReturnValue().Set(args[0]->IsSetIterator()); } static void IsPromise(const FunctionCallbackInfo<Value>& args) { CHECK_EQ(1, args.Length()); args.GetReturnValue().Set(args[0]->IsPromise()); } static void IsTypedArray(const FunctionCallbackInfo<Value>& args) { CHECK_EQ(1, args.Length()); args.GetReturnValue().Set(args[0]->IsTypedArray()); } static void IsArrayBuffer(const FunctionCallbackInfo<Value>& args) { CHECK_EQ(1, args.Length()); args.GetReturnValue().Set(args[0]->IsArrayBuffer()); } static void IsDataView(const FunctionCallbackInfo<Value>& args) { CHECK_EQ(1, args.Length()); args.GetReturnValue().Set(args[0]->IsDataView()); } static void GetHiddenValue(const FunctionCallbackInfo<Value>& args) { Environment* env = Environment::GetCurrent(args); if (!args[0]->IsObject()) return env->ThrowTypeError("obj must be an object"); if (!args[1]->IsString()) return env->ThrowTypeError("name must be a string"); Local<Object> obj = args[0].As<Object>(); Local<String> name = args[1].As<String>(); args.GetReturnValue().Set(obj->GetHiddenValue(name)); } void Initialize(Local<Object> target, Local<Value> unused, Local<Context> context) { Environment* env = Environment::GetCurrent(context); env->SetMethod(target, "isRegExp", IsRegExp); env->SetMethod(target, "isDate", IsDate); env->SetMethod(target, "isMap", IsMap); env->SetMethod(target, "isMapIterator", IsMapIterator); env->SetMethod(target, "isSet", IsSet); env->SetMethod(target, "isSetIterator", IsSetIterator); env->SetMethod(target, "isPromise", IsPromise); env->SetMethod(target, "isTypedArray", IsTypedArray); env->SetMethod(target, "isArrayBuffer", IsArrayBuffer); env->SetMethod(target, "isDataView", IsDataView); env->SetMethod(target, "getHiddenValue", GetHiddenValue); } } // namespace util } // namespace node NODE_MODULE_CONTEXT_AWARE_BUILTIN(util, node::util::Initialize) |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |