mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-02-04 05:50:50 +00:00
nhj
more
This commit is contained in:
21
unified-ai-platform/node_modules/fast-json-stable-stringify/LICENSE
generated
vendored
Normal file
21
unified-ai-platform/node_modules/fast-json-stable-stringify/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
This software is released under the MIT license:
|
||||
|
||||
Copyright (c) 2017 Evgeny Poberezkin
|
||||
Copyright (c) 2013 James Halliday
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
31
unified-ai-platform/node_modules/fast-json-stable-stringify/benchmark/index.js
generated
vendored
Normal file
31
unified-ai-platform/node_modules/fast-json-stable-stringify/benchmark/index.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
'use strict';
|
||||
|
||||
const Benchmark = require('benchmark');
|
||||
const suite = new Benchmark.Suite;
|
||||
const testData = require('./test.json');
|
||||
|
||||
|
||||
const stringifyPackages = {
|
||||
// 'JSON.stringify': JSON.stringify,
|
||||
'fast-json-stable-stringify': require('../index'),
|
||||
'json-stable-stringify': true,
|
||||
'fast-stable-stringify': true,
|
||||
'faster-stable-stringify': true
|
||||
};
|
||||
|
||||
|
||||
for (const name in stringifyPackages) {
|
||||
let func = stringifyPackages[name];
|
||||
if (func === true) func = require(name);
|
||||
|
||||
suite.add(name, function() {
|
||||
func(testData);
|
||||
});
|
||||
}
|
||||
|
||||
suite
|
||||
.on('cycle', (event) => console.log(String(event.target)))
|
||||
.on('complete', function () {
|
||||
console.log('The fastest is ' + this.filter('fastest').map('name'));
|
||||
})
|
||||
.run({async: true});
|
||||
13
unified-ai-platform/node_modules/fast-json-stable-stringify/test/cmp.js
generated
vendored
Normal file
13
unified-ai-platform/node_modules/fast-json-stable-stringify/test/cmp.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var stringify = require('../');
|
||||
|
||||
test('custom comparison function', function (t) {
|
||||
t.plan(1);
|
||||
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
|
||||
var s = stringify(obj, function (a, b) {
|
||||
return a.key < b.key ? 1 : -1;
|
||||
});
|
||||
t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}');
|
||||
});
|
||||
Reference in New Issue
Block a user