How to use the linq-js.min function in linq-js

To help you get started, we’ve selected a few linq-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wm123450405 / linqjs / pack.js View on Github external
});
				}
				for (let api of defaultApis) {
					let apiPath = path.join(apisPath, api);
					try {
						let apiContent = JSON.parse(fs.readFileSync(path.join(resources, common.defaultLang, 'apis', api)));
						if (fs.existsSync(apiPath)) {
							apiContent = extend(true, [], apiContent, JSON.parse(fs.readFileSync(apiPath)));
						}
						let since = apiContent.since || common.lastest, deprecated = apiContent.deprecated || common.newest;
						for (let method of (apiContent.methods || [])) {
							since = common.minVersion(Enumerable.min(common.histroys(method.histroys), histroy => histroy.since, common.versionComparer), since);
							deprecated = common.maxVersion(Enumerable.max(common.histroys(method.histroys), histroy => histroy.deprecated || common.lastest, common.versionComparer), deprecated);
						}
						for (let property of (apiContent.properties || [])) {
							since = common.minVersion(Enumerable.min(common.histroys(property.histroys), histroy => histroy.since, common.versionComparer), since);
							deprecated = common.maxVersion(Enumerable.max(common.histroys(property.histroys), histroy => histroy.deprecated || common.lastest, common.versionComparer), deprecated);
						}
						apis.children.push({
							code: path.basename(api, jsonExt),
							title: `${ apiContent.name || path.basename(api, jsonExt) } ${ common.capitalize(caption[apiContent.type]) }`,
							since: since,
							deprecated: deprecated
						});
					} catch(e) {
						console.error(e);
					}
				}
				directorys.splice(directorys.indexOf("apis"), 1, apis);

				fs.writeFileSync(path.join(langPath, directoryFile), JSON.stringify(directorys, null, '\t'));
				console.log(`Directory file for language ${ langName } is created`);
github wm123450405 / linqjs / src / scripts / common.js View on Github external
minVersion(...versions) {
		return Enumerable.min(versions, '', this.versionComparer);
	},
	isNewer(version, basaVersion) {

linq-js

use linq and lamdba in javascript

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis