1
0
Fork 0

Merge branch 'devel' of https://github.com/arangodb/arangodb into json_agency_comm

This commit is contained in:
Kaveh Vahedipour 2016-05-04 17:06:23 +02:00
commit e623198d6c
154 changed files with 5153 additions and 4222 deletions

View File

@ -360,9 +360,9 @@ else ()
option(USE_DEBUG_V8 "compile V8 in DEBUG mode" OFF)
set(V8_CFLAGS "")
set(V8_CXXFLAGS "")
set(V8_LDFLAGS "")
set(V8_CFLAGS "$ENV{V8_CFLAGS}")
set(V8_CXXFLAGS "$ENV{V8_CXXFLAGS}")
set(V8_LDFLAGS "$ENV{V8_LDFLAGS}")
if (USE_DEBUG_V8)
set(V8_TARGET_ARCH "${V8_PROC_ARCH}.debug")

View File

@ -2242,7 +2242,7 @@ int InputBuffer::incrementalHistorySearch(PromptBase& pi, int startChar) {
historyLinePosition); // draw user's text with our prompt
// loop until we get an exit character
int c;
int c = 0;
bool keepLooping = true;
bool useSearchedLine = true;
bool searchAgain = false;

View File

@ -75,7 +75,11 @@ set(TEST_GEO_SUITE geo_suite)
## VERSION FILES
################################################################################
string(TIMESTAMP ARANGODB_BUILD_DATE "%Y-%m-%d %H:%M:%S")
if (${CMAKE_MAJOR_VERSION} EQUAL 2)
set(ARANGODB_BUILD_DATE "YYYY-MM-DD HH:MM:SS")
else ()
string(TIMESTAMP ARANGODB_BUILD_DATE "%Y-%m-%d %H:%M:%S")
endif ()
configure_file (
"${CMAKE_CURRENT_SOURCE_DIR}/lib/Basics/build.h.in"
@ -146,8 +150,6 @@ else ()
set(MAKE make)
endif ()
find_package(FLEX)
find_package(BISON)
find_package(PythonInterp 2 REQUIRED)
get_filename_component(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} REALPATH)
@ -352,6 +354,9 @@ option(USE_MAINTAINER_MODE
if (USE_MAINTAINER_MODE)
add_definitions("-DARANGODB_ENABLE_MAINTAINER_MODE=1")
find_package(FLEX)
find_package(BISON)
endif ()
################################################################################
@ -768,9 +773,9 @@ list(INSERT SYSTEM_LIBRARIES 0
${ICU_LIBS}
${OPENSSL_LIBRARIES}
${BASE_LIBS}
${CMAKE_THREAD_LIBS_INIT}
${CMAKE_DL_LIBS}
${SYS_LIBS}
${CMAKE_THREAD_LIBS_INIT}
)
add_subdirectory(lib)

View File

@ -24,7 +24,7 @@ We use [the city graph](../Graphs/README.md#the-city-graph) and its geo indices:
@END_EXAMPLE_ARANGOSH_OUTPUT
@endDocuBlock COMBINING_GRAPH_01_create_graph
We search all german cities in a range of 400 km around the ex-capital **Bonn**: **Hambung** and **Cologne**.
We search all german cities in a range of 400 km around the ex-capital **Bonn**: **Hamburg** and **Cologne**.
We won't find **Paris** since its in the `frenchCity` collection.
@startDocuBlockInline COMBINING_GRAPH_02_combine

View File

@ -58,7 +58,6 @@
* [Skiplists](Indexing/Skiplist.md)
* [Fulltext Indexes](Indexing/Fulltext.md)
* [Geo Indexes](Indexing/Geo.md)
* [Cap Constraint](Indexing/Cap.md)
#
* [Graphs](Graphs/README.md)
* [General Graphs](Graphs/GeneralGraphs/README.md)

View File

@ -5,6 +5,6 @@ if [ purge = "$1" ]; then
rm -rf /usr/share/arangodb/js/apps
rm -rf /var/log/arangodb
rm -rf /var/lib/arangodb
rm -rf /var/lib/arangodb-apps
rm -rf /var/lib/arangodb3
rm -rf /var/lib/arangodb3-apps
fi

View File

@ -32,8 +32,8 @@ start () {
[ -d /var/run/arangodb ] || mkdir /var/run/arangodb || exit 1
( cd /var/log/arangodb && chown -R arangodb:arangodb . ) || exit 1
( cd /var/lib/arangodb && chown -R arangodb:arangodb . ) || exit 1
( cd /var/lib/arangodb-apps && chown -R arangodb:arangodb . ) || exit 1
( cd /var/lib/arangodb3 && chown -R arangodb:arangodb . ) || exit 1
( cd /var/lib/arangodb3-apps && chown -R arangodb:arangodb . ) || exit 1
( cd /var/run/arangodb && chown -R arangodb:arangodb . ) || exit 1
( cd $PIDDIR && chown arangodb:arangodb . ) || exit 1

View File

@ -15,7 +15,7 @@ for script in $SCRIPTS; do
echo "export ROOTDIR=\"${ROOTDIR}/Contents/MacOS/opt/arangodb\""
echo
echo "exec \"\${ROOTDIR}/$script\" -c \"\${ROOTDIR}/etc/arangodb/${base}.conf\" \$*"
echo "exec \"\${ROOTDIR}/$script\" -c \"\${ROOTDIR}/etc/arangodb3/${base}.conf\" \$*"
) > ${ROOTDIR}/Contents/MacOS/$base.$$
chmod 755 ${ROOTDIR}/Contents/MacOS/$base.$$
@ -52,7 +52,7 @@ INFOFILE="/tmp/ArangoDB-CLI.info.$$"
echo "ArangoDB server has been started"
echo ""
echo "The database directory is located at"
echo " '${ROOTDIR}/Contents/MacOS/opt/arangodb/var/lib/arangodb'"
echo " '${ROOTDIR}/Contents/MacOS/opt/arangodb/var/lib/arangodb3'"
echo ""
echo "The log file is located at"
echo " '${ROOTDIR}/Contents/MacOS/opt/arangodb/var/log/arangodb/arangod.log'"

View File

@ -1,3 +1,3 @@
/var/lib/arangodb
/var/lib/arangodb-apps
/var/lib/arangodb3
/var/lib/arangodb3-apps
/var/log/arangodb

View File

@ -18,7 +18,7 @@ DESC="arango database server"
NAME="arangod"
PIDDIR=/var/run/arangodb
PIDFILE=/var/run/arangodb/arangod.pid
CONF=/etc/arangodb/arangod.conf
CONF=/etc/arangodb3/arangod.conf
test -x $DAEMON || exit 0
@ -31,8 +31,8 @@ start () {
[ -d $PIDDIR ] || mkdir $PIDDIR || exit 1
( cd /var/log/arangodb && chown -R arangodb:arangodb . ) || exit 1
( cd /var/lib/arangodb && chown -R arangodb:arangodb . ) || exit 1
( cd /var/lib/arangodb-apps && chown -R arangodb:arangodb . ) || exit 1
( cd /var/lib/arangodb3 && chown -R arangodb:arangodb . ) || exit 1
( cd /var/lib/arangodb3-apps && chown -R arangodb:arangodb . ) || exit 1
( cd $PIDDIR && chown arangodb:arangodb . ) || exit 1
if [ "$1" = "--upgrade" ]; then

View File

@ -6,7 +6,7 @@ set -e
if [ purge = "$1" ]; then
rm -rf /usr/share/arangodb/js/apps
rm -rf /var/log/arangodb
rm -rf /var/lib/arangodb
rm -rf /var/lib/arangodb-apps
rm -rf /var/lib/arangodb3
rm -rf /var/lib/arangodb3-apps
rm -rf /var/run/arangodb
fi

View File

@ -4,8 +4,8 @@ set -e
getent group arangodb >/dev/null || groupadd -r arangodb
getent passwd arangodb >/dev/null || useradd -r -g arangodb -d /usr/share/arangodb -s /bin/false -c "ArangoDB Application User" arangodb
install -o arangodb -g arangodb -m 755 -d /var/lib/arangodb
install -o arangodb -g arangodb -m 755 -d /var/lib/arangodb-apps
install -o arangodb -g arangodb -m 755 -d /var/lib/arangodb3
install -o arangodb -g arangodb -m 755 -d /var/lib/arangodb3-apps
install -o arangodb -g arangodb -m 755 -d /var/log/arangodb
#DEBHELPER#

View File

@ -2,12 +2,18 @@
set -e
TAG=1
BOOK=1
if [ "$1" == "--no-commit" ]; then
TAG=0
shift
fi
if [ "$1" == "--no-book" ]; then
BOOK=0
shift
fi
if [ "$#" -ne 1 ]; then
echo "usage: $0 <major>.<minor>.<revision>"
exit 1
@ -45,7 +51,6 @@ if [ `uname` == "Darwin" ]; then
CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11"
fi
if test 0 = 1; then
echo "COMPILING"
rm -rf build && mkdir build
@ -54,7 +59,6 @@ rm -rf build && mkdir build
cmake .. ${CMAKE_CONFIGURE}
make -j 8
)
fi
echo "LINTING"
./utils/jslint.sh
@ -86,8 +90,10 @@ echo "GRUNT"
git add -f Documentation/Examples/*.generated
echo "DOCUMENTATION"
cd Documentation/Books; make
if [ "$BOOK" == "1" ]; then
echo "DOCUMENTATION"
(cd Documentation/Books; make)
fi
case "$TAG" in
*-alpha*|*-beta*|devel)

View File

@ -34,7 +34,7 @@ add_executable(${TEST_BASICS_SUITE}
../lib/Basics/WorkMonitorDummy.cpp
)
target_include_directories(
include_directories(
${TEST_BASICS_SUITE}
PUBLIC ${Boost_UNIT_TEST_INCLUDE_DIR}
)

View File

@ -44,14 +44,14 @@ AqlValue::AqlValue(TRI_doc_mptr_t const* mptr) {
}
/// @brief hashes the value
uint64_t AqlValue::hash(arangodb::AqlTransaction* trx) const {
uint64_t AqlValue::hash(arangodb::AqlTransaction* trx, uint64_t seed) const {
switch (type()) {
case VPACK_SLICE_POINTER:
case VPACK_INLINE:
case VPACK_MANAGED: {
// we must use the slow hash function here, because a value may have
// different representations in case its an array/object/number
return slice().normalizedHash();
return slice().normalizedHash(seed);
}
case DOCVEC:
case RANGE: {
@ -59,7 +59,7 @@ uint64_t AqlValue::hash(arangodb::AqlTransaction* trx) const {
toVelocyPack(trx, builder, false);
// we must use the slow hash function here, because a value may have
// different representations in case its an array/object/number
return builder.slice().normalizedHash();
return builder.slice().normalizedHash(seed);
}
}
@ -954,6 +954,8 @@ int AqlValue::Compare(arangodb::AqlTransaction* trx, AqlValue const& left,
size_t ritem = 0;
size_t const lsize = left._data.docvec->size();
size_t const rsize = right._data.docvec->size();
size_t lrows = left._data.docvec->at(0)->size();
size_t rrows = right._data.docvec->at(0)->size();
while (lblock < lsize && rblock < rsize) {
AqlValue const& lval = left._data.docvec->at(lblock)->getValueReference(litem, 0);
@ -964,13 +966,19 @@ int AqlValue::Compare(arangodb::AqlTransaction* trx, AqlValue const& left,
if (cmp != 0) {
return cmp;
}
if (++litem == lsize) {
if (++litem == lrows) {
litem = 0;
lblock++;
if (lblock < lsize) {
lrows = left._data.docvec->at(lblock)->size();
}
}
if (++ritem == rsize) {
if (++ritem == rrows) {
ritem = 0;
rblock++;
if (rblock < rsize) {
rrows = right._data.docvec->at(rblock)->size();
}
}
}

View File

@ -87,7 +87,7 @@ struct AqlValue final {
public:
// construct an empty AqlValue
// note: this is the default constructor and should be as cheap as possible
AqlValue() {
AqlValue() noexcept {
// construct a slice of type None
_data.internal[0] = '\x00';
setType(AqlValueType::VPACK_INLINE);
@ -180,7 +180,7 @@ struct AqlValue final {
}
/// @brief hashes the value
uint64_t hash(arangodb::AqlTransaction*) const;
uint64_t hash(arangodb::AqlTransaction*, uint64_t seed = 0xdeadbeef) const;
/// @brief whether or not the value contains a none value
bool isNone() const;
@ -280,7 +280,8 @@ struct AqlValue final {
/// @brief invalidates/resets a value to None, not freeing any memory
void erase() {
initFromSlice(arangodb::velocypack::Slice());
_data.internal[0] = '\x00';
setType(AqlValueType::VPACK_INLINE);
}
/// @brief destroy, explicit destruction, only when needed
@ -330,7 +331,7 @@ struct AqlValue final {
}
/// @brief sets the value type
inline void setType(AqlValueType type) {
inline void setType(AqlValueType type) noexcept {
_data.internal[sizeof(_data.internal) - 1] = type;
}
};
@ -357,6 +358,51 @@ struct AqlValueMaterializer {
explicit AqlValueMaterializer(arangodb::AqlTransaction* trx)
: trx(trx), materialized(), hasCopied(false) {}
AqlValueMaterializer(AqlValueMaterializer const& other)
: trx(other.trx), materialized(other.materialized), hasCopied(other.hasCopied) {
if (other.hasCopied) {
// copy other's slice
materialized = other.materialized.clone();
}
}
AqlValueMaterializer& operator=(AqlValueMaterializer const& other) {
if (this != &other) {
TRI_ASSERT(trx == other.trx); // must be from same transaction
if (hasCopied) {
// destroy our own slice
materialized.destroy();
hasCopied = false;
}
// copy other's slice
materialized = other.materialized.clone();
hasCopied = other.hasCopied;
}
return *this;
}
AqlValueMaterializer(AqlValueMaterializer&& other) noexcept
: trx(other.trx), materialized(other.materialized), hasCopied(other.hasCopied) {
// reset other
other.hasCopied = false;
other.materialized = AqlValue();
}
AqlValueMaterializer& operator=(AqlValueMaterializer&& other) noexcept {
if (this != &other) {
TRI_ASSERT(trx == other.trx); // must be from same transaction
if (hasCopied) {
// destroy our own slice
materialized.destroy();
}
// reset other
materialized = other.materialized;
hasCopied = other.hasCopied;
other.materialized = AqlValue();
}
return *this;
}
~AqlValueMaterializer() {
if (hasCopied) {
materialized.destroy();

View File

@ -1413,7 +1413,9 @@ AstNode* Ast::replaceVariableReference(AstNode* node, Variable const* variable,
void Ast::validateAndOptimize() {
struct TraversalContext {
std::unordered_set<std::string> writeCollectionsSeen;
std::unordered_map<std::string, int64_t> collectionsFirstSeen;
int64_t stopOptimizationRequests = 0;
int64_t nestingLevel = 0;
bool isInFilter = false;
bool hasSeenAnyWriteNode = false;
bool hasSeenWriteNodeInCurrentScope = false;
@ -1430,8 +1432,14 @@ void Ast::validateAndOptimize() {
// NOOPT will turn all function optimizations off
++(static_cast<TraversalContext*>(data)->stopOptimizationRequests);
}
} else if (node->type == NODE_TYPE_COLLECTION) {
// note the level on which we first saw a collection
auto c = static_cast<TraversalContext*>(data);
c->collectionsFirstSeen.emplace(node->getString(), c->nestingLevel);
} else if (node->type == NODE_TYPE_AGGREGATIONS) {
++(static_cast<TraversalContext*>(data)->stopOptimizationRequests);
} else if (node->type == NODE_TYPE_SUBQUERY) {
++static_cast<TraversalContext*>(data)->nestingLevel;
} else if (node->hasFlag(FLAG_BIND_PARAMETER)) {
return false;
} else if (node->type == NODE_TYPE_REMOVE ||
@ -1454,6 +1462,8 @@ void Ast::validateAndOptimize() {
auto postVisitor = [&](AstNode const* node, void* data) -> void {
if (node->type == NODE_TYPE_FILTER) {
static_cast<TraversalContext*>(data)->isInFilter = false;
} else if (node->type == NODE_TYPE_SUBQUERY) {
--static_cast<TraversalContext*>(data)->nestingLevel;
} else if (node->type == NODE_TYPE_REMOVE ||
node->type == NODE_TYPE_INSERT ||
node->type == NODE_TYPE_UPDATE ||
@ -1468,6 +1478,16 @@ void Ast::validateAndOptimize() {
auto collection = node->getMember(1);
std::string name = collection->getString();
c->writeCollectionsSeen.emplace(name);
auto it = c->collectionsFirstSeen.find(name);
if (it != c->collectionsFirstSeen.end()) {
if ((*it).second < c->nestingLevel) {
name = "collection '" + name;
name.push_back('\'');
THROW_ARANGO_EXCEPTION_PARAMS(TRI_ERROR_QUERY_ACCESS_AFTER_MODIFICATION, name.c_str());
}
}
} else if (node->type == NODE_TYPE_FCALL) {
auto func = static_cast<Function*>(node->getData());
TRI_ASSERT(func != nullptr);
@ -1547,7 +1567,9 @@ void Ast::validateAndOptimize() {
!func->canRunOnDBServer) {
// if canRunOnDBServer is true, then this is an indicator for a
// document-accessing function
THROW_ARANGO_EXCEPTION(TRI_ERROR_QUERY_ACCESS_AFTER_MODIFICATION);
std::string name("function ");
name.append(func->externalName);
THROW_ARANGO_EXCEPTION_PARAMS(TRI_ERROR_QUERY_ACCESS_AFTER_MODIFICATION, name.c_str());
}
if (static_cast<TraversalContext*>(data)->stopOptimizationRequests == 0) {
@ -1587,9 +1609,12 @@ void Ast::validateAndOptimize() {
// collection
if (node->type == NODE_TYPE_COLLECTION) {
auto c = static_cast<TraversalContext*>(data);
if (c->writeCollectionsSeen.find(node->getString()) != c->writeCollectionsSeen.end()) {
THROW_ARANGO_EXCEPTION(TRI_ERROR_QUERY_ACCESS_AFTER_MODIFICATION);
std::string name("collection '");
name.append(node->getString());
name.push_back('\'');
THROW_ARANGO_EXCEPTION_PARAMS(TRI_ERROR_QUERY_ACCESS_AFTER_MODIFICATION, name.c_str());
}
return node;
@ -1599,7 +1624,7 @@ void Ast::validateAndOptimize() {
if (node->type == NODE_TYPE_TRAVERSAL) {
// traversals must not be used after a modification operation
if (static_cast<TraversalContext*>(data)->hasSeenAnyWriteNode) {
THROW_ARANGO_EXCEPTION(TRI_ERROR_QUERY_ACCESS_AFTER_MODIFICATION);
THROW_ARANGO_EXCEPTION_PARAMS(TRI_ERROR_QUERY_ACCESS_AFTER_MODIFICATION, "traversal");
}
return node;

View File

@ -624,8 +624,8 @@ int HashedCollectBlock::getOrSkipSome(size_t atLeast, size_t atMost,
for (auto& it2 : *(it.second)) {
delete it2;
}
delete it.second;
}
delete it.second;
}
allGroups.clear();
};
@ -832,7 +832,8 @@ size_t HashedCollectBlock::GroupKeyHash::operator()(
for (auto const& it : value) {
// we must use the slow hash function here, because a value may have
// different representations in case its an array/object/number
hash ^= it.hash(_trx);
// (calls normalizedHash() internally)
hash = it.hash(_trx, hash);
}
return static_cast<size_t>(hash);

View File

@ -368,6 +368,7 @@ static void AppendAsString(arangodb::AqlTransaction* trx,
/// @brief Checks if the given list contains the element
static bool ListContainsElement(arangodb::AqlTransaction* trx,
VPackOptions const* options,
AqlValue const& list,
AqlValue const& testee, size_t& index) {
TRI_ASSERT(list.isArray());
@ -379,7 +380,7 @@ static bool ListContainsElement(arangodb::AqlTransaction* trx,
VPackArrayIterator it(slice);
while (it.valid()) {
if (arangodb::basics::VelocyPackHelper::compare(testeeSlice, it.value(), false) == 0) {
if (arangodb::basics::VelocyPackHelper::compare(testeeSlice, it.value(), false, options) == 0) {
index = it.index();
return true;
}
@ -390,12 +391,13 @@ static bool ListContainsElement(arangodb::AqlTransaction* trx,
/// @brief Checks if the given list contains the element
/// DEPRECATED
static bool ListContainsElement(VPackSlice const& list,
static bool ListContainsElement(VPackOptions const* options,
VPackSlice const& list,
VPackSlice const& testee, size_t& index) {
TRI_ASSERT(list.isArray());
for (size_t i = 0; i < static_cast<size_t>(list.length()); ++i) {
if (arangodb::basics::VelocyPackHelper::compare(testee, list.at(i),
false) == 0) {
false, options) == 0) {
index = i;
return true;
}
@ -403,9 +405,11 @@ static bool ListContainsElement(VPackSlice const& list,
return false;
}
static bool ListContainsElement(VPackSlice const& list, VPackSlice const& testee) {
static bool ListContainsElement(VPackOptions const* options,
VPackSlice const& list,
VPackSlice const& testee) {
size_t unused;
return ListContainsElement(list, testee, unused);
return ListContainsElement(options, list, testee, unused);
}
/// @brief Computes the Variance of the given list.
@ -743,8 +747,6 @@ static AqlValue VertexIdsToAqlValueVPack(arangodb::aql::Query* query,
return AqlValue(builder.get());
}
/// @brief Load geoindex for collection name
static arangodb::Index* getGeoIndex(arangodb::AqlTransaction* trx,
TRI_voc_cid_t const& cid,
@ -976,13 +978,13 @@ AqlValue Functions::ToArray(arangodb::aql::Query* query,
if (value.isArray()) {
// return copy of the original array
return AqlValue(value);
return value.clone();
}
if (value.isNull(true)) {
return AqlValue(arangodb::basics::VelocyPackHelper::EmptyArrayValue());
}
TransactionBuilderLeaser builder(trx);
builder->openArray();
if (value.isBoolean() || value.isNumber() || value.isString()) {
@ -993,7 +995,11 @@ AqlValue Functions::ToArray(arangodb::aql::Query* query,
VPackSlice slice = materializer.slice(value, false);
// return an array with the attribute values
for (auto const& it : VPackObjectIterator(slice, true)) {
builder->add(it.value);
if (it.value.isCustom()) {
builder->add(VPackValue(trx->extractIdString(slice)));
} else {
builder->add(it.value);
}
}
}
builder->close();
@ -1684,11 +1690,13 @@ AqlValue Functions::Unique(arangodb::aql::Query* query,
AqlValueMaterializer materializer(trx);
VPackSlice slice = materializer.slice(value, false);
std::unordered_set<VPackSlice,
arangodb::basics::VelocyPackHelper::VPackHash,
VPackOptions options;
options.customTypeHandler =
trx->transactionContext()->orderCustomTypeHandler().get();
std::unordered_set<VPackSlice, arangodb::basics::VelocyPackHelper::VPackHash,
arangodb::basics::VelocyPackHelper::VPackEqual>
values(512, arangodb::basics::VelocyPackHelper::VPackHash(),
arangodb::basics::VelocyPackHelper::VPackEqual());
arangodb::basics::VelocyPackHelper::VPackEqual(&options));
for (auto const& s : VPackArrayIterator(slice)) {
if (!s.isNone()) {
@ -1802,13 +1810,16 @@ AqlValue Functions::UnionDistinct(arangodb::aql::Query* query,
ValidateParameters(parameters, "UNION_DISTINCT", 2);
size_t const n = parameters.size();
std::unordered_set<VPackSlice,
arangodb::basics::VelocyPackHelper::VPackHash,
VPackOptions options;
options.customTypeHandler =
trx->transactionContext()->orderCustomTypeHandler().get();
std::unordered_set<VPackSlice, arangodb::basics::VelocyPackHelper::VPackHash,
arangodb::basics::VelocyPackHelper::VPackEqual>
values(512, arangodb::basics::VelocyPackHelper::VPackHash(),
arangodb::basics::VelocyPackHelper::VPackEqual());
arangodb::basics::VelocyPackHelper::VPackEqual(&options));
std::vector<AqlValueMaterializer> materializers;
materializers.reserve(n);
for (size_t i = 0; i < n; ++i) {
AqlValue value = ExtractFunctionParameterValue(trx, parameters, i);
@ -1818,8 +1829,8 @@ AqlValue Functions::UnionDistinct(arangodb::aql::Query* query,
return AqlValue(arangodb::basics::VelocyPackHelper::NullValue());
}
AqlValueMaterializer materializer(trx);
VPackSlice slice = materializer.slice(value, false);
materializers.emplace_back(trx);
VPackSlice slice = materializers.back().slice(value, false);
for (auto const& v : VPackArrayIterator(slice)) {
if (values.find(v) == values.end()) {
@ -1861,14 +1872,20 @@ AqlValue Functions::Intersection(arangodb::aql::Query* query,
arangodb::AqlTransaction* trx,
VPackFunctionParameters const& parameters) {
ValidateParameters(parameters, "INTERSECTION", 2);
VPackOptions options;
options.customTypeHandler =
trx->transactionContext()->orderCustomTypeHandler().get();
std::unordered_map<VPackSlice, size_t,
arangodb::basics::VelocyPackHelper::VPackHash,
arangodb::basics::VelocyPackHelper::VPackEqual>
values(512, arangodb::basics::VelocyPackHelper::VPackHash(),
arangodb::basics::VelocyPackHelper::VPackEqual());
arangodb::basics::VelocyPackHelper::VPackEqual(&options));
size_t const n = parameters.size();
std::vector<AqlValueMaterializer> materializers;
materializers.reserve(n);
for (size_t i = 0; i < n; ++i) {
AqlValue value = ExtractFunctionParameterValue(trx, parameters, i);
@ -1878,8 +1895,8 @@ AqlValue Functions::Intersection(arangodb::aql::Query* query,
return AqlValue(arangodb::basics::VelocyPackHelper::NullValue());
}
AqlValueMaterializer materializer(trx);
VPackSlice slice = materializer.slice(value, false);
materializers.emplace_back(trx);
VPackSlice slice = materializers.back().slice(value, false);
for (auto const& it : VPackArrayIterator(slice)) {
if (i == 0) {
@ -2346,12 +2363,14 @@ AqlValue Functions::Minus(arangodb::aql::Query* query,
return AqlValue(arangodb::basics::VelocyPackHelper::NullValue());
}
std::unordered_map<VPackSlice,
size_t,
VPackOptions options;
options.customTypeHandler =
trx->transactionContext()->orderCustomTypeHandler().get();
std::unordered_map<VPackSlice, size_t,
arangodb::basics::VelocyPackHelper::VPackHash,
arangodb::basics::VelocyPackHelper::VPackEqual>
contains(512, arangodb::basics::VelocyPackHelper::VPackHash(),
arangodb::basics::VelocyPackHelper::VPackEqual());
arangodb::basics::VelocyPackHelper::VPackEqual(&options));
// Fill the original map
AqlValueMaterializer materializer(trx);
@ -2541,6 +2560,7 @@ AqlValue Functions::Edges(arangodb::aql::Query* query,
// We might have examples
AqlValue exampleValue = ExtractFunctionParameterValue(trx, parameters, 3);
if ((exampleValue.isArray() && exampleValue.length() != 0) || exampleValue.isObject()) {
// TODO CHECK SURVIVAL
AqlValueMaterializer materializer(trx);
VPackSlice exampleSlice = materializer.slice(exampleValue, false);
@ -2750,9 +2770,12 @@ AqlValue Functions::Push(arangodb::aql::Query* query,
for (auto const& it : VPackArrayIterator(l)) {
builder->add(it);
}
VPackOptions options;
options.customTypeHandler =
trx->transactionContext()->orderCustomTypeHandler().get();
if (parameters.size() == 3) {
AqlValue unique = ExtractFunctionParameterValue(trx, parameters, 2);
if (!unique.toBoolean() || !ListContainsElement(l, p)) {
if (!unique.toBoolean() || !ListContainsElement(&options, l, p)) {
builder->add(p);
}
} else {
@ -2809,36 +2832,54 @@ AqlValue Functions::Append(arangodb::aql::Query* query,
return list.clone();
}
AqlValueMaterializer toAppendMaterializer(trx);
VPackSlice t = toAppendMaterializer.slice(toAppend, false);
if (t.isArray() && t.length() == 0) {
return list.clone();
}
bool unique = false;
if (parameters.size() == 3) {
AqlValue a = ExtractFunctionParameterValue(trx, parameters, 2);
unique = a.toBoolean();
}
AqlValueMaterializer toAppendMaterializer(trx);
VPackSlice t = toAppendMaterializer.slice(toAppend, false);
AqlValueMaterializer materializer(trx);
VPackSlice l = materializer.slice(list, false);
TransactionBuilderLeaser builder(trx);
builder->openArray();
VPackOptions options;
options.customTypeHandler =
trx->transactionContext()->orderCustomTypeHandler().get();
if (!list.isNull(true)) {
TRI_ASSERT(list.isArray());
for (auto const& it : VPackArrayIterator(l)) {
builder->add(it);
if (list.isArray()) {
for (auto const& it : VPackArrayIterator(l)) {
builder->add(it);
}
}
}
if (!toAppend.isArray()) {
if (!unique || !ListContainsElement(l, t)) {
if (!unique || !ListContainsElement(&options, l, t)) {
builder->add(t);
}
} else {
AqlValueMaterializer materializer(trx);
VPackSlice slice = materializer.slice(toAppend, false);
for (auto const& it : VPackArrayIterator(slice)) {
if (!unique || !ListContainsElement(l, it)) {
if (unique) {
std::unordered_set<VPackSlice> added;
added.reserve(slice.length());
for (auto const& it : VPackArrayIterator(slice)) {
if (added.find(it) == added.end() &&
!ListContainsElement(&options, l, it)) {
builder->add(it);
added.emplace(it);
}
}
} else {
for (auto const& it : VPackArrayIterator(slice)) {
builder->add(it);
}
}
@ -2866,8 +2907,12 @@ AqlValue Functions::Unshift(arangodb::aql::Query* query,
unique = a.toBoolean();
}
VPackOptions options;
options.customTypeHandler =
trx->transactionContext()->orderCustomTypeHandler().get();
size_t unused;
if (unique && list.isArray() && ListContainsElement(trx, list, toAppend, unused)) {
if (unique && list.isArray() &&
ListContainsElement(trx, &options, list, toAppend, unused)) {
// Short circuit, nothing to do return list
return list.clone();
}
@ -3003,6 +3048,9 @@ AqlValue Functions::RemoveValues(arangodb::aql::Query* query,
return AqlValue(arangodb::basics::VelocyPackHelper::NullValue());
}
VPackOptions options;
options.customTypeHandler =
trx->transactionContext()->orderCustomTypeHandler().get();
try {
AqlValueMaterializer valuesMaterializer(trx);
VPackSlice v = valuesMaterializer.slice(values, false);
@ -3013,13 +3061,13 @@ AqlValue Functions::RemoveValues(arangodb::aql::Query* query,
TransactionBuilderLeaser builder(trx);
builder->openArray();
for (auto const& it : VPackArrayIterator(l)) {
if (!ListContainsElement(v, it)) {
if (!ListContainsElement(&options, v, it)) {
builder->add(it);
}
}
builder->close();
return AqlValue(builder.get());
} catch (...) {
} catch (std::bad_alloc const&) {
THROW_ARANGO_EXCEPTION(TRI_ERROR_OUT_OF_MEMORY);
}
}
@ -3444,9 +3492,12 @@ AqlValue Functions::Position(arangodb::aql::Query* query,
if (list.length() > 0) {
AqlValue searchValue = ExtractFunctionParameterValue(trx, parameters, 1);
VPackOptions options;
options.customTypeHandler =
trx->transactionContext()->orderCustomTypeHandler().get();
size_t index;
if (ListContainsElement(trx, list, searchValue, index)) {
if (ListContainsElement(trx, &options, list, searchValue, index)) {
if (!returnIndex) {
// return true
return AqlValue(arangodb::basics::VelocyPackHelper::TrueValue());

View File

@ -403,7 +403,8 @@ AqlItemBlock* InsertBlock::work(std::vector<AqlItemBlock*>& blocks) {
size_t const n = res->size();
throwIfKilled(); // check if we were aborted
bool isMultiple = (n > 1);
bool const isMultiple = (n > 1);
if (!isMultiple) {
// loop over the complete block. Well it is one element only
for (size_t i = 0; i < n; ++i) {
@ -453,7 +454,7 @@ AqlItemBlock* InsertBlock::work(std::vector<AqlItemBlock*>& blocks) {
dstRow -= n;
VPackSlice resultList = opRes.slice();
TRI_ASSERT(resultList.isArray());
for (auto const& elm: VPackArrayIterator(resultList)) {
for (auto const& elm: VPackArrayIterator(resultList, false)) {
bool wasError = arangodb::basics::VelocyPackHelper::getBooleanValue(
elm, "error", false);
if (!wasError) {
@ -715,13 +716,14 @@ AqlItemBlock* UpsertBlock::work(std::vector<AqlItemBlock*>& blocks) {
auto* res = *it;
throwIfKilled(); // check if we were aborted
insertBuilder.clear();
updateBuilder.clear();
size_t const n = res->size();
bool isMultiple = (n > 1);
bool const isMultiple = (n > 1);
if (isMultiple) {
insertBuilder.clear();
updateBuilder.clear();
insertBuilder.openArray();
updateBuilder.openArray();
}

View File

@ -286,6 +286,12 @@ Query* Query::clone(QueryPart part, bool withPlan) {
/// @brief add a node to the list of nodes
void Query::addNode(AstNode* node) { _nodes.emplace_back(node); }
void Query::setExecutionTime() {
if (_engine != nullptr) {
_engine->_stats.setExecutionTime(TRI_microtime() - _startTime);
}
}
/// @brief extract a region from the query
std::string Query::extractRegion(int line, int column) const {
@ -571,6 +577,7 @@ QueryResult Query::execute(QueryRegistry* registry) {
options.buildUnindexedArrays = true;
options.buildUnindexedObjects = true;
TRI_ASSERT(_engine != nullptr);
auto resultBuilder = std::make_shared<VPackBuilder>(&options);
try {
resultBuilder->openArray();
@ -655,22 +662,22 @@ QueryResult Query::execute(QueryRegistry* registry) {
return result;
} catch (arangodb::basics::Exception const& ex) {
_engine->_stats.setExecutionTime(TRI_microtime() - _startTime);
setExecutionTime();
cleanupPlanAndEngine(ex.code());
return QueryResult(ex.code(), ex.message() + getStateString());
} catch (std::bad_alloc const&) {
_engine->_stats.setExecutionTime(TRI_microtime() - _startTime);
setExecutionTime();
cleanupPlanAndEngine(TRI_ERROR_OUT_OF_MEMORY);
return QueryResult(
TRI_ERROR_OUT_OF_MEMORY,
TRI_errno_string(TRI_ERROR_OUT_OF_MEMORY) + getStateString());
} catch (std::exception const& ex) {
_engine->_stats.setExecutionTime(TRI_microtime() - _startTime);
setExecutionTime();
cleanupPlanAndEngine(TRI_ERROR_INTERNAL);
return QueryResult(TRI_ERROR_INTERNAL, ex.what() + getStateString());
} catch (...) {
setExecutionTime();
cleanupPlanAndEngine(TRI_ERROR_INTERNAL);
_engine->_stats.setExecutionTime(TRI_microtime() - _startTime);
return QueryResult(TRI_ERROR_INTERNAL,
TRI_errno_string(TRI_ERROR_INTERNAL) + getStateString());
}
@ -726,6 +733,8 @@ QueryResultV8 Query::executeV8(v8::Isolate* isolate, QueryRegistry* registry) {
result.result = v8::Array::New(isolate);
TRI_ASSERT(_engine != nullptr);
// this is the RegisterId our results can be found in
auto const resultRegister = _engine->resultRegister();
AqlItemBlock* value = nullptr;
@ -812,21 +821,21 @@ QueryResultV8 Query::executeV8(v8::Isolate* isolate, QueryRegistry* registry) {
return result;
} catch (arangodb::basics::Exception const& ex) {
_engine->_stats.setExecutionTime(TRI_microtime() - _startTime);
setExecutionTime();
cleanupPlanAndEngine(ex.code());
return QueryResultV8(ex.code(), ex.message() + getStateString());
} catch (std::bad_alloc const&) {
_engine->_stats.setExecutionTime(TRI_microtime() - _startTime);
setExecutionTime();
cleanupPlanAndEngine(TRI_ERROR_OUT_OF_MEMORY);
return QueryResultV8(
TRI_ERROR_OUT_OF_MEMORY,
TRI_errno_string(TRI_ERROR_OUT_OF_MEMORY) + getStateString());
} catch (std::exception const& ex) {
_engine->_stats.setExecutionTime(TRI_microtime() - _startTime);
setExecutionTime();
cleanupPlanAndEngine(TRI_ERROR_INTERNAL);
return QueryResultV8(TRI_ERROR_INTERNAL, ex.what() + getStateString());
} catch (...) {
_engine->_stats.setExecutionTime(TRI_microtime() - _startTime);
setExecutionTime();
cleanupPlanAndEngine(TRI_ERROR_INTERNAL);
return QueryResult(TRI_ERROR_INTERNAL,
TRI_errno_string(TRI_ERROR_INTERNAL) + getStateString());
@ -1080,7 +1089,7 @@ void Query::exitContext() {
/// @brief returns statistics for current query.
void Query::getStats(VPackBuilder& builder) {
if (_engine) {
if (_engine != nullptr) {
_engine->_stats.setExecutionTime(TRI_microtime() - _startTime);
_engine->_stats.toVelocyPack(builder);
} else {

View File

@ -292,6 +292,8 @@ class Query {
private:
/// @brief initializes the query
void init();
void setExecutionTime();
/// @brief log a query
void log();

View File

@ -905,10 +905,6 @@ void V8ShellFeature::loadModules(ShellFeature::RunMode runMode) {
files.push_back(
"common/bootstrap/modules.js"); // must come last before patches
if (runMode != ShellFeature::RunMode::JSLINT) {
files.push_back("common/bootstrap/monkeypatches.js");
}
files.push_back("client/client.js"); // needs internal
for (size_t i = 0; i < files.size(); ++i) {

View File

@ -5,11 +5,11 @@ set(ETCDIR "" CACHE path "System configuration directory (defaults to prefix/etc
# /etc -------------------------------
if (ETCDIR STREQUAL "")
set(ETCDIR_NATIVE "${CMAKE_INSTALL_PREFIX}/etc/arangodb")
set(ETCDIR_INSTALL "etc/arangodb")
set(ETCDIR_NATIVE "${CMAKE_INSTALL_PREFIX}/etc/arangodb3")
set(ETCDIR_INSTALL "etc/arangodb3")
else ()
set(ETCDIR_NATIVE "${ETCDIR}/arangodb")
set(ETCDIR_INSTALL "${ETCDIR}/arangodb")
set(ETCDIR_NATIVE "${ETCDIR}/arangodb3")
set(ETCDIR_INSTALL "${ETCDIR}/arangodb3")
endif ()
# MS stuff ---------------------------
@ -26,7 +26,7 @@ add_definitions("-D_SYSCONFDIR_=\"${ETCDIR_ESCAPED}\"")
# /var
set(VARDIR ""
CACHE path
"System configuration directory (defaults to prefix/var/arangodb)"
"System configuration directory (defaults to prefix/var/arangodb3)"
)
if (VARDIR STREQUAL "")
@ -40,16 +40,16 @@ endif ()
file(TO_NATIVE_PATH "${VARDIR_NATIVE}" VARDIR_NATIVE)
# database directory
FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/var/lib/arangodb")
FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/var/lib/arangodb3")
# apps
FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/var/lib/arangodb-apps")
FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/var/lib/arangodb3-apps")
# logs
FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/var/log/arangodb")
FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/var/log/arangodb3")
# package
set(TRI_PKGDATADIR "${CMAKE_INSTALL_PREFIX}/share/arangodb")
set(TRI_PKGDATADIR "${CMAKE_INSTALL_PREFIX}/share/arangodb3")
# resources
set(TRI_RESOURCEDIR "resources")
@ -100,16 +100,16 @@ endif ()
# Global macros ----------------------------------------------------------------
macro (generate_root_config name)
FILE(READ ${PROJECT_SOURCE_DIR}/etc/arangodb/${name}.conf.in FileContent)
STRING(REPLACE "@PKGDATADIR@" "@ROOTDIR@/share/arangodb"
FILE(READ ${PROJECT_SOURCE_DIR}/etc/arangodb3/${name}.conf.in FileContent)
STRING(REPLACE "@PKGDATADIR@" "@ROOTDIR@/share/arangodb3"
FileContent "${FileContent}")
STRING(REPLACE "@LOCALSTATEDIR@" "@ROOTDIR@/var"
FileContent "${FileContent}")
STRING(REPLACE "@SBINDIR@" "@ROOTDIR@/bin"
FileContent "${FileContent}")
STRING(REPLACE "@LIBEXECDIR@/arangodb" "@ROOTDIR@/bin"
STRING(REPLACE "@LIBEXECDIR@/arangodb3" "@ROOTDIR@/bin"
FileContent "${FileContent}")
STRING(REPLACE "@SYSCONFDIR@" "@ROOTDIR@/etc/arangodb"
STRING(REPLACE "@SYSCONFDIR@" "@ROOTDIR@/etc/arangodb3"
FileContent "${FileContent}")
if (MSVC)
STRING(REPLACE "@PROGRAM_SUFFIX@" ".exe"
@ -117,17 +117,17 @@ macro (generate_root_config name)
STRING(REGEX REPLACE "[\r\n]file =" "\n# file ="
FileContent "${FileContent}")
endif ()
FILE(WRITE ${PROJECT_BINARY_DIR}/etc/arangodb/${name}.conf "${FileContent}")
FILE(WRITE ${PROJECT_BINARY_DIR}/etc/arangodb3/${name}.conf "${FileContent}")
endmacro ()
# generates config file using the configured paths ----------------------------
macro (generate_path_config name)
FILE(READ ${PROJECT_SOURCE_DIR}/etc/arangodb/${name}.conf.in FileContent)
FILE(READ ${PROJECT_SOURCE_DIR}/etc/arangodb3/${name}.conf.in FileContent)
STRING(REPLACE "@PKGDATADIR@" "${TRI_PKGDATADIR}"
FileContent "${FileContent}")
STRING(REPLACE "@LOCALSTATEDIR@" "${VARDIR_NATIVE}"
FileContent "${FileContent}")
FILE(WRITE ${PROJECT_BINARY_DIR}/etc/arangodb/${name}.conf "${FileContent}")
FILE(WRITE ${PROJECT_BINARY_DIR}/etc/arangodb3/${name}.conf "${FileContent}")
endmacro ()
# installs a config file -------------------------------------------------------
@ -138,7 +138,7 @@ macro (install_config name)
generate_path_config(${name})
endif ()
install(
FILES ${PROJECT_BINARY_DIR}/etc/arangodb/${name}.conf
FILES ${PROJECT_BINARY_DIR}/etc/arangodb3/${name}.conf
DESTINATION ${ETCDIR_INSTALL})
endmacro ()
@ -219,10 +219,10 @@ if (MSVC)
install_readme(LICENSE . LICENSE.txt)
install_readme(LICENSES-OTHER-COMPONENTS.md . LICENSES-OTHER-COMPONENTS.md)
else ()
install_readme(README share/doc/arangodb README)
install_readme(README.md share/doc/arangodb README.md)
install_readme(LICENSE share/doc/arangodb LICENSE)
install_readme(LICENSES-OTHER-COMPONENTS.md share/doc/arangodb LICENSES-OTHER-COMPONENTS.md)
install_readme(README share/doc/arangodb3 README)
install_readme(README.md share/doc/arangodb3 README.md)
install_readme(LICENSE share/doc/arangodb3 LICENSE)
install_readme(LICENSES-OTHER-COMPONENTS.md share/doc/arangodb3 LICENSES-OTHER-COMPONENTS.md)
endif ()
# Build package ----------------------------------------------------------------
@ -231,9 +231,9 @@ if (NOT(MSVC))
endif()
# General
set(CPACK_PACKAGE_NAME "arangodb")
set(CPACK_PACKAGE_NAME "arangodb3")
set(CPACK_PACKAGE_VENDOR "ArangoDB GmbH")
set(CPACK_PACKAGE_CONTACT "info@arangodb.org")
set(CPACK_PACKAGE_CONTACT "info@arangodb.com")
set(CPACK_PACKAGE_VERSION "${ARANGODB_VERSION}")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
@ -247,8 +247,8 @@ set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "a multi-purpose NoSQL database
graphs, and key-values. Build high performance applications using a convenient
SQL-like query language or JavaScript extensions.
.
Copyright: 2014-2016 by ArangoDB GmbH
Copyright: 2012-2013 by triAGENS GmbH
Copyright: 2014-2015 by ArangoDB GmbH
ArangoDB Software
www.arangodb.com
")
@ -318,7 +318,7 @@ if (NOT(MSVC))
FILES ${PROJECT_SOURCE_DIR}/Installation/debian/arangodb.init
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
DESTINATION etc/init.d
RENAME arangodb
RENAME arangodb3
COMPONENT debian-extras
)
endif()
@ -335,14 +335,13 @@ add_custom_target (love
# Finally: user cpack
include(CPack)
################################################################################
### @brief install client-side JavaScript files
################################################################################
install(
DIRECTORY ${PROJECT_SOURCE_DIR}/js/common ${PROJECT_SOURCE_DIR}/js/client
DESTINATION share/arangodb/js
DESTINATION share/arangodb3/js
FILES_MATCHING PATTERN "*.js"
REGEX "^.*/common/test-data$" EXCLUDE
REGEX "^.*/common/tests$" EXCLUDE
@ -354,7 +353,7 @@ install(
install(
DIRECTORY ${PROJECT_SOURCE_DIR}/js/actions ${PROJECT_SOURCE_DIR}/js/apps ${PROJECT_SOURCE_DIR}/js/contrib ${PROJECT_SOURCE_DIR}/js/node ${PROJECT_SOURCE_DIR}/js/server
DESTINATION share/arangodb/js
DESTINATION share/arangodb3/js
REGEX "^.*/server/tests$" EXCLUDE
)
@ -363,7 +362,7 @@ install(
################################################################################
install(
DIRECTORY ${PROJECT_BINARY_DIR}/var/log/arangodb
DIRECTORY ${PROJECT_BINARY_DIR}/var/log/arangodb3
DESTINATION ${VARDIR_INSTALL}/log)
################################################################################
@ -371,7 +370,7 @@ install(
################################################################################
install(
DIRECTORY ${PROJECT_BINARY_DIR}/var/lib/arangodb
DIRECTORY ${PROJECT_BINARY_DIR}/var/lib/arangodb3
DESTINATION ${VARDIR_INSTALL}/lib)
################################################################################
@ -379,14 +378,5 @@ install(
################################################################################
install(
DIRECTORY ${PROJECT_BINARY_DIR}/var/lib/arangodb-apps
DIRECTORY ${PROJECT_BINARY_DIR}/var/lib/arangodb3-apps
DESTINATION ${VARDIR_INSTALL}/lib)
## -----------------------------------------------------------------------------
## --SECTION-- END-OF-FILE
## -----------------------------------------------------------------------------
## Local Variables:
## mode: outline-minor
## outline-regexp: "### @brief\\|## --SECTION--\\|# -\\*- "
## End:

View File

@ -3,7 +3,7 @@
[database]
auto-upgrade = false
upgrade-check = false
directory= @LOCALSTATEDIR@/lib/arangodb
directory= @LOCALSTATEDIR@/lib/arangodb3
# maximal-journal-size=33554432
[server]
@ -15,7 +15,7 @@ threads = 1
[javascript]
startup-directory = @PKGDATADIR@/js
app-path = @LOCALSTATEDIR@/lib/arangodb-apps
app-path = @LOCALSTATEDIR@/lib/arangodb3-apps
script = @PKGDATADIR@/js/server/arango-dfdb.js
v8-contexts = 1

View File

@ -48,7 +48,7 @@ authentication = false
[javascript]
startup-directory = @PKGDATADIR@/js
app-path = @LOCALSTATEDIR@/lib/arangodb-apps
app-path = @LOCALSTATEDIR@/lib/arangodb3-apps
# app-path = @HOMEDRIVE@/@HOMEPATH@/arangodb/apps
# number of worker threads for V8
@ -59,7 +59,7 @@ level = info
file = @LOCALSTATEDIR@/log/arangodb/arangod.log
[cluster]
data-path = @LOCALSTATEDIR@/lib/arangodb/cluster
data-path = @LOCALSTATEDIR@/lib/arangodb3/cluster
log-path = @LOCALSTATEDIR@/log/arangodb/cluster
arangod-path = @SBINDIR@/arangod@PROGRAM_SUFFIX@
dbserver-config = @SYSCONFDIR@/arangod.conf

View File

@ -33,6 +33,7 @@
var actions = require("@arangodb/actions");
var graph = require("@arangodb/graph-blueprint");
var arangodb = require("@arangodb");
var shallowCopy = require("@arangodb/util").shallowCopy;
////////////////////////////////////////////////////////////////////////////////
@ -386,7 +387,7 @@ function update_graph_vertex (req, res, g, isPatch) {
waitForSync = true;
}
var shallow = json._shallowCopy;
var shallow = shallowCopy(json);
var id2 = null;
if (isPatch) {
@ -781,7 +782,7 @@ function update_graph_edge (req, res, g, isPatch) {
waitForSync = true;
}
var shallow = json._shallowCopy;
var shallow = shallowCopy(json);
if (json.hasOwnProperty('_from')) {
shallow._from = json._from;
}

View File

@ -270,7 +270,6 @@
"frontend/js/bootstrap/errors.js",
"frontend/js/bootstrap/modules/console.js",
"frontend/js/client/bootstrap/modules/internal.js",
"frontend/js/bootstrap/monkeypatches.js",
"frontend/js/modules/**/*.js",
"frontend/js/client/client.js"
],

View File

@ -95,8 +95,8 @@ body {
}
> p {
text-align: center;
margin-bottom: 0;
text-align: center;
}
}

View File

@ -51,7 +51,6 @@
"frontend/js/modules/@arangodb/common.js",
"frontend/js/modules/@arangodb/index.js",
"frontend/js/bootstrap/errors.js",
"frontend/js/bootstrap/monkeypatches.js",
"frontend/js/bootstrap/module-internal.js",
"frontend/js/client/bootstrap/module-internal.js",
"frontend/js/client/client.js",

View File

@ -68,7 +68,6 @@ module.exports = function(karma) {
'frontend/js/modules/@arangodb/common.js',
'frontend/js/modules/@arangodb/index.js',
'frontend/js/bootstrap/errors.js',
'frontend/js/bootstrap/monkeypatches.js',
'frontend/js/bootstrap/module-internal.js',
'frontend/js/client/bootstrap/module-internal.js',
'frontend/js/client/client.js',

View File

@ -65,7 +65,6 @@
<script src="../js/modules/@arangodb/index.js"></script>
<script src="../js/bootstrap/errors.js"></script>
<script src="../js/bootstrap/monkeypatches.js"></script>
<script src="../js/bootstrap/module-internal.js"></script>
<script src="../js/client/bootstrap/module-internal.js"></script>

View File

@ -518,7 +518,6 @@ function checkArangoAlive(arangod, options) {
arangod.exitStatus = res;
analyzeServerCrash(arangod, options, "health Check");
}
}
return ret;
@ -3968,7 +3967,7 @@ function unitTest(cases, options) {
UNITTESTS_DIR = fs.join(UNITTESTS_DIR, options.buildType);
}
CONFIG_DIR = fs.join(TOP_DIR, builddir, "etc", "arangodb");
CONFIG_DIR = fs.join(TOP_DIR, builddir, "etc", "arangodb3");
ARANGOBENCH_BIN = fs.join(BIN_DIR, "arangobench");
ARANGODUMP_BIN = fs.join(BIN_DIR, "arangodump");
ARANGOD_BIN = fs.join(BIN_DIR, "arangod");

View File

@ -183,7 +183,7 @@
"ERROR_QUERY_EXCEPTION_OPTIONS" : { "code" : 1576, "message" : "query options expected" },
"ERROR_QUERY_COLLECTION_USED_IN_EXPRESSION" : { "code" : 1577, "message" : "collection '%s' used as expression operand" },
"ERROR_QUERY_DISALLOWED_DYNAMIC_CALL" : { "code" : 1578, "message" : "disallowed dynamic call to '%s'" },
"ERROR_QUERY_ACCESS_AFTER_MODIFICATION" : { "code" : 1579, "message" : "access after data-modification" },
"ERROR_QUERY_ACCESS_AFTER_MODIFICATION" : { "code" : 1579, "message" : "access after data-modification by %s" },
"ERROR_QUERY_FUNCTION_INVALID_NAME" : { "code" : 1580, "message" : "invalid user function name" },
"ERROR_QUERY_FUNCTION_INVALID_CODE" : { "code" : 1581, "message" : "invalid user function code" },
"ERROR_QUERY_FUNCTION_NOT_FOUND" : { "code" : 1582, "message" : "user function '%s()' not found" },

View File

@ -1726,11 +1726,6 @@ if (typeof SYS_OPTIONS !== 'undefined') {
delete global.SYS_OPTIONS;
}
exports.propertyKeys = (obj) => Object.keys(obj).filter((key) => {
return (key.charAt(0) !== '_' && key.charAt(0) !== '$');
});
////////////////////////////////////////////////////////////////////////////////
/// @brief print
////////////////////////////////////////////////////////////////////////////////

View File

@ -1,49 +0,0 @@
/*eslint no-extend-native:0 */
/*eslint-disable */
(function () {
'use strict';
/*eslint-enable */
////////////////////////////////////////////////////////////////////////////////
/// @brief monkey-patches to built-in prototypes
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2004-2013 triAGENS GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
/// Copyright holder is triAGENS GmbH, Cologne, Germany
///
/// @author Dr. Frank Celler
/// @author Lucas Dohmen
/// @author Copyright 2011-2013, triAGENS GmbH, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief shallow copies properties
////////////////////////////////////////////////////////////////////////////////
Object.defineProperty(Object.prototype, '_shallowCopy', {
get() {
return require('internal').propertyKeys(this).reduce((previous, key) => {
previous[key] = this[key];
return previous;
}, {});
}
});
}());

View File

@ -28,7 +28,8 @@
////////////////////////////////////////////////////////////////////////////////
var is = require("@arangodb/is"),
internal = require("internal"),
propertyKeys = require("@arangodb/util").propertyKeys,
shallowCopy = require("@arangodb/util").shallowCopy,
Edge,
Graph,
Vertex,
@ -245,7 +246,7 @@ Edge.prototype.getProperty = function (name) {
////////////////////////////////////////////////////////////////////////////////
Edge.prototype.getPropertyKeys = function () {
return internal.propertyKeys(this._properties);
return propertyKeys(this._properties);
};
////////////////////////////////////////////////////////////////////////////////
@ -253,7 +254,7 @@ Edge.prototype.getPropertyKeys = function () {
////////////////////////////////////////////////////////////////////////////////
Edge.prototype.properties = function () {
return this._properties._shallowCopy;
return shallowCopy(this._properties);
};
////////////////////////////////////////////////////////////////////////////////
@ -432,7 +433,7 @@ Vertex.prototype.getProperty = function (name) {
////////////////////////////////////////////////////////////////////////////////
Vertex.prototype.getPropertyKeys = function () {
return internal.propertyKeys(this._properties);
return propertyKeys(this._properties);
};
////////////////////////////////////////////////////////////////////////////////
@ -450,7 +451,7 @@ Vertex.prototype.getPropertyKeys = function () {
////////////////////////////////////////////////////////////////////////////////
Vertex.prototype.properties = function () {
return this._properties._shallowCopy;
return shallowCopy(this._properties);
};
@ -496,7 +497,7 @@ Graph.prototype._prepareEdgeData = function (data, label) {
if (is.notExisty(data) || is.noObject(data)) {
edgeData = {};
} else {
edgeData = data._shallowCopy || {};
edgeData = shallowCopy(data) || {};
}
edgeData.$label = label;
@ -510,7 +511,7 @@ Graph.prototype._prepareVertexData = function (data) {
if (is.notExisty(data) || is.noObject(data)) {
vertexData = {};
} else {
vertexData = data._shallowCopy || {};
vertexData = shallowCopy(data) || {};
}
return vertexData;

View File

@ -85,3 +85,20 @@ exports.inline = function (strs) {
}
return str.replace(/\s*\n\s*/g, ' ').replace(/(^\s|\s$)/g, '');
};
exports.propertyKeys = function (obj) {
return Object.keys(obj).filter((key) => (
key.charAt(0) !== '_' && key.charAt(0) !== '$'
));
};
exports.shallowCopy = function (src) {
const dest = {};
if (src === undefined || src === null) {
return dest;
}
for (const key of exports.propertyKeys(src)) {
dest[key] = src[key];
}
return dest;
};

View File

@ -3,7 +3,7 @@
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var gql = require('graphql');
module.exports = _extends({
module.exports = _extends({}, gql, {
graphql: require('./graphql').graphql,
execute: require('./execution').execute
}, gql);
});

View File

@ -1,4 +1,15 @@
## Changelog
##### 2.3.0 - 2016.04.24
- Added `asap` for enqueuing microtasks, [stage 0 proposal](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask)
- Added well-known symbol `Symbol.asyncIterator` for [stage 2 async iteration proposal](https://github.com/tc39/proposal-async-iteration)
- Added well-known symbol `Symbol.observable` for [stage 1 observables proposal](https://github.com/zenparsing/es-observable)
- `String#{padStart, padEnd}` returns original string if filler is empty string, [T39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#stringprototypepadstartpadend)
- `Object.values` and `Object.entries` moved to stage 4 from 3, [T39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#objectvalues--objectentries)
- `System.global` moved to stage 2 from 1, [T39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#systemglobal)
- `Map#toJSON` and `Set#toJSON` rejected and will be removed from the next major release, [T39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-31.md#mapprototypetojsonsetprototypetojson)
- `Error.isError` withdrawn and will be removed from the next major release, [T39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#erroriserror)
- Added fallback for `Function#name` on non-extensible functions and functions with broken `toString` conversion, [#193](https://github.com/zloirock/core-js/issues/193)
##### 2.2.2 - 2016.04.06
- Added conversion `-0` to `+0` to `Array#{indexOf, lastIndexOf}`, [ES2016 fix](https://github.com/tc39/ecma262/pull/316)
- Added fixes for some `Math` methods in Tor Browser

View File

@ -22,6 +22,7 @@ core.Promise.resolve(32).then(x => console.log(x)); // => 32
core.setImmediate(x => console.log(x), 42); // => 42
```
### Index
- [Usage](#usage)
- [Basic](#basic)
- [CommonJS](#commonjs)
@ -76,9 +77,9 @@ require('core-js/shim');
```
If you need complete build for browser, use builds from `core-js/client` path:
* [default](https://raw.githack.com/zloirock/core-js/v2.2.2/client/core.min.js): Includes all features, standard and non-standard.
* [as a library](https://raw.githack.com/zloirock/core-js/v2.2.2/client/library.min.js): Like "default", but does not pollute the global namespace (see [2nd example at the top](#core-js)).
* [shim only](https://raw.githack.com/zloirock/core-js/v2.2.2/client/shim.min.js): Only includes the standard methods.
* [default](https://raw.githack.com/zloirock/core-js/v2.3.0/client/core.min.js): Includes all features, standard and non-standard.
* [as a library](https://raw.githack.com/zloirock/core-js/v2.3.0/client/library.min.js): Like "default", but does not pollute the global namespace (see [2nd example at the top](#core-js)).
* [shim only](https://raw.githack.com/zloirock/core-js/v2.3.0/client/shim.min.js): Only includes the standard methods.
Warning: if you use `core-js` with the extension of native objects, require all needed `core-js` modules at the beginning of entry point of your application, otherwise, conflicts may occur.
@ -228,11 +229,11 @@ core-js(/library)/es5
core-js(/library)/es6
```
#### ECMAScript 6: Object
Modules [`es6.object.assign`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.assign.js), [`es6.object.is`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.is.js), [`es6.object.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.set-prototype-of.js) and [`es6.object.to-string`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.to-string.js).
Modules [`es6.object.assign`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.assign.js), [`es6.object.is`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.is.js), [`es6.object.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.set-prototype-of.js) and [`es6.object.to-string`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.to-string.js).
In ES6 most `Object` static methods should work with primitives. Modules [`es6.object.freeze`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.freeze.js), [`es6.object.seal`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.seal.js), [`es6.object.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.prevent-extensions.js), [`es6.object.is-frozen`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.is-frozen.js), [`es6.object.is-sealed`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.is-sealed.js), [`es6.object.is-extensible`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.is-extensible.js), [`es6.object.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.get-own-property-descriptor.js), [`es6.object.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.get-prototype-of.js), [`es6.object.keys`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.keys.js) and [`es6.object.get-own-property-names`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.get-own-property-names.js).
In ES6 most `Object` static methods should work with primitives. Modules [`es6.object.freeze`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.freeze.js), [`es6.object.seal`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.seal.js), [`es6.object.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.prevent-extensions.js), [`es6.object.is-frozen`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.is-frozen.js), [`es6.object.is-sealed`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.is-sealed.js), [`es6.object.is-extensible`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.is-extensible.js), [`es6.object.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.get-own-property-descriptor.js), [`es6.object.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.get-prototype-of.js), [`es6.object.keys`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.keys.js) and [`es6.object.get-own-property-names`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.get-own-property-names.js).
Just ES5 features: [`es6.object.create`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.create.js), [`es6.object.define-property`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.define-property.js) and [`es6.object.define-properties`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.object.es6.object.define-properties.js).
Just ES5 features: [`es6.object.create`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.create.js), [`es6.object.define-property`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.define-property.js) and [`es6.object.define-properties`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.es6.object.define-properties.js).
```js
Object
.assign(target, ...src) -> target
@ -300,7 +301,7 @@ Object.keys('qwe'); // => ['0', '1', '2']
Object.getPrototypeOf('qwe') === String.prototype; // => true
```
#### ECMAScript 6: Function
Modules [`es6.function.name`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.function.name.js), [`es6.function.has-instance`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.function.has-instance.js). Just ES5: [`es6.function.bind`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.function.bind.js).
Modules [`es6.function.name`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.function.name.js), [`es6.function.has-instance`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.function.has-instance.js). Just ES5: [`es6.function.bind`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.function.bind.js).
```js
Function
#bind(object, ...args) -> boundFn(...args)
@ -322,7 +323,7 @@ core-js/fn/function/virtual/bind
console.log.bind(console, 42)(43); // => 42 43
```
#### ECMAScript 6: Array
Modules [`es6.array.from`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.from.js), [`es6.array.of`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.of.js), [`es6.array.copy-within`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.copy-within.js), [`es6.array.fill`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.fill.js), [`es6.array.find`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.find.js), [`es6.array.find-index`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.find-index.js), [`es6.array.iterator`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.iterator.js). ES5 features with fixes: [`es6.array.is-array`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.is-array.js), [`es6.array.slice`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.slice.js), [`es6.array.join`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.join.js), [`es6.array.index-of`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.index-of.js), [`es6.array.last-index-of`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.last-index-of.js), [`es6.array.every`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.every.js), [`es6.array.some`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.some.js), [`es6.array.for-each`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.for-each.js), [`es6.array.map`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.map.js), [`es6.array.filter`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.filter.js), [`es6.array.reduce`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.reduce.js), [`es6.array.reduce-right`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.reduce-right.js), [`es6.array.sort`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.array.sort.js).
Modules [`es6.array.from`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.from.js), [`es6.array.of`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.of.js), [`es6.array.copy-within`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.copy-within.js), [`es6.array.fill`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.fill.js), [`es6.array.find`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.find.js), [`es6.array.find-index`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.find-index.js), [`es6.array.iterator`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.iterator.js). ES5 features with fixes: [`es6.array.is-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.is-array.js), [`es6.array.slice`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.slice.js), [`es6.array.join`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.join.js), [`es6.array.index-of`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.index-of.js), [`es6.array.last-index-of`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.last-index-of.js), [`es6.array.every`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.every.js), [`es6.array.some`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.some.js), [`es6.array.for-each`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.for-each.js), [`es6.array.map`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.map.js), [`es6.array.filter`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.filter.js), [`es6.array.reduce`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.reduce.js), [`es6.array.reduce-right`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.reduce-right.js), [`es6.array.sort`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.sort.js).
```js
Array
.from(iterable | array-like, mapFn(val, index)?, that) -> array
@ -434,9 +435,9 @@ Array(5).fill(42); // => [42, 42, 42, 42, 42]
[1, 2, 3, 4, 5].copyWithin(0, 3); // => [4, 5, 3, 4, 5]
```
#### ECMAScript 6: String
Modules [`es6.string.from-code-point`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.from-code-point.js), [`es6.string.raw`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.raw.js), [`es6.string.iterator`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.iterator.js), [`es6.string.code-point-at`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.code-point-at.js), [`es6.string.ends-with`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.ends-with.js), [`es6.string.includes`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.includes.js), [`es6.string.repeat`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.repeat.js), [`es6.string.starts-with`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.starts-with.js) and [`es6.string.trim`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.trim.js).
Modules [`es6.string.from-code-point`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.from-code-point.js), [`es6.string.raw`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.raw.js), [`es6.string.iterator`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.iterator.js), [`es6.string.code-point-at`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.code-point-at.js), [`es6.string.ends-with`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.ends-with.js), [`es6.string.includes`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.includes.js), [`es6.string.repeat`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.repeat.js), [`es6.string.starts-with`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.starts-with.js) and [`es6.string.trim`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.trim.js).
Annex B HTML methods. Ugly, but it's also the part of the spec. Modules [`es6.string.anchor`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.anchor.js), [`es6.string.big`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.big.js), [`es6.string.blink`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.blink.js), [`es6.string.bold`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.bold.js), [`es6.string.fixed`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.fixed.js), [`es6.string.fontcolor`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.fontcolor.js), [`es6.string.fontsize`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.fontsize.js), [`es6.string.italics`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.italics.js), [`es6.string.link`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.link.js), [`es6.string.small`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.small.js), [`es6.string.strike`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.strike.js), [`es6.string.sub`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.sub.js) and [`es6.string.sup`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.string.sup.js).
Annex B HTML methods. Ugly, but it's also the part of the spec. Modules [`es6.string.anchor`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.anchor.js), [`es6.string.big`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.big.js), [`es6.string.blink`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.blink.js), [`es6.string.bold`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.bold.js), [`es6.string.fixed`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.fixed.js), [`es6.string.fontcolor`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.fontcolor.js), [`es6.string.fontsize`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.fontsize.js), [`es6.string.italics`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.italics.js), [`es6.string.link`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.link.js), [`es6.string.small`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.small.js), [`es6.string.strike`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.strike.js), [`es6.string.sub`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.sub.js) and [`es6.string.sup`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.sup.js).
```js
String
.fromCodePoint(...codePoints) -> str
@ -535,9 +536,9 @@ String.raw({raw: 'test'}, 0, 1, 2); // => 't0e1s2t'
'baz'.link('http://example.com'); // => '<a href="http://example.com">baz</a>'
```
#### ECMAScript 6: RegExp
Modules [`es6.regexp.constructor`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.regexp.constructor.js) and [`es6.regexp.flags`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.regexp.flags.js).
Modules [`es6.regexp.constructor`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.regexp.constructor.js) and [`es6.regexp.flags`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.regexp.flags.js).
Support well-known [symbols](#ecmascript-6-symbol) `@@match`, `@@replace`, `@@search` and `@@split`, modules [`es6.regexp.match`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.regexp.match.js), [`es6.regexp.replace`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.regexp.replace.js), [`es6.regexp.search`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.regexp.search.js) and [`es6.regexp.split`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.regexp.split.js).
Support well-known [symbols](#ecmascript-6-symbol) `@@match`, `@@replace`, `@@search` and `@@split`, modules [`es6.regexp.match`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.regexp.match.js), [`es6.regexp.replace`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.regexp.replace.js), [`es6.regexp.search`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.regexp.search.js) and [`es6.regexp.split`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.regexp.split.js).
```
[new] RegExp(pattern, flags?) -> regexp, ES6 fix: can alter flags (IE9+)
#flags -> str (IE9+)
@ -578,12 +579,12 @@ RegExp(/./g, 'm'); // => /./m
RegExp.prototype.toString.call({source: 'foo', flags: 'bar'}); // => '/foo/bar'
```
#### ECMAScript 6: Number
Module [`es6.number.constructor`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.number.constructor.js). `Number` constructor support binary and octal literals, [*example*](http://goo.gl/jRd6b3):
Module [`es6.number.constructor`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.constructor.js). `Number` constructor support binary and octal literals, [*example*](http://goo.gl/jRd6b3):
```js
Number('0b1010101'); // => 85
Number('0o7654321'); // => 2054353
```
Modules [`es6.number.epsilon`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.number.epsilon.js), [`es6.number.is-finite`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.number.is-finite.js), [`es6.number.is-integer`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.number.is-integer.js), [`es6.number.is-nan`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.number.is-nan.js), [`es6.number.is-safe-integer`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.number.is-safe-integer.js), [`es6.number.max-safe-integer`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.number.max-safe-integer.js), [`es6.number.min-safe-integer`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.number.min-safe-integer.js), [`es6.number.parse-float`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.number.parse-float.js), [`es6.number.parse-int`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.number.parse-int.js), [`es6.number.to-fixed`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.number.to-fixed.js), [`es6.number.to-precision`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.number.to-precision.js), [`es6.parse-int`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.parse-int.js), [`es6.parse-float`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.parse-float.js).
Modules [`es6.number.epsilon`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.epsilon.js), [`es6.number.is-finite`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.is-finite.js), [`es6.number.is-integer`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.is-integer.js), [`es6.number.is-nan`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.is-nan.js), [`es6.number.is-safe-integer`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.is-safe-integer.js), [`es6.number.max-safe-integer`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.max-safe-integer.js), [`es6.number.min-safe-integer`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.min-safe-integer.js), [`es6.number.parse-float`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.parse-float.js), [`es6.number.parse-int`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.parse-int.js), [`es6.number.to-fixed`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.to-fixed.js), [`es6.number.to-precision`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.to-precision.js), [`es6.parse-int`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.parse-int.js), [`es6.parse-float`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.parse-float.js).
```js
[new] Number(var) -> number | number object
.isFinite(num) -> bool
@ -619,7 +620,7 @@ core-js(/library)/fn/parse-float
core-js(/library)/fn/parse-int
```
#### ECMAScript 6: Math
Modules [`es6.math.acosh`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.acosh.js), [`es6.math.asinh`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.asinh.js), [`es6.math.atanh`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.atanh.js), [`es6.math.cbrt`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.cbrt.js), [`es6.math.clz32`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.clz32.js), [`es6.math.cosh`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.cosh.js), [`es6.math.expm1`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.expm1.js), [`es6.math.fround`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.fround.js), [`es6.math.hypot`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.hypot.js), [`es6.math.imul`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.imul.js), [`es6.math.log10`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.log10.js), [`es6.math.log1p`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.log1p.js), [`es6.math.log2`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.log2.js), [`es6.math.sign`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.sign.js), [`es6.math.sinh`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.sinh.js), [`es6.math.tanh`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.tanh.js), [`es6.math.trunc`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.math.trunc.js).
Modules [`es6.math.acosh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.acosh.js), [`es6.math.asinh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.asinh.js), [`es6.math.atanh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.atanh.js), [`es6.math.cbrt`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.cbrt.js), [`es6.math.clz32`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.clz32.js), [`es6.math.cosh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.cosh.js), [`es6.math.expm1`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.expm1.js), [`es6.math.fround`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.fround.js), [`es6.math.hypot`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.hypot.js), [`es6.math.imul`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.imul.js), [`es6.math.log10`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.log10.js), [`es6.math.log1p`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.log1p.js), [`es6.math.log2`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.log2.js), [`es6.math.sign`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.sign.js), [`es6.math.sinh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.sinh.js), [`es6.math.tanh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.tanh.js), [`es6.math.trunc`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.trunc.js).
```js
Math
.acosh(num) -> num
@ -662,7 +663,7 @@ core-js(/library)/fn/math/tanh
core-js(/library)/fn/math/trunc
```
#### ECMAScript 6: Date
Modules [`es6.date.to-string`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.date.to-string.js), ES5 features with fixes: [`es6.date.now`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.date.now.js), [`es6.date.to-iso-string`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.date.to-iso-string.js), [`es6.date.to-json`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.date.to-json.js) and [`es6.date.to-primitive`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.date.to-primitive.js).
Modules [`es6.date.to-string`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.date.to-string.js), ES5 features with fixes: [`es6.date.now`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.date.now.js), [`es6.date.to-iso-string`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.date.to-iso-string.js), [`es6.date.to-json`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.date.to-json.js) and [`es6.date.to-primitive`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.date.to-primitive.js).
```js
Date
.now() -> int
@ -686,7 +687,7 @@ new Date(NaN).toString(); // => 'Invalid Date'
```
#### ECMAScript 6: Promise
Module [`es6.promise`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.promise.js).
Module [`es6.promise`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.promise.js).
```js
new Promise(executor(resolve(var), reject(var))) -> promise
#then(resolved(var), rejected(var)) -> promise
@ -806,7 +807,7 @@ setTimeout(() => p.catch(_ => _), 1e3);
```
#### ECMAScript 6: Symbol
Module [`es6.symbol`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.symbol.js).
Module [`es6.symbol`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.symbol.js).
```js
Symbol(description?) -> symbol
.hasInstance -> @@hasInstance
@ -918,7 +919,7 @@ for(var key in o2)console.log(key); // nothing
#### ECMAScript 6: Collections
`core-js` uses native collections in most case, just fixes methods / constructor, if it's required, and in old environment uses fast polyfill (O(1) lookup).
#### Map
Module [`es6.map`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.map.js).
Module [`es6.map`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.map.js).
```js
new Map(iterable (entries) ?) -> map
#clear() -> void
@ -972,7 +973,7 @@ for(var [key, val] of map.entries()){
}
```
#### Set
Module [`es6.set`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.set.js).
Module [`es6.set`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.set.js).
```js
new Set(iterable?) -> set
#add(key) -> @
@ -1016,7 +1017,7 @@ for(var [key, val] of set.entries()){
}
```
#### WeakMap
Module [`es6.weak-map`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.weak-map.js).
Module [`es6.weak-map`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.weak-map.js).
```js
new WeakMap(iterable (entries) ?) -> weakmap
#delete(key) -> bool
@ -1060,7 +1061,7 @@ console.log(person.getName()); // => 'Vasya'
for(var key in person)console.log(key); // => only 'getName'
```
#### WeakSet
Module [`es6.weak-set`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.weak-set.js).
Module [`es6.weak-set`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.weak-set.js).
```js
new WeakSet(iterable?) -> weakset
#add(key) -> @
@ -1092,7 +1093,7 @@ console.log(wset.has(b)); // => false
#### ECMAScript 6: Typed Arrays
Implementations and fixes `ArrayBuffer`, `DataView`, typed arrays constructors, static and prototype methods. Typed Arrays work only in environments with support descriptors (IE9+), `ArrayBuffer` and `DataView` should work anywhere.
Modules [`es6.typed.array-buffer`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.typed.array-buffer.js), [`es6.typed.data-view`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.typed.data-view.js), [`es6.typed.int8-array`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.typed.int8-array.js), [`es6.typed.uint8-array`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.typed.uint8-array.js), [`es6.typed.uint8-clamped-array`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.typed.uint8-clamped-array.js), [`es6.typed.int16-array`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.typed.int16-array.js), [`es6.typed.uint16-array`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.typed.uint16-array.js), [`es6.typed.int32-array`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.typed.int32-array.js), [`es6.typed.uint32-array`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.typed.uint32-array.js), [`es6.typed.float32-array`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.typed.float32-array.js) and [`es6.typed.float64-array`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.typed.float64-array.js).
Modules [`es6.typed.array-buffer`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.array-buffer.js), [`es6.typed.data-view`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.data-view.js), [`es6.typed.int8-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.int8-array.js), [`es6.typed.uint8-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.uint8-array.js), [`es6.typed.uint8-clamped-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.uint8-clamped-array.js), [`es6.typed.int16-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.int16-array.js), [`es6.typed.uint16-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.uint16-array.js), [`es6.typed.int32-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.int32-array.js), [`es6.typed.uint32-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.uint32-array.js), [`es6.typed.float32-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.float32-array.js) and [`es6.typed.float64-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.float64-array.js).
```js
new ArrayBuffer(length) -> buffer
.isView(var) -> bool
@ -1226,14 +1227,14 @@ for(var [key, val] of typed.entries()){
* In the `library` version we can't pollute native prototypes, so prototype methods available as constructors static.
#### ECMAScript 6: Reflect
Modules [`es6.reflect.apply`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.reflect.apply.js), [`es6.reflect.construct`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.reflect.construct.js), [`es6.reflect.define-property`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.reflect.define-property.js), [`es6.reflect.delete-property`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.reflect.delete-property.js), [`es6.reflect.enumerate`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.reflect.enumerate.js), [`es6.reflect.get`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.reflect.get.js), [`es6.reflect.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.reflect.get-own-property-descriptor.js), [`es6.reflect.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.reflect.get-prototype-of.js), [`es6.reflect.has`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.reflect.has.js), [`es6.reflect.is-extensible`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.reflect.is-extensible.js), [`es6.reflect.own-keys`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.reflect.own-keys.js), [`es6.reflect.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.reflect.prevent-extensions.js), [`es6.reflect.set`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.reflect.set.js), [`es6.reflect.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es6.reflect.set-prototype-of.js).
Modules [`es6.reflect.apply`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.apply.js), [`es6.reflect.construct`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.construct.js), [`es6.reflect.define-property`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.define-property.js), [`es6.reflect.delete-property`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.delete-property.js), [`es6.reflect.enumerate`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.enumerate.js), [`es6.reflect.get`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.get.js), [`es6.reflect.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.get-own-property-descriptor.js), [`es6.reflect.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.get-prototype-of.js), [`es6.reflect.has`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.has.js), [`es6.reflect.is-extensible`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.is-extensible.js), [`es6.reflect.own-keys`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.own-keys.js), [`es6.reflect.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.prevent-extensions.js), [`es6.reflect.set`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.set.js), [`es6.reflect.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.set-prototype-of.js).
```js
Reflect
.apply(target, thisArgument, argumentsList) -> var
.construct(target, argumentsList, newTarget?) -> object
.defineProperty(target, propertyKey, attributes) -> bool
.deleteProperty(target, propertyKey) -> bool
.enumerate(target) -> iterator (deprecated and will be removed from the next major release)
.enumerate(target) -> iterator (removed from the spec and will be removed from core-js@3)
.get(target, propertyKey, receiver?) -> var
.getOwnPropertyDescriptor(target, propertyKey) -> desc
.getPrototypeOf(target) -> object | null
@ -1294,13 +1295,16 @@ core-js(/library)/es7/reflect
```
`core-js/stage/4` entry point contains only stage 4 proposals, `core-js/stage/3` - stage 3 and stage 4, etc.
##### Stage 4:
* `{Array, %TypedArray%}#includes` [proposal](https://github.com/tc39/Array.prototype.includes) - module [`es7.array.includes`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.array.includes.js), `%TypedArray%` version in modules from [this section](#ecmascript-6-typed-arrays).
* `Object#__(define|lookup)[GS]etter__`, [annex B ES2017](https://github.com/tc39/ecma262/pull/381), but we haven't special namespace for that - modules [`es7.object.define-setter`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.object.define-setter.js), [`es7.object.define-getter`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.object.define-getter.js), [`es7.object.lookup-setter`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.object.lookup-setter.js) and [`es7.object.lookup-getter`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.object.lookup-getter.js).
* `{Array, %TypedArray%}#includes` [proposal](https://github.com/tc39/Array.prototype.includes) - module [`es7.array.includes`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.array.includes.js), `%TypedArray%` version in modules from [this section](#ecmascript-6-typed-arrays).
* `Object.values`, `Object.entries` [proposal](https://github.com/tc39/proposal-object-values-entries) - modules [`es7.object.values`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.object.values.js), [`es7.object.entries`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.object.entries.js)
* `Object#__(define|lookup)[GS]etter__`, [annex B ES2017](https://github.com/tc39/ecma262/pull/381), but we haven't special namespace for that - modules [`es7.object.define-setter`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.object.define-setter.js), [`es7.object.define-getter`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.object.define-getter.js), [`es7.object.lookup-setter`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.object.lookup-setter.js) and [`es7.object.lookup-getter`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.object.lookup-getter.js).
[*CommonJS entry points:*](#commonjs)
```js
core-js(/library)/stage/4
core-js(/library)/fn/array/includes
core-js(/library)/fn/object/values
core-js(/library)/fn/object/entries
core-js(/library)/fn/object/define-getter
core-js(/library)/fn/object/define-setter
core-js(/library)/fn/object/lookup-getter
@ -1308,15 +1312,13 @@ core-js(/library)/fn/object/lookup-setter
```
##### Stage 3:
* `Object.values`, `Object.entries` [proposal](https://github.com/tc39/proposal-object-values-entries) - modules [`es7.object.values`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.object.values.js), [`es7.object.entries`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.object.entries.js)
* `Object.getOwnPropertyDescriptors` [proposal](https://github.com/tc39/proposal-object-getownpropertydescriptors) - module [`es7.object.get-own-property-descriptors`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.object.get-own-property-descriptors.js)
* `String#padStart`, `String#padEnd` [proposal](https://github.com/tc39/proposal-string-pad-start-end) - modules [`es7.string.pad-left`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.string.pad-left.js), [`es7.string.pad-right`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.string.pad-right.js)
* `Object.getOwnPropertyDescriptors` [proposal](https://github.com/tc39/proposal-object-getownpropertydescriptors) - module [`es7.object.get-own-property-descriptors`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.object.get-own-property-descriptors.js)
* `String#padStart`, `String#padEnd` [proposal](https://github.com/tc39/proposal-string-pad-start-end) - modules [`es7.string.pad-left`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.string.pad-left.js), [`es7.string.pad-right`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.string.pad-right.js)
[*CommonJS entry points:*](#commonjs)
```js
core-js(/library)/stage/3
core-js(/library)/fn/object/values
core-js(/library)/fn/object/entries
core-js(/library)/fn/object/get-own-property-descriptors
core-js(/library)/fn/string/pad-start
core-js(/library)/fn/string/pad-end
core-js(/library)/fn/string/virtual/pad-start
@ -1324,17 +1326,20 @@ core-js(/library)/fn/string/virtual/pad-end
```
##### Stage 2:
None.
* `System.global` [proposal](https://github.com/tc39/proposal-global) - module [`es7.system.global`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.system.global.js)
* `Symbol.asyncIterator` for [async iteration proposal](https://github.com/tc39/proposal-async-iteration) - module [`es7.symbol.async-iterator`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.symbol.async-iterator.js)
[*CommonJS entry points:*](#commonjs)
```js
core-js(/library)/stage/2
core-js(/library)/fn/system/global
core-js(/library)/fn/symbol/async-iterator
```
##### Stage 1:
* `String#trimLeft`, `String#trimRight` / `String#trimStart`, `String#trimEnd` [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim) - modules [`es7.string.trim-left`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.string.trim-right.js), [`es7.string.trim-right`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.string.trim-right.js)
* `String#matchAll` [proposal](https://github.com/tc39/String.prototype.matchAll) - module [`es7.string.match-all`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.string.match-all.js)
* `System.global` [proposal](https://github.com/tc39/proposal-global) - module [`es7.system.global`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.system.global.js)
* `String#trimLeft`, `String#trimRight` / `String#trimStart`, `String#trimEnd` [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim) - modules [`es7.string.trim-left`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.string.trim-right.js), [`es7.string.trim-right`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.string.trim-right.js)
* `String#matchAll` [proposal](https://github.com/tc39/String.prototype.matchAll) - module [`es7.string.match-all`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.string.match-all.js)
* `Symbol.observable` for [observables proposal](https://github.com/zenparsing/es-observable) - module [`es7.symbol.observable`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.symbol.observable.js)
[*CommonJS entry points:*](#commonjs)
```js
@ -1349,21 +1354,21 @@ core-js(/library)/fn/string/virtual/trim-end
core-js(/library)/fn/string/virtual/trim-left
core-js(/library)/fn/string/virtual/trim-right
core-js(/library)/fn/string/virtual/match-all
core-js(/library)/fn/system/global
core-js(/library)/fn/symbol/observable
```
##### Stage 0:
* `String#at` [proposal](https://github.com/mathiasbynens/String.prototype.at) - module [`es7.string.at`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.string.at.js)
* `Map#toJSON`, `Set#toJSON` [proposal](https://github.com/DavidBruant/Map-Set.prototype.toJSON) - modules [`es7.map.to-json`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.map.to-json.js), [`es7.set.to-json`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.set.to-json.js)
* `Error.isError` [proposal](https://github.com/ljharb/proposal-is-error) - module [`es7.error.is-error`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.error.is-error.js)
* `Math.{iaddh, isubh, imulh, umulh}` [proposal](https://gist.github.com/BrendanEich/4294d5c212a6d2254703) - modules [`es7.math.iaddh`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.math.iaddh.js), [`es7.math.isubh`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.math.isubh.js), [`es7.math.imulh`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.math.imulh.js) and [`es7.math.umulh`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.math.umulh.js).
* `String#at` [proposal](https://github.com/mathiasbynens/String.prototype.at) - module [`es7.string.at`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.string.at.js)
* `Map#toJSON`, `Set#toJSON` [proposal](https://github.com/DavidBruant/Map-Set.prototype.toJSON) - modules [`es7.map.to-json`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.map.to-json.js), [`es7.set.to-json`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.set.to-json.js) (rejected and will be removed from `core-js@3`)
* `Error.isError` [proposal](https://github.com/ljharb/proposal-is-error) - module [`es7.error.is-error`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.error.is-error.js) (withdrawn and will be removed from `core-js@3`)
* `Math.{iaddh, isubh, imulh, umulh}` [proposal](https://gist.github.com/BrendanEich/4294d5c212a6d2254703) - modules [`es7.math.iaddh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.math.iaddh.js), [`es7.math.isubh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.math.isubh.js), [`es7.math.imulh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.math.imulh.js) and [`es7.math.umulh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.math.umulh.js)
* `glogal.asap`, [TC39 discussion](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask), module [`es7.asap`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.asap.js)
[*CommonJS entry points:*](#commonjs)
```js
core-js(/library)/stage/0
core-js(/library)/fn/string/at
core-js(/library)/fn/string/virtual/at
core-js(/library)/fn/object/get-own-property-descriptors
core-js(/library)/fn/map
core-js(/library)/fn/set
core-js(/library)/fn/error/is-error
@ -1371,10 +1376,11 @@ core-js(/library)/fn/math/iaddh
core-js(/library)/fn/math/isubh
core-js(/library)/fn/math/imulh
core-js(/library)/fn/math/umulh
core-js(/library)/fn/asap
```
##### Pre-stage 0 proposals:
* `Reflect` metadata [proposal](https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md) - modules [`es7.reflect.define-metadata`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.reflect.define-metadata.js), [`es7.reflect.delete-metadata`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.reflect.delete-metadata.js), [`es7.reflect.get-metadata`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.reflect.get-metadata.js), [`es7.reflect.get-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.reflect.get-metadata-keys.js), [`es7.reflect.get-own-metadata`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.reflect.get-own-metadata.js), [`es7.reflect.get-own-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.reflect.get-own-metadata-keys.js), [`es7.reflect.has-metadata`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.reflect.has-metadata.js), [`es7.reflect.has-own-metadata`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.reflect.has-own-metadata.js) and [`es7.reflect.metadata`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.reflect.metadata.js).
* `Reflect` metadata [proposal](https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md) - modules [`es7.reflect.define-metadata`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.define-metadata.js), [`es7.reflect.delete-metadata`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.delete-metadata.js), [`es7.reflect.get-metadata`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.get-metadata.js), [`es7.reflect.get-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.get-metadata-keys.js), [`es7.reflect.get-own-metadata`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.get-own-metadata.js), [`es7.reflect.get-own-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.get-own-metadata-keys.js), [`es7.reflect.has-metadata`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.has-metadata.js), [`es7.reflect.has-own-metadata`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.has-own-metadata.js) and [`es7.reflect.metadata`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.metadata.js).
[*CommonJS entry points:*](#commonjs)
```js
@ -1391,6 +1397,7 @@ core-js(/library)/fn/reflect/metadata
```
```js
asap(fn) -> void
Array
#includes(var, from?) -> bool
String
@ -1410,16 +1417,17 @@ Object
#__defineGetter__(key, fn) -> void
#__lookupSetter__(key) -> fn | void
#__lookupGetter__(key) -> fn | void
RegExp
.escape(str) -> str
Map
#toJSON() -> array
#toJSON() -> array (rejected and will be removed from core-js@3)
Set
#toJSON() -> array
#toJSON() -> array (rejected and will be removed from core-js@3)
System
.global -> object
Symbol
.asyncIterator -> @@asyncIterator
.observable -> @@observable
Error
.isError(it) -> bool
.isError(it) -> bool (withdrawn and will be removed from core-js@3)
Math
.iaddh(lo0, hi0, lo1, hi1) -> int32
.isubh(lo0, hi0, lo1, hi1) -> int32
@ -1436,8 +1444,10 @@ Reflect
.getOwnMetadataKeys(target, propertyKey?) -> array
.metadata(metadataKey, metadataValue) -> decorator(target, targetKey?) -> void
```
[*Examples*](http://goo.gl/vwciqF):
[*Examples*](http://goo.gl/DVGima):
```js
asap(() => console.log('called as microtask'));
[1, 2, 3].includes(2); // => true
[1, 2, 3].includes(4); // => false
[1, 2, 3].includes(2, 2); // => false
@ -1470,13 +1480,8 @@ var copy = Object.create(Object.getPrototypeOf(O), Object.getOwnPropertyDescript
// Mixin:
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
JSON.stringify(new Map([['a', 'b'], ['c', 'd']])); // => '[["a","b"],["c","d"]]'
JSON.stringify(new Set([1, 2, 3, 2, 1])); // => '[1,2,3]'
System.global.Array === Array; // => true
Error.isError(new TypeError); // => true
var O = {};
Reflect.defineMetadata('foo', 'bar', O);
Reflect.ownKeys(O); // => []
@ -1489,7 +1494,7 @@ Reflect.getOwnMetadata('foo', O); // => 'bar'
core-js(/library)/web
```
#### setTimeout / setInterval
Module [`web.timers`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/web.timers.js). Additional arguments fix for IE9-.
Module [`web.timers`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/web.timers.js). Additional arguments fix for IE9-.
```js
setTimeout(fn(...args), time, ...args) -> id
setInterval(fn(...args), time, ...args) -> id
@ -1507,7 +1512,7 @@ setTimeout(log.bind(null, 42), 1000);
setTimeout(log, 1000, 42);
```
#### setImmediate
Module [`web.immediate`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/web.immediate.js). [`setImmediate` proposal](https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate) polyfill.
Module [`web.immediate`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/web.immediate.js). [`setImmediate` proposal](https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate) polyfill.
```js
setImmediate(fn(...args), ...args) -> id
clearImmediate(id) -> void
@ -1529,7 +1534,7 @@ clearImmediate(setImmediate(function(){
}));
```
#### Iterable DOM collections
Some DOM collections should have [iterable interface](https://heycam.github.io/webidl/#idl-iterable) or should be [inherited from `Array`](https://heycam.github.io/webidl/#LegacyArrayClass). That mean they should have `keys`, `values`, `entries` and `@@iterator` methods for iteration. So add them. Module [`web.dom.iterable`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/web.dom.iterable.js):
Some DOM collections should have [iterable interface](https://heycam.github.io/webidl/#idl-iterable) or should be [inherited from `Array`](https://heycam.github.io/webidl/#LegacyArrayClass). That mean they should have `keys`, `values`, `entries` and `@@iterator` methods for iteration. So add them. Module [`web.dom.iterable`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/web.dom.iterable.js):
```js
{
NodeList,
@ -1564,7 +1569,7 @@ for(var [index, {id}] of document.querySelectorAll('*').entries()){
core-js(/library)/core
```
#### Object
Modules [`core.object.is-object`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/core.object.is-object.js), [`core.object.classof`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/core.object.classof.js), [`core.object.define`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/core.object.define.js), [`core.object.make`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/core.object.make.js).
Modules [`core.object.is-object`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.object.is-object.js), [`core.object.classof`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.object.classof.js), [`core.object.define`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.object.define.js), [`core.object.make`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.object.make.js).
```js
Object
.isObject(var) -> bool
@ -1677,7 +1682,7 @@ console.log(vector.xy); // => 15.811388300841896
console.log(vector.xyz); // => 25.495097567963924
```
#### Dict
Module [`core.dict`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/core.dict.js). Based on [TC39 discuss](https://github.com/rwaldron/tc39-notes/blob/master/es6/2012-11/nov-29.md#collection-apis-review) / [strawman](http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard#dictionaries).
Module [`core.dict`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.dict.js). Based on [TC39 discuss](https://github.com/rwaldron/tc39-notes/blob/master/es6/2012-11/nov-29.md#collection-apis-review) / [strawman](http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard#dictionaries).
```js
[new] Dict(iterable (entries) | object ?) -> dict
.isDict(var) -> bool
@ -1830,7 +1835,7 @@ Dict.reduce(dict, function(memo, it){
}, ''); // => '123'
```
#### Partial application
Module [`core.function.part`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/core.function.part.js).
Module [`core.function.part`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.function.part.js).
```js
Function
#part(...args | _) -> fn(...args)
@ -1860,7 +1865,7 @@ fn2(1, 3, 5); // => 1, 2, 3, 4, 5
fn2(1); // => 1, 2, undefined, 4
```
#### Number Iterator
Module [`core.number.iterator`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/core.number.iterator.js).
Module [`core.number.iterator`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.number.iterator.js).
```js
Number
#@@iterator() -> iterator
@ -1885,7 +1890,7 @@ Array.from(10, function(it){
}, .42); // => [0.42, 1.42, 4.42, 9.42, 16.42, 25.42, 36.42, 49.42, 64.42, 81.42]
```
#### Escaping strings
Modules [`core.regexp.escape`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/core.regexp.escape.js), [`core.string.escape-html`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/core.string.escape-html.js) and [`core.string.unescape-html`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/core.string.unescape-html.js).
Modules [`core.regexp.escape`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.regexp.escape.js), [`core.string.escape-html`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.string.escape-html.js) and [`core.string.unescape-html`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.string.unescape-html.js).
```js
RegExp
.escape(str) -> str
@ -1911,7 +1916,7 @@ RegExp.escape('Hello, []{}()*+?.\\^$|!'); // => 'Hello, \[\]\{\}\(\)\*\+\?\.\\\^
'&lt;script&gt;doSomething();&lt;/script&gt;'.unescapeHTML(); // => '<script>doSomething();</script>'
```
#### delay
Module [`core.delay`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/core.delay.js). [Promise](#ecmascript-6-promise)-returning delay function, [esdiscuss](https://esdiscuss.org/topic/promise-returning-delay-function).
Module [`core.delay`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.delay.js). [Promise](#ecmascript-6-promise)-returning delay function, [esdiscuss](https://esdiscuss.org/topic/promise-returning-delay-function).
```js
delay(ms) -> promise
```
@ -1927,12 +1932,12 @@ delay(1e3).then(() => console.log('after 1 sec'));
(async () => {
await delay(3e3);
console.log('after 3 sec');
while(await delay(3e3))console.log('each 3 sec');
})();
```
#### Helpers for iterators
Modules [`core.is-iterable`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/core.is-iterable.js), [`core.get-iterator`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/core.get-iterator.js), [`core.get-iterator-method`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/core.get-iterator-method.js) - helpers for check iterability / get iterator in the `library` version or, for example, for `arguments` object:
Modules [`core.is-iterable`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.is-iterable.js), [`core.get-iterator`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.get-iterator.js), [`core.get-iterator-method`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.get-iterator-method.js) - helpers for check iterability / get iterator in the `library` version or, for example, for `arguments` object:
```js
core
.isIterable(var) -> bool

View File

@ -1,7 +1,7 @@
{
"name": "core.js",
"main": "client/core.js",
"version": "2.2.2",
"version": "2.3.0",
"description": "Standard Library",
"keywords": [
"ES3",

View File

@ -0,0 +1,2 @@
require('../modules/es7.asap');
module.exports = require('../modules/_core').asap;

View File

@ -5,6 +5,8 @@ require('../modules/es7.string.pad-end');
require('../modules/es7.string.trim-left');
require('../modules/es7.string.trim-right');
require('../modules/es7.string.match-all');
require('../modules/es7.symbol.async-iterator');
require('../modules/es7.symbol.observable');
require('../modules/es7.object.get-own-property-descriptors');
require('../modules/es7.object.values');
require('../modules/es7.object.entries');
@ -29,4 +31,5 @@ require('../modules/es7.reflect.get-own-metadata-keys');
require('../modules/es7.reflect.has-metadata');
require('../modules/es7.reflect.has-own-metadata');
require('../modules/es7.reflect.metadata');
require('../modules/es7.asap');
module.exports = require('../modules/_core');

View File

@ -0,0 +1,3 @@
require('../modules/es7.symbol.async-iterator');
require('../modules/es7.symbol.observable');
module.exports = require('../modules/_core').Symbol;

View File

@ -0,0 +1,2 @@
require('../modules/es7.asap');
module.exports = require('../modules/_core').asap;

View File

@ -0,0 +1,2 @@
require('../../modules/es7.symbol.async-iterator');
module.exports = require('../../modules/_wks-ext').f('asyncIterator');

View File

@ -1 +1,2 @@
module.exports = require('../../modules/_wks')('hasInstance');
require('../../modules/es6.function.has-instance');
module.exports = require('../../modules/_wks-ext').f('hasInstance');

View File

@ -1,3 +1,5 @@
require('../../modules/es6.symbol');
require('../../modules/es6.object.to-string');
require('../../modules/es7.symbol.async-iterator');
require('../../modules/es7.symbol.observable');
module.exports = require('../../modules/_core').Symbol;

View File

@ -1 +1 @@
module.exports = require('../../modules/_wks')('isConcatSpreadable');
module.exports = require('../../modules/_wks-ext').f('isConcatSpreadable');

View File

@ -1,3 +1,3 @@
require('../../modules/es6.string.iterator');
require('../../modules/web.dom.iterable');
module.exports = require('../../modules/_wks')('iterator');
module.exports = require('../../modules/_wks-ext').f('iterator');

View File

@ -1,2 +1,2 @@
require('../../modules/es6.regexp.match');
module.exports = require('../../modules/_wks')('match');
module.exports = require('../../modules/_wks-ext').f('match');

View File

@ -0,0 +1,2 @@
require('../../modules/es7.symbol.observable');
module.exports = require('../../modules/_wks-ext').f('observable');

View File

@ -1,2 +1,2 @@
require('../../modules/es6.regexp.replace');
module.exports = require('../../modules/_wks')('replace');
module.exports = require('../../modules/_wks-ext').f('replace');

View File

@ -1,2 +1,2 @@
require('../../modules/es6.regexp.search');
module.exports = require('../../modules/_wks')('search');
module.exports = require('../../modules/_wks-ext').f('search');

View File

@ -1 +1 @@
module.exports = require('../../modules/_wks')('species');
module.exports = require('../../modules/_wks-ext').f('species');

View File

@ -1,2 +1,2 @@
require('../../modules/es6.regexp.split');
module.exports = require('../../modules/_wks')('split');
module.exports = require('../../modules/_wks-ext').f('split');

View File

@ -1 +1 @@
module.exports = require('../../modules/_wks')('toPrimitive');
module.exports = require('../../modules/_wks-ext').f('toPrimitive');

View File

@ -1,2 +1,2 @@
require('../../modules/es6.object.to-string');
module.exports = require('../../modules/_wks')('toStringTag');
module.exports = require('../../modules/_wks-ext').f('toStringTag');

View File

@ -1 +1 @@
module.exports = require('../../modules/_wks')('unscopables');
module.exports = require('../../modules/_wks-ext').f('unscopables');

View File

@ -0,0 +1,2 @@
require('../modules/es7.asap');
module.exports = require('../modules/_core').asap;

View File

@ -5,6 +5,8 @@ require('../modules/es7.string.pad-end');
require('../modules/es7.string.trim-left');
require('../modules/es7.string.trim-right');
require('../modules/es7.string.match-all');
require('../modules/es7.symbol.async-iterator');
require('../modules/es7.symbol.observable');
require('../modules/es7.object.get-own-property-descriptors');
require('../modules/es7.object.values');
require('../modules/es7.object.entries');
@ -29,4 +31,5 @@ require('../modules/es7.reflect.get-own-metadata-keys');
require('../modules/es7.reflect.has-metadata');
require('../modules/es7.reflect.has-own-metadata');
require('../modules/es7.reflect.metadata');
require('../modules/es7.asap');
module.exports = require('../modules/_core');

View File

@ -0,0 +1,3 @@
require('../modules/es7.symbol.async-iterator');
require('../modules/es7.symbol.observable');
module.exports = require('../modules/_core').Symbol;

View File

@ -0,0 +1,2 @@
require('../modules/es7.asap');
module.exports = require('../modules/_core').asap;

View File

@ -0,0 +1,2 @@
require('../../modules/es7.symbol.async-iterator');
module.exports = require('../../modules/_wks-ext').f('asyncIterator');

View File

@ -1 +1,2 @@
module.exports = require('../../modules/_wks')('hasInstance');
require('../../modules/es6.function.has-instance');
module.exports = require('../../modules/_wks-ext').f('hasInstance');

View File

@ -1,3 +1,5 @@
require('../../modules/es6.symbol');
require('../../modules/es6.object.to-string');
require('../../modules/es7.symbol.async-iterator');
require('../../modules/es7.symbol.observable');
module.exports = require('../../modules/_core').Symbol;

View File

@ -1 +1 @@
module.exports = require('../../modules/_wks')('isConcatSpreadable');
module.exports = require('../../modules/_wks-ext').f('isConcatSpreadable');

View File

@ -1,3 +1,3 @@
require('../../modules/es6.string.iterator');
require('../../modules/web.dom.iterable');
module.exports = require('../../modules/_wks')('iterator');
module.exports = require('../../modules/_wks-ext').f('iterator');

View File

@ -1,2 +1,2 @@
require('../../modules/es6.regexp.match');
module.exports = require('../../modules/_wks')('match');
module.exports = require('../../modules/_wks-ext').f('match');

View File

@ -0,0 +1,2 @@
require('../../modules/es7.symbol.observable');
module.exports = require('../../modules/_wks-ext').f('observable');

View File

@ -1,2 +1,2 @@
require('../../modules/es6.regexp.replace');
module.exports = require('../../modules/_wks')('replace');
module.exports = require('../../modules/_wks-ext').f('replace');

View File

@ -1,2 +1,2 @@
require('../../modules/es6.regexp.search');
module.exports = require('../../modules/_wks')('search');
module.exports = require('../../modules/_wks-ext').f('search');

View File

@ -1 +1 @@
module.exports = require('../../modules/_wks')('species');
module.exports = require('../../modules/_wks-ext').f('species');

View File

@ -1,2 +1,2 @@
require('../../modules/es6.regexp.split');
module.exports = require('../../modules/_wks')('split');
module.exports = require('../../modules/_wks-ext').f('split');

View File

@ -1 +1 @@
module.exports = require('../../modules/_wks')('toPrimitive');
module.exports = require('../../modules/_wks-ext').f('toPrimitive');

View File

@ -1,2 +1,2 @@
require('../../modules/es6.object.to-string');
module.exports = require('../../modules/_wks')('toStringTag');
module.exports = require('../../modules/_wks-ext').f('toStringTag');

View File

@ -1 +1 @@
module.exports = require('../../modules/_wks')('unscopables');
module.exports = require('../../modules/_wks-ext').f('unscopables');

View File

@ -0,0 +1,16 @@
var isObject = require('./_is-object')
, isArray = require('./_is-array')
, SPECIES = require('./_wks')('species');
module.exports = function(original){
var C;
if(isArray(original)){
C = original.constructor;
// cross-realm fallback
if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
if(isObject(C)){
C = C[SPECIES];
if(C === null)C = undefined;
}
} return C === undefined ? Array : C;
};

View File

@ -1,16 +1,6 @@
// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
var isObject = require('./_is-object')
, isArray = require('./_is-array')
, SPECIES = require('./_wks')('species');
var speciesConstructor = require('./_array-species-constructor');
module.exports = function(original, length){
var C;
if(isArray(original)){
C = original.constructor;
// cross-realm fallback
if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
if(isObject(C)){
C = C[SPECIES];
if(C === null)C = undefined;
}
} return new (C === undefined ? Array : C)(length);
return new (speciesConstructor(original))(length);
};

View File

@ -1,2 +1,2 @@
var core = module.exports = {version: '2.2.2'};
var core = module.exports = {version: '2.3.0'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef

View File

@ -3,56 +3,66 @@ var global = require('./_global')
, Observer = global.MutationObserver || global.WebKitMutationObserver
, process = global.process
, Promise = global.Promise
, isNode = require('./_cof')(process) == 'process'
, head, last, notify;
, isNode = require('./_cof')(process) == 'process';
var flush = function(){
var parent, fn;
if(isNode && (parent = process.domain))parent.exit();
while(head){
fn = head.fn;
fn(); // <- currently we use it only for Promise - try / catch not required
head = head.next;
} last = undefined;
if(parent)parent.enter();
};
module.exports = function(){
var head, last, notify;
// Node.js
if(isNode){
notify = function(){
process.nextTick(flush);
var flush = function(){
var parent, fn;
if(isNode && (parent = process.domain))parent.exit();
while(head){
fn = head.fn;
head = head.next;
try {
fn();
} catch(e){
if(head)notify();
else last = undefined;
throw e;
}
} last = undefined;
if(parent)parent.enter();
};
// browsers with MutationObserver
} else if(Observer){
var toggle = true
, node = document.createTextNode('');
new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
notify = function(){
node.data = toggle = !toggle;
};
// environments with maybe non-completely correct, but existent Promise
} else if(Promise && Promise.resolve){
notify = function(){
Promise.resolve().then(flush);
};
// for other environments - macrotask based on:
// - setImmediate
// - MessageChannel
// - window.postMessag
// - onreadystatechange
// - setTimeout
} else {
notify = function(){
// strange IE + webpack dev server bug - use .call(global)
macrotask.call(global, flush);
};
}
module.exports = function(fn){
var task = {fn: fn, next: undefined};
if(last)last.next = task;
if(!head){
head = task;
notify();
} last = task;
// Node.js
if(isNode){
notify = function(){
process.nextTick(flush);
};
// browsers with MutationObserver
} else if(Observer){
var toggle = true
, node = document.createTextNode('');
new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
notify = function(){
node.data = toggle = !toggle;
};
// environments with maybe non-completely correct, but existent Promise
} else if(Promise && Promise.resolve){
var promise = Promise.resolve();
notify = function(){
promise.then(flush);
};
// for other environments - macrotask based on:
// - setImmediate
// - MessageChannel
// - window.postMessag
// - onreadystatechange
// - setTimeout
} else {
notify = function(){
// strange IE + webpack dev server bug - use .call(global)
macrotask.call(global, flush);
};
}
return function(fn){
var task = {fn: fn, next: undefined};
if(last)last.next = task;
if(!head){
head = task;
notify();
} last = task;
};
};

View File

@ -8,8 +8,7 @@ module.exports = function(that, maxLength, fillString, left){
, stringLength = S.length
, fillStr = fillString === undefined ? ' ' : String(fillString)
, intMaxLength = toLength(maxLength);
if(intMaxLength <= stringLength)return S;
if(fillStr == '')fillStr = ' ';
if(intMaxLength <= stringLength || fillStr == '')return S;
var fillLen = intMaxLength - stringLength
, stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen);

View File

@ -0,0 +1,9 @@
var global = require('./_global')
, core = require('./_core')
, LIBRARY = require('./_library')
, wksExt = require('./_wks-ext')
, defineProperty = require('./_object-dp').f;
module.exports = function(name){
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});
};

Some files were not shown because too many files have changed in this diff Show More