Sha256: e1029c09f0e6fd19d05077c6315642a70b7758c5dc9d86d3b2d458243efa4a2b

Contents?: true

Size: 1.72 KB

Versions: 9

Compression:

Stored size: 1.72 KB

Contents

// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_URI_H_
#define V8_URI_H_

#include "src/allocation.h"
#include "src/objects.h"

namespace v8 {
namespace internal {

class Uri : public AllStatic {
 public:
  // ES6 section 18.2.6.2 decodeURI (encodedURI)
  static MaybeHandle<String> DecodeUri(Isolate* isolate, Handle<String> uri) {
    return Decode(isolate, uri, true);
  }

  // ES6 section 18.2.6.3 decodeURIComponent (encodedURIComponent)
  static MaybeHandle<String> DecodeUriComponent(Isolate* isolate,
                                                Handle<String> component) {
    return Decode(isolate, component, false);
  }

  // ES6 section 18.2.6.4 encodeURI (uri)
  static MaybeHandle<String> EncodeUri(Isolate* isolate, Handle<String> uri) {
    return Encode(isolate, uri, true);
  }

  // ES6 section 18.2.6.5 encodeURIComponenet (uriComponent)
  static MaybeHandle<String> EncodeUriComponent(Isolate* isolate,
                                                Handle<String> component) {
    return Encode(isolate, component, false);
  }

  // ES6 section B.2.1.1 escape (string)
  static MaybeHandle<String> Escape(Isolate* isolate, Handle<String> string);

  // ES6 section B.2.1.2 unescape (string)
  static MaybeHandle<String> Unescape(Isolate* isolate, Handle<String> string);

 private:
  static MaybeHandle<String> Decode(Isolate* isolate, Handle<String> uri,
                                    bool is_uri);
  static MaybeHandle<String> Encode(Isolate* isolate, Handle<String> uri,
                                    bool is_uri);
};

}  // namespace internal
}  // namespace v8

#endif  // V8_URI_H_

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
libv8-6.0.286.54.1 vendor/v8/src/uri.h
libv8-6.0.286.54.0 vendor/v8/src/uri.h
libv8-6.0.286.54.0beta2 vendor/v8/src/uri.h
libv8-6.0.286.54.0beta1 vendor/v8/src/uri.h
libv8-6.0.286.44.0beta1 vendor/v8/src/uri.h
node-compiler-0.9.1 vendor/node/deps/v8/src/uri.h
node-compiler-0.9.0 vendor/node-v7.2.1/deps/v8/src/uri.h
node-compiler-0.8.0 vendor/node-v7.2.0/deps/v8/src/uri.h
node-compiler-0.7.0 vendor/node-v7.1.0/deps/v8/src/uri.h