Skip to content

Updating the latest version #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 53 commits into from
Apr 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
30197a7
Expose DatabaseAdapter to simplify application tests (#1121)
steven-supersolid Apr 8, 2016
b433fb9
Prevents _User lock out when setting ACL on signup or afterwards (#1429)
flovilmart Apr 8, 2016
281568e
Fixes #1417
drew-gross Apr 8, 2016
73a3db4
Fixes #1444 (#1451)
flovilmart Apr 11, 2016
e9e561f
Removing sessionToken and authData from _User objects included in a q…
simonas-notcat Apr 12, 2016
99ecbb3
Move mongo field type logic into mongoadapter (#1432)
drew-gross Apr 12, 2016
c419106
Remove console.log (#1465)
drew-gross Apr 12, 2016
c050a65
Schema.js database agnostic (#1468)
flovilmart Apr 12, 2016
af30f66
Push status nits (#1462)
flovilmart Apr 12, 2016
f312f81
Adds support for Long and Double mongodb types (fixes #1316) (#1470)
flovilmart Apr 13, 2016
512251e
Move field deletion logic into mongo adapter (#1471)
drew-gross Apr 13, 2016
3fb3ce1
Store collection prefix in mongo adapter, and clean up adapter interf…
drew-gross Apr 13, 2016
fc1cdd4
Remove collection prefix and default mongo URI (#1479)
drew-gross Apr 13, 2016
686cc4a
Checking if object has defined key for Pointer constraints in liveQuery
simonas-notcat Apr 14, 2016
34851c0
Makes sure we don't delete Installations at large when updating a tok…
flovilmart Apr 14, 2016
d57e384
Apply credential stripping to all untransforms for _User (#1498)
TylerBrock Apr 14, 2016
51970fb
Do some triple equals for great justice (#1499)
TylerBrock Apr 14, 2016
1023baf
DBController refactoring (#1228)
flovilmart Apr 14, 2016
eef51cf
Hotfix for tests (#1503)
flovilmart Apr 15, 2016
3f66c30
Enable logs (#1502)
drew-gross Apr 15, 2016
f076078
Add note about URL encoding special characters in passwords.
drew-gross Apr 15, 2016
a727e1c
Adds limit = 0 as a valid parameter for queries (#1493)
seijiakiyama Apr 15, 2016
2f51e75
Changelog and update to 2.2.7
gfosco Apr 15, 2016
4c2636e
Merge pull request #1510 from ParsePlatform/fosco.227
gfosco Apr 15, 2016
c57c6b3
Add link to mandrill adapter.
drew-gross Apr 15, 2016
ac839f7
Remove mongo object create format from Parse Server (#1516)
drew-gross Apr 18, 2016
65bd59d
Add link to screencast blog in readme.
gfosco Apr 18, 2016
414ee67
Regression test for #1489 (#1511)
drew-gross Apr 18, 2016
ab0ea09
Schema.js cleanup (#1540)
drew-gross Apr 19, 2016
cecb2a1
Move 'ns not found' into mongo adapter. (#1541)
drew-gross Apr 19, 2016
0708af1
Move "No two geopoints" logic into mongo adapter (#1491)
drew-gross Apr 19, 2016
61b62e4
Rename Schema => SchemaController (#1542)
drew-gross Apr 19, 2016
3945e0c
Update pushStatusHandler.js (#1543)
flovilmart Apr 19, 2016
bf47a0b
Remove acceptor parameter (#1553)
drew-gross Apr 19, 2016
ddd0118
Safely require babel-polyfill (#1558)
flovilmart Apr 20, 2016
5d37755
Test facebook unlinking (regression test #1532) (#1538)
drew-gross Apr 20, 2016
54b21c2
Compress the ACL queries into a single $in query (#1566)
blacha Apr 20, 2016
59b4047
Defers the session creation after DB operation (#1561)
flovilmart Apr 20, 2016
9776362
Begin isolating object creation code into an externalizable API. (#1569)
drew-gross Apr 20, 2016
7b91ee9
Fixes #1568 (#1574)
drew-gross Apr 20, 2016
b185508
Remove flaky test
drew-gross Apr 20, 2016
b7b57f7
Adds support for Pointer Permissions
flovilmart Apr 21, 2016
2d94a88
regression test for #1554
flovilmart Apr 21, 2016
6e9529f
Exposes the loggerAdapter as log to Cloud Functions and Triggers (#1565)
blacha Apr 21, 2016
d49d539
_PushStatus uses proper Parse format (#1580)
flovilmart Apr 22, 2016
ab827e3
Forces delete resolution (#1595)
flovilmart Apr 22, 2016
0d09476
Cleanup update (#1590)
drew-gross Apr 22, 2016
d33dd68
Add revokeSessionOnPasswordReset option. Closes #1584 (#1597)
drew-gross Apr 22, 2016
d14d451
Move acl adding into parse server (#1601)
drew-gross Apr 23, 2016
234d009
Cleanup delete schema (#1604)
drew-gross Apr 25, 2016
957b592
Ignore _RevoableSession "header" that is sent by JS SDK. Fixes #1548.…
drew-gross Apr 25, 2016
0542f86
Test case to ensure dashboard.parse.com won't break (#1636)
flovilmart Apr 26, 2016
3d7589c
Update README.md (#1637)
musnit Apr 26, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
## Parse Server Changelog

### 2.2.7 (4/15/2016)

* Adds support for --verbose and verbose option when running ParseServer [\#1414](https://github.com/ParsePlatform/parse-server/pull/1414) ([flovilmart](https://github.com/flovilmart))
* Adds limit = 0 as a valid parameter for queries [\#1493](https://github.com/ParsePlatform/parse-server/pull/1493) ([seijiakiyama](https://github.com/seijiakiyama))
* Makes sure we preserve Installations when updating a token \(\#1475\) [\#1486](https://github.com/ParsePlatform/parse-server/pull/1486) ([flovilmart](https://github.com/flovilmart))
* Hotfix for tests [\#1503](https://github.com/ParsePlatform/parse-server/pull/1503) ([flovilmart](https://github.com/flovilmart))
* Enable logs [\#1502](https://github.com/ParsePlatform/parse-server/pull/1502) ([drew-gross](https://github.com/drew-gross))
* Do some triple equals for great justice [\#1499](https://github.com/ParsePlatform/parse-server/pull/1499) ([TylerBrock](https://github.com/TylerBrock))
* Apply credential stripping to all untransforms for \_User [\#1498](https://github.com/ParsePlatform/parse-server/pull/1498) ([TylerBrock](https://github.com/TylerBrock))
* Checking if object has defined key for Pointer constraints in liveQuery [\#1487](https://github.com/ParsePlatform/parse-server/pull/1487) ([simonas-notcat](https://github.com/simonas-notcat))
* Remove collection prefix and default mongo URI [\#1479](https://github.com/ParsePlatform/parse-server/pull/1479) ([drew-gross](https://github.com/drew-gross))
* Store collection prefix in mongo adapter, and clean up adapter interface [\#1472](https://github.com/ParsePlatform/parse-server/pull/1472) ([drew-gross](https://github.com/drew-gross))
* Move field deletion logic into mongo adapter [\#1471](https://github.com/ParsePlatform/parse-server/pull/1471) ([drew-gross](https://github.com/drew-gross))
* Adds support for Long and Double mongodb types \(fixes \#1316\) [\#1470](https://github.com/ParsePlatform/parse-server/pull/1470) ([flovilmart](https://github.com/flovilmart))
* Schema.js database agnostic [\#1468](https://github.com/ParsePlatform/parse-server/pull/1468) ([flovilmart](https://github.com/flovilmart))
* Remove console.log [\#1465](https://github.com/ParsePlatform/parse-server/pull/1465) ([drew-gross](https://github.com/drew-gross))
* Push status nits [\#1462](https://github.com/ParsePlatform/parse-server/pull/1462) ([flovilmart](https://github.com/flovilmart))
* Fixes \#1444 [\#1451](https://github.com/ParsePlatform/parse-server/pull/1451) ([flovilmart](https://github.com/flovilmart))
* Removing sessionToken and authData from \_User objects included in a query [\#1450](https://github.com/ParsePlatform/parse-server/pull/1450) ([simonas-notcat](https://github.com/simonas-notcat))
* Move mongo field type logic into mongoadapter [\#1432](https://github.com/ParsePlatform/parse-server/pull/1432) ([drew-gross](https://github.com/drew-gross))
* Prevents \_User lock out when setting ACL on signup or afterwards [\#1429](https://github.com/ParsePlatform/parse-server/pull/1429) ([flovilmart](https://github.com/flovilmart))
* Update .travis.yml [\#1428](https://github.com/ParsePlatform/parse-server/pull/1428) ([flovilmart](https://github.com/flovilmart))
* Adds relation fields to objects [\#1424](https://github.com/ParsePlatform/parse-server/pull/1424) ([flovilmart](https://github.com/flovilmart))
* Update .travis.yml [\#1423](https://github.com/ParsePlatform/parse-server/pull/1423) ([flovilmart](https://github.com/flovilmart))
* Sets the defaultSchemas keys in the SchemaCollection [\#1421](https://github.com/ParsePlatform/parse-server/pull/1421) ([flovilmart](https://github.com/flovilmart))
* Fixes \#1417 [\#1420](https://github.com/ParsePlatform/parse-server/pull/1420) ([drew-gross](https://github.com/drew-gross))
* Untransform should treat Array's as nested objects [\#1416](https://github.com/ParsePlatform/parse-server/pull/1416) ([blacha](https://github.com/blacha))
* Adds X-Parse-Push-Status-Id header [\#1412](https://github.com/ParsePlatform/parse-server/pull/1412) ([flovilmart](https://github.com/flovilmart))
* Schema format cleanup [\#1407](https://github.com/ParsePlatform/parse-server/pull/1407) ([drew-gross](https://github.com/drew-gross))
* Updates the publicServerURL option [\#1397](https://github.com/ParsePlatform/parse-server/pull/1397) ([flovilmart](https://github.com/flovilmart))
* Fix exception with non-expiring session tokens. [\#1386](https://github.com/ParsePlatform/parse-server/pull/1386) ([0x18B2EE](https://github.com/0x18B2EE))
* Move mongo schema format related logic into mongo adapter [\#1385](https://github.com/ParsePlatform/parse-server/pull/1385) ([drew-gross](https://github.com/drew-gross))
* WIP: Huge performance improvement on roles queries [\#1383](https://github.com/ParsePlatform/parse-server/pull/1383) ([flovilmart](https://github.com/flovilmart))
* Removes GCS Adapter from provided adapters [\#1339](https://github.com/ParsePlatform/parse-server/pull/1339) ([flovilmart](https://github.com/flovilmart))
* DBController refactoring [\#1228](https://github.com/ParsePlatform/parse-server/pull/1228) ([flovilmart](https://github.com/flovilmart))
* Spotify authentication [\#1226](https://github.com/ParsePlatform/parse-server/pull/1226) ([1nput0utput](https://github.com/1nput0utput))
* Expose DatabaseAdapter to simplify application tests [\#1121](https://github.com/ParsePlatform/parse-server/pull/1121) ([steven-supersolid](https://github.com/steven-supersolid))

### 2.2.6 (4/5/2016)

* Important Fix: Disables find on installation from clients [\#1374](https://github.com/ParsePlatform/parse-server/pull/1374) ([flovilmart](https://github.com/flovilmart))
Expand Down Expand Up @@ -60,7 +98,7 @@

* Important Fix: Mounts createLiveQueryServer, fix babel induced problem [\#1153](https://github.com/ParsePlatform/parse-server/pull/1153) (flovilmart)
* Move ParseServer to it's own file [\#1166](https://github.com/ParsePlatform/parse-server/pull/1166) (flovilmart)
* Update README.md - remove deploy buttons - replace with community links [\#1139](https://github.com/ParsePlatform/parse-server/pull/1139) (drew-gross)
* Update README.md * remove deploy buttons * replace with community links [\#1139](https://github.com/ParsePlatform/parse-server/pull/1139) (drew-gross)
* Adds bootstrap.sh [\#1138](https://github.com/ParsePlatform/parse-server/pull/1138) (flovilmart)
* Fix: Do not override username [\#1142](https://github.com/ParsePlatform/parse-server/pull/1142) (flovilmart)
* Fix: Add pushId back to GCM payload [\#1168](https://github.com/ParsePlatform/parse-server/pull/1168) (wangmengyan95)
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Parse Server works with the Express web application framework. It can be added t

# Getting Started

April 2016 - We created a series of video screencasts, please check them out here: [http://blog.parse.com/learn/parse-server-video-series-april-2016/](http://blog.parse.com/learn/parse-server-video-series-april-2016/)

The fastest and easiest way to get started is to run MongoDB and Parse Server locally.

## Running Parse Server locally
Expand Down Expand Up @@ -159,7 +161,7 @@ For the full list of available options, run `parse-server --help`.

* `appId` **(required)** - The application id to host with this server instance. You can use any arbitrary string. For migrated apps, this should match your hosted Parse app.
* `masterKey` **(required)** - The master key to use for overriding ACL security. You can use any arbitrary string. Keep it secret! For migrated apps, this should match your hosted Parse app.
* `databaseURI` **(required)** - The connection string for your database, i.e. `mongodb://user:[email protected]/dbname`.
* `databaseURI` **(required)** - The connection string for your database, i.e. `mongodb://user:[email protected]/dbname`. Be sure to [URL encode your password](https://app.zencoder.com/docs/guides/getting-started/special-characters-in-usernames-and-passwords) if your password has special characters.
* `port` - The default port is 1337, specify this parameter to use a different port.
* `serverURL` - URL to your Parse Server (don't forget to specify http:// or https://). This URL will be used when making requests to Parse Server from Cloud Code.
* `cloud` - The absolute path to your cloud code `main.js` file.
Expand All @@ -186,6 +188,7 @@ The client keys used with Parse are no longer necessary with Parse Server. If yo
* `maxUploadSize` - Max file size for uploads. Defaults to 20 MB.
* `loggerAdapter` - The default behavior/transport (File) can be changed by creating an adapter class (see [`LoggerAdapter.js`](https://github.com/ParsePlatform/parse-server/blob/master/src/Adapters/Logger/LoggerAdapter.js)).
* `sessionLength` - The length of time in seconds that a session should be valid for. Defaults to 31536000 seconds (1 year).
* `revokeSessionOnPasswordReset` - When a user changes their password, either through the reset password email or while logged in, all sessions are revoked if this is true. Set to false if you don't want to revoke sessions.

##### Email verification and password reset

Expand Down Expand Up @@ -217,7 +220,7 @@ var server = ParseServer({
});
```

You can also use other email adapters contributed by the community such as [parse-server-sendgrid-adapter](https://www.npmjs.com/package/parse-server-sendgrid-adapter).
You can also use other email adapters contributed by the community such as [parse-server-sendgrid-adapter](https://www.npmjs.com/package/parse-server-sendgrid-adapter) or [parse-server-mandrill-adapter](https://github.com/back4app/parse-server-mandrill-adapter).

### Using environment variables to configure Parse Server

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "parse-server",
"version": "2.2.6",
"version": "2.2.7",
"description": "An express module providing a Parse-compatible API server",
"main": "lib/index.js",
"repository": {
Expand Down
61 changes: 61 additions & 0 deletions spec/CloudCodeLogger.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
'use strict';
var LoggerController = require('../src/Controllers/LoggerController').LoggerController;
var FileLoggerAdapter = require('../src/Adapters/Logger/FileLoggerAdapter').FileLoggerAdapter;

describe("Cloud Code Logger", () => {

it("should expose log to functions", (done) => {
var logController = new LoggerController(new FileLoggerAdapter());

Parse.Cloud.define("loggerTest", (req, res) => {
req.log.info('logTest', 'info log', {info: 'some log' });
req.log.error('logTest','error log', {error: 'there was an error'});
res.success({});
});

Parse.Cloud.run('loggerTest').then(() => {
Parse.Cloud._removeHook('Functions', 'logTest');
return logController.getLogs({from: Date.now() - 500, size: 1000});
}).then((res) => {
expect(res.length).not.toBe(0);
let lastLogs = res.slice(0, 2);
let errorMessage = lastLogs[0];
let infoMessage = lastLogs[1];
expect(errorMessage.level).toBe('error');
expect(errorMessage.error).toBe('there was an error');
expect(errorMessage.message).toBe('logTest error log');
expect(infoMessage.level).toBe('info');
expect(infoMessage.info).toBe('some log');
expect(infoMessage.message).toBe('logTest info log');
done();
});
});

it("should expose log to trigger", (done) => {
var logController = new LoggerController(new FileLoggerAdapter());

Parse.Cloud.beforeSave("MyObject", (req, res) => {
req.log.info('beforeSave MyObject', 'info log', {info: 'some log' });
req.log.error('beforeSave MyObject','error log', {error: 'there was an error'});
res.success({});
});

let obj = new Parse.Object('MyObject');
obj.save().then(() => {
Parse.Cloud._removeHook('Triggers', 'beforeSave', 'MyObject');
return logController.getLogs({from: Date.now() - 500, size: 1000})
}).then((res) => {
expect(res.length).not.toBe(0);
let lastLogs = res.slice(0, 2);
let errorMessage = lastLogs[0];
let infoMessage = lastLogs[1];
expect(errorMessage.level).toBe('error');
expect(errorMessage.error).toBe('there was an error');
expect(errorMessage.message).toBe('beforeSave MyObject error log');
expect(infoMessage.level).toBe('info');
expect(infoMessage.info).toBe('some log');
expect(infoMessage.message).toBe('beforeSave MyObject info log');
done();
});
});
});
10 changes: 5 additions & 5 deletions spec/DatabaseAdapter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ describe('DatabaseAdapter', () => {
DatabaseAdapter.setAppDatabaseOptions('optionsTest', {foo: "bar"});
let optionsTestDatabaseConnection = DatabaseAdapter.getDatabaseConnection('optionsTest');

expect(optionsTestDatabaseConnection instanceof Object).toBe(true);
expect(optionsTestDatabaseConnection.adapter._options instanceof Object).toBe(true);
expect(optionsTestDatabaseConnection.adapter._options.foo).toBe("bar");
expect(optionsTestDatabaseConnection).toEqual(jasmine.any(Object));
expect(optionsTestDatabaseConnection.adapter._mongoOptions).toEqual(jasmine.any(Object));
expect(optionsTestDatabaseConnection.adapter._mongoOptions.foo).toBe("bar");

DatabaseAdapter.setAppDatabaseURI('noOptionsTest', 'mongodb://localhost:27017/noOptionsTest');
let noOptionsTestDatabaseConnection = DatabaseAdapter.getDatabaseConnection('noOptionsTest');

expect(noOptionsTestDatabaseConnection instanceof Object).toBe(true);
expect(noOptionsTestDatabaseConnection.adapter._options instanceof Object).toBe(false);
expect(noOptionsTestDatabaseConnection).toEqual(jasmine.any(Object));
expect(noOptionsTestDatabaseConnection.adapter._mongoOptions).toEqual(jasmine.any(Object));

done();
});
Expand Down
7 changes: 4 additions & 3 deletions spec/DatabaseController.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ let MongoStorageAdapter = require('../src/Adapters/Storage/Mongo/MongoStorageAda

describe('DatabaseController', () => {
it('can be constructed', done => {
let adapter = new MongoStorageAdapter('mongodb://localhost:27017/test');
let databaseController = new DatabaseController(adapter, {
collectionPrefix: 'test_'
let adapter = new MongoStorageAdapter({
uri: 'mongodb://localhost:27017/test',
collectionPrefix: 'test_',
});
let databaseController = new DatabaseController(adapter);
databaseController.connect().then(done, error => {
console.log('error', error.stack);
fail();
Expand Down
6 changes: 4 additions & 2 deletions spec/FileLoggerAdapter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ describe('info logs', () => {
var fileLoggerAdapter = new FileLoggerAdapter();
fileLoggerAdapter.info('testing info logs', () => {
fileLoggerAdapter.query({
size: 1,
from: new Date(Date.now() - 500),
size: 100,
level: 'info'
}, (results) => {
if(results.length == 0) {
Expand All @@ -28,7 +29,8 @@ describe('error logs', () => {
var fileLoggerAdapter = new FileLoggerAdapter();
fileLoggerAdapter.error('testing error logs', () => {
fileLoggerAdapter.query({
size: 1,
from: new Date(Date.now() - 500),
size: 100,
level: 'error'
}, (results) => {
if(results.length == 0) {
Expand Down
11 changes: 0 additions & 11 deletions spec/HTTPRequest.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,17 +216,6 @@ describe("httpRequest", () => {
});
});

it('should get a cat image', (done) => {
httpRequest({
url: 'http://thecatapi.com/api/images/get?format=src&type=jpg',
followRedirects: true
}).then((res) => {
expect(res.buffer).not.toBe(null);
expect(res.text).not.toBe(null);
done();
})
})

it("should params object to query string", (done) => {
httpRequest({
url: httpRequestServer+"/qs",
Expand Down
15 changes: 9 additions & 6 deletions spec/MongoStorageAdapter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ const MongoClient = require('mongodb').MongoClient;
describe('MongoStorageAdapter', () => {
it('auto-escapes symbols in auth information', () => {
spyOn(MongoClient, 'connect').and.returnValue(Promise.resolve(null));
new MongoStorageAdapter('mongodb://user!with@+ symbols:password!with@+ symbols@localhost:1234/parse', {})
.connect();
new MongoStorageAdapter({
uri: 'mongodb://user!with@+ symbols:password!with@+ symbols@localhost:1234/parse'
}).connect();
expect(MongoClient.connect).toHaveBeenCalledWith(
'mongodb://user!with%40%2B%20symbols:password!with%40%2B%20symbols@localhost:1234/parse',
jasmine.any(Object)
Expand All @@ -16,8 +17,9 @@ describe('MongoStorageAdapter', () => {

it("doesn't double escape already URI-encoded information", () => {
spyOn(MongoClient, 'connect').and.returnValue(Promise.resolve(null));
new MongoStorageAdapter('mongodb://user!with%40%2B%20symbols:password!with%40%2B%20symbols@localhost:1234/parse', {})
.connect();
new MongoStorageAdapter({
uri: 'mongodb://user!with%40%2B%20symbols:password!with%40%2B%20symbols@localhost:1234/parse'
}).connect();
expect(MongoClient.connect).toHaveBeenCalledWith(
'mongodb://user!with%40%2B%20symbols:password!with%40%2B%20symbols@localhost:1234/parse',
jasmine.any(Object)
Expand All @@ -27,8 +29,9 @@ describe('MongoStorageAdapter', () => {
// https://github.com/ParsePlatform/parse-server/pull/148#issuecomment-180407057
it('preserves replica sets', () => {
spyOn(MongoClient, 'connect').and.returnValue(Promise.resolve(null));
new MongoStorageAdapter('mongodb://test:[email protected]:59325,ds059315-a1.mongolab.com:59315/testDBname?replicaSet=rs-ds059415', {})
.connect();
new MongoStorageAdapter({
uri: 'mongodb://test:[email protected]:59325,ds059315-a1.mongolab.com:59315/testDBname?replicaSet=rs-ds059415'
}).connect();
expect(MongoClient.connect).toHaveBeenCalledWith(
'mongodb://test:[email protected]:59325,ds059315-a1.mongolab.com:59315/testDBname?replicaSet=rs-ds059415',
jasmine.any(Object)
Expand Down
Loading