Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

init it

  • Loading branch information...
commit 851eea0e9a3407dc74d72c1f297950f7178ab49e 0 parents
notejs authored
22 .gitattributes
@@ -0,0 +1,22 @@
+# Auto detect text files and perform LF normalization
+* text=auto
+
+# Custom for Visual Studio
+*.cs diff=csharp
+*.sln merge=union
+*.csproj merge=union
+*.vbproj merge=union
+*.fsproj merge=union
+*.dbproj merge=union
+
+# Standard to msysgit
+*.doc diff=astextplain
+*.DOC diff=astextplain
+*.docx diff=astextplain
+*.DOCX diff=astextplain
+*.dot diff=astextplain
+*.DOT diff=astextplain
+*.pdf diff=astextplain
+*.PDF diff=astextplain
+*.rtf diff=astextplain
+*.RTF diff=astextplain
163 .gitignore
@@ -0,0 +1,163 @@
+#################
+## Eclipse
+#################
+
+*.pydevproject
+.project
+.metadata
+bin/
+tmp/
+*.tmp
+*.bak
+*.swp
+*~.nib
+local.properties
+.classpath
+.settings/
+.loadpath
+
+# External tool builders
+.externalToolBuilders/
+
+# Locally stored "Eclipse launch configurations"
+*.launch
+
+# CDT-specific
+.cproject
+
+# PDT-specific
+.buildpath
+
+
+#################
+## Visual Studio
+#################
+
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.sln.docstates
+
+# Build results
+[Dd]ebug/
+[Rr]elease/
+*_i.c
+*_p.c
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.vspscc
+.builds
+*.dotCover
+
+## TODO: If you have NuGet Package Restore enabled, uncomment this
+#packages/
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opensdf
+*.sdf
+
+# Visual Studio profiler
+*.psess
+*.vsp
+
+# ReSharper is a .NET coding add-in
+_ReSharper*
+
+# Installshield output folder
+[Ee]xpress
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish
+
+# Others
+[Bb]in
+[Oo]bj
+sql
+TestResults
+*.Cache
+ClientBin
+stylecop.*
+~$*
+*.dbmdl
+Generated_Code #added for RIA/Silverlight projects
+
+# Backup & report files from converting an old project file to a newer
+# Visual Studio version. Backup files are not needed, because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+
+
+
+############
+## Windows
+############
+
+# Windows image file caches
+Thumbs.db
+
+# Folder config file
+Desktop.ini
+
+
+#############
+## Python
+#############
+
+*.py[co]
+
+# Packages
+*.egg
+*.egg-info
+dist
+build
+eggs
+parts
+bin
+var
+sdist
+develop-eggs
+.installed.cfg
+
+# Installer logs
+pip-log.txt
+
+# Unit test / coverage reports
+.coverage
+.tox
+
+#Translations
+*.mo
+
+#Mr Developer
+.mr.developer.cfg
+
+# Mac crap
+.DS_Store
0  README.md
No changes.
22 package.json
@@ -0,0 +1,22 @@
+{
+ "name": "jsutil",
+ "version": "0.1",
+ "description": "Mixin properties to object from one or more Object",
+ "keywords": [
+ "mixin",
+ "extend"
+ ],
+ "author": {
+ "name": "youjiang wang",
+ "email": "gm731958576@gmail.com",
+ "url": ""
+ },
+ "homepage": "",
+ "bugs": "",
+ "main": "./src/jsutil.js",
+ "repository": {
+ "type": "git",
+ "url": ""
+ },
+ "readmeFilename": "README.md"
+}
32 src/jsutil.js
@@ -0,0 +1,32 @@
+
+var util = {
+
+ mixin : function(dest, sources){
+ dest = dest || {};
+ for(var i = 1, ii = arguments.length; i < ii; i++){
+ util._mixin(dest, arguments[i]);
+ }
+ return dest;
+ },
+
+ extend : function(ctor, props){
+ for(var i = 1, ii = arguments.length; i < ii; i++){
+ util._mixin(ctor.prototype, arguments[i]);
+ }
+ return ctor;
+ },
+
+ _mixin : function(dest, source, copyFunc){
+ var name, s, i, empty = {};
+ for(name in source){
+ s = source[name];
+ if(!(name in dest) || (dest[name] !== s && (!(name in empty) || empty[name] !== s))){
+ dest[name] = copyFunc ? copyFunc(s) : s;
+ }
+ }
+ return dest;
+ }
+};
+
+module.exports = util;
+
Please sign in to comment.
Something went wrong with that request. Please try again.