Has many public utility functions for various tasks, mostly unique to SumanJS.
sumanjs / suman-utils Goto Github PK
View Code? Open in Web Editor NEWShared utils library for all SumanJS projects :dog:
License: MIT License
Shared utils library for all SumanJS projects :dog:
License: MIT License
this
const customStringify = function (v) {
let cache = [];
return JSON.stringify(v, function (key, value) {
if (typeof value === 'object' && value !== null) {
if (cache.indexOf(value) !== -1) {
// Circular reference found, discard key
return;
}
// Store value in our collection
cache.push(value);
}
return value;
});
};
should become
const customStringify = function (v) {
let cache = new Map();
return JSON.stringify(v, function (key, value) {
if (typeof value === 'object' && value !== null) {
if (cache.get(value)) {
// Circular reference found, discard key
return;
}
// Store value in our collection
cache.set(value,true);
}
return value;
});
};
[watch-worker] (node:5440) Warning: Possible EventEmitter memory leak detected. 11 finish listeners added. Use emitter.setMaxListeners() to increase limit
[watch-worker] => Suman-Utils warning => Warning: Possible EventEmitter memory leak detected. 11 finish listeners added. Use emitter.setMaxListeners() to increase limit
[watch-worker] at _addListener (events.js:259:19)
[watch-worker] at Socket.addListener (events.js:275:10)
[watch-worker] at Socket.Readable.on (_stream_readable.js:687:35)
[watch-worker] at Socket.once (events.js:301:8)
[watch-worker] at Socket.Readable.pipe (_stream_readable.js:596:8)
[watch-worker] at handleStdioAndExit (/Users/alexamil/WebstormProjects/oresoftware/sumanjs/suman-watch/lib/make-execute.js:38:22)
[watch-worker] at noDaemon_1 (/Users/alexamil/WebstormProjects/oresoftware/sumanjs/suman-watch/lib/make-execute.js:89:21)
[watch-worker] at _combinedTickCallback (internal/process/next_tick.js:73:7)
[watch-worker] at process._tickCallback (internal/process/next_tick.js:104:9)
[watch-worker] => Suman warning => Warning: Possible EventEmitter memory leak detected. 11 finish listeners added. Use emitter.setMaxListeners() to increase limit
[watch-worker] at _addListener (events.js:259:19)
[watch-worker] at Socket.addListener (events.js:275:10)
[watch-worker] at Socket.Readable.on (_stream_readable.js:687:35)
[watch-worker] at Socket.once (events.js:301:8)
[watch-worker] at Socket.Readable.pipe (_stream_readable.js:596:8)
[watch-worker] at handleStdioAndExit (/Users/alexamil/WebstormProjects/oresoftware/sumanjs/suman-watch/lib/make-execute.js:38:22)
[watch-worker] at noDaemon_1 (/Users/alexamil/WebstormProjects/oresoftware/sumanjs/suman-watch/lib/make-execute.js:89:21)
[watch-worker] at _combinedTickCallback (internal/process/next_tick.js:73:7)
[watch-worker] at process._tickCallback (internal/process/next_tick.js:104:9)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.